ploc components now compile for hosted (linux)
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
Robin Müller 2022-11-10 17:32:11 +01:00
parent 5ed0ade358
commit ec7ce5ddb6
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
45 changed files with 116 additions and 46 deletions

View File

@ -233,7 +233,11 @@ set(LIB_ARCSEC_PATH ${THIRD_PARTY_FOLDER}/arcsec_star_tracker)
set(LIB_JSON_PATH ${THIRD_PARTY_FOLDER}/json) set(LIB_JSON_PATH ${THIRD_PARTY_FOLDER}/json)
set(FSFW_WARNING_SHADOW_LOCAL_GCC OFF) set(FSFW_WARNING_SHADOW_LOCAL_GCC OFF)
set(EIVE_ADD_LINUX_FILES False) set(EIVE_ADD_LINUX_FILES OFF)
if(UNIX)
set(EIVE_ADD_LINUX_FILES ON)
endif()
# Analyse different OS and architecture/target options, determine BSP_PATH, # Analyse different OS and architecture/target options, determine BSP_PATH,
# display information about compiler etc. # display information about compiler etc.

View File

@ -6,11 +6,13 @@
#include <mission/core/GenericFactory.h> #include <mission/core/GenericFactory.h>
#include <mission/tmtc/TmFunnelHandler.h> #include <mission/tmtc/TmFunnelHandler.h>
#include <objects/systemObjectList.h> #include <objects/systemObjectList.h>
#include <tmtc/pusIds.h>
#include "OBSWConfig.h" #include "OBSWConfig.h"
#include "devConf.h"
#include "eive/definitions.h" #include "eive/definitions.h"
#include "fsfw/platform.h"
#include "fsfw_tests/integration/task/TestTask.h" #include "fsfw_tests/integration/task/TestTask.h"
#include "tmtc/pusIds.h"
#if OBSW_USE_TMTC_TCP_BRIDGE == 0 #if OBSW_USE_TMTC_TCP_BRIDGE == 0
#include "fsfw/osal/common/UdpTcPollingTask.h" #include "fsfw/osal/common/UdpTcPollingTask.h"
@ -47,6 +49,19 @@
#include "dummies/helpers.h" #include "dummies/helpers.h"
#include "mission/utility/GlobalConfigHandler.h" #include "mission/utility/GlobalConfigHandler.h"
#ifdef PLATFORM_UNIX
#include <fsfw_hal/linux/serial/SerialComIF.h>
#include <fsfw_hal/linux/serial/SerialCookie.h>
#include "devices/gpioIds.h"
#include "fsfw_hal/linux/gpio/Gpio.h"
#include "linux/devices/ploc/PlocMPSoCHandler.h"
#include "linux/devices/ploc/PlocMPSoCHelper.h"
#include "linux/devices/ploc/PlocSupervisorHandler.h"
#include "linux/devices/ploc/PlocSupvUartMan.h"
#include "test/gpio/DummyGpioIF.h"
#endif
void Factory::setStaticFrameworkObjectIds() { void Factory::setStaticFrameworkObjectIds() {
PusServiceBase::PUS_DISTRIBUTOR = objects::PUS_PACKET_DISTRIBUTOR; PusServiceBase::PUS_DISTRIBUTOR = objects::PUS_PACKET_DISTRIBUTOR;
PusServiceBase::PACKET_DESTINATION = objects::TM_FUNNEL; PusServiceBase::PACKET_DESTINATION = objects::TM_FUNNEL;
@ -63,6 +78,33 @@ void ObjectFactory::produce(void* args) {
CfdpTmFunnel* cfdpFunnel; CfdpTmFunnel* cfdpFunnel;
ObjectFactory::produceGenericObjects(nullptr, &pusFunnel, &cfdpFunnel); ObjectFactory::produceGenericObjects(nullptr, &pusFunnel, &cfdpFunnel);
DummyGpioIF* dummyGpioIF = new DummyGpioIF();
static_cast<void>(dummyGpioIF);
#ifdef PLATFORM_UNIX
new SerialComIF(objects::UART_COM_IF);
#if OBSW_ADD_PLOC_MPSOC == 1
std::string mpscoDev = "";
auto mpsocCookie = new UartCookie(objects::PLOC_MPSOC_HANDLER, mpscoDev, uart::PLOC_MPSOC_BAUD,
mpsoc::MAX_REPLY_SIZE, UartModes::NON_CANONICAL);
mpsocCookie->setNoFixedSizeReply();
auto plocMpsocHelper = new PlocMPSoCHelper(objects::PLOC_MPSOC_HELPER);
new PlocMPSoCHandler(objects::PLOC_MPSOC_HANDLER, objects::UART_COM_IF, mpsocCookie,
plocMpsocHelper, Gpio(gpioIds::ENABLE_MPSOC_UART, dummyGpioIF),
objects::PLOC_SUPERVISOR_HANDLER);
#endif /* OBSW_ADD_PLOC_MPSOC == 1 */
#if OBSW_ADD_PLOC_SUPERVISOR == 1
std::string plocSupvString = "";
auto supervisorCookie =
new UartCookie(objects::PLOC_SUPERVISOR_HANDLER, plocSupvString, uart::PLOC_SUPV_BAUD,
supv::MAX_PACKET_SIZE * 20, UartModes::NON_CANONICAL);
supervisorCookie->setNoFixedSizeReply();
auto supvHelper = new PlocSupvHelper(objects::PLOC_SUPERVISOR_HELPER);
new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, objects::PLOC_SUPERVISOR_HELPER,
supervisorCookie, Gpio(gpioIds::ENABLE_SUPV_UART, dummyGpioIF),
pcdu::PDU1_CH6_PLOC_12V, supvHelper);
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
#endif
dummy::DummyCfg cfg; dummy::DummyCfg cfg;
dummy::createDummies(cfg); dummy::createDummies(cfg);
new TemperatureSensorsDummy(); new TemperatureSensorsDummy();

View File

@ -3,3 +3,4 @@ target_sources(${OBSW_NAME} PUBLIC InitMission.cpp main.cpp gpioInit.cpp
add_subdirectory(boardconfig) add_subdirectory(boardconfig)
add_subdirectory(boardtest) add_subdirectory(boardtest)
add_subdirectory(fsfwconfig)

View File

@ -45,10 +45,8 @@ enum sourceObjects : uint32_t {
ARDUINO_COM_IF = 0x49000000, ARDUINO_COM_IF = 0x49000000,
CSP_COM_IF = 0x49050001, CSP_COM_IF = 0x49050001,
I2C_COM_IF = 0x49040002, I2C_COM_IF = 0x49040002,
UART_COM_IF = 0x49030003,
SPI_MAIN_COM_IF = 0x49020004, SPI_MAIN_COM_IF = 0x49020004,
GPIO_IF = 0x49010005, GPIO_IF = 0x49010005,
SCEX_UART_READER = 0x49010006,
/* Custom device handler */ /* Custom device handler */
SPI_RW_COM_IF = 0x49020005, SPI_RW_COM_IF = 0x49020005,

View File

@ -593,7 +593,6 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwit
auto* camSwitcher = auto* camSwitcher =
new CamSwitcher(objects::CAM_SWITCHER, pwrSwitch, pcdu::PDU2_CH8_PAYLOAD_CAMERA); new CamSwitcher(objects::CAM_SWITCHER, pwrSwitch, pcdu::PDU2_CH8_PAYLOAD_CAMERA);
camSwitcher->connectModeTreeParent(satsystem::pl::SUBSYSTEM); camSwitcher->connectModeTreeParent(satsystem::pl::SUBSYSTEM);
// camSwitcher->
#if OBSW_ADD_PLOC_MPSOC == 1 #if OBSW_ADD_PLOC_MPSOC == 1
consumer << "0x" << std::hex << objects::PLOC_MPSOC_HANDLER; consumer << "0x" << std::hex << objects::PLOC_MPSOC_HANDLER;
auto gpioConfigMPSoC = new GpiodRegularByLineName(q7s::gpioNames::ENABLE_MPSOC_UART, auto gpioConfigMPSoC = new GpiodRegularByLineName(q7s::gpioNames::ENABLE_MPSOC_UART,

View File

@ -1,11 +1,12 @@
#ifndef COMMON_CONFIG_DEVCONF_H_ #ifndef COMMON_CONFIG_DEVCONF_H_
#define COMMON_CONFIG_DEVCONF_H_ #define COMMON_CONFIG_DEVCONF_H_
#include <fsfw_hal/linux/serial/SerialCookie.h>
#include <cstdint> #include <cstdint>
#include "fsfw/timemanager/clockDefinitions.h" #include "fsfw/timemanager/clockDefinitions.h"
#include "fsfw_hal/linux/spi/spiDefinitions.h" #include "fsfw_hal/linux/spi/spiDefinitions.h"
#include "fsfw_hal/linux/uart/UartCookie.h"
/** /**
* SPI configuration will be contained here to let the device handlers remain independent * SPI configuration will be contained here to let the device handlers remain independent

View File

@ -16,6 +16,10 @@ enum commonObjects : uint32_t {
PDEC_HANDLER = 0x50000700, PDEC_HANDLER = 0x50000700,
CCSDS_HANDLER = 0x50000800, CCSDS_HANDLER = 0x50000800,
/* 0x49 ('I') for Communication Interfaces **/
UART_COM_IF = 0x49030003,
SCEX_UART_READER = 0x49010006,
/* 0x43 ('C') for Controllers */ /* 0x43 ('C') for Controllers */
THERMAL_CONTROLLER = 0x43400001, THERMAL_CONTROLLER = 0x43400001,
ACS_CONTROLLER = 0x43000002, ACS_CONTROLLER = 0x43000002,

2
fsfw

@ -1 +1 @@
Subproject commit 2a203ae13d0b872189c0a79147c92312a44c08b1 Subproject commit 39946bff58db7c5ac9016ca3156abb059560d9cb

View File

@ -3,7 +3,6 @@ add_subdirectory(utility)
add_subdirectory(callbacks) add_subdirectory(callbacks)
add_subdirectory(boardtest) add_subdirectory(boardtest)
add_subdirectory(devices) add_subdirectory(devices)
add_subdirectory(fsfwconfig)
add_subdirectory(ipcore) add_subdirectory(ipcore)
target_sources(${OBSW_NAME} PUBLIC ObjectFactory.cpp InitMission.cpp) target_sources(${OBSW_NAME} PUBLIC ObjectFactory.cpp InitMission.cpp)

View File

@ -6,6 +6,7 @@
#include "OBSWConfig.h" #include "OBSWConfig.h"
#include "ObjectFactory.h" #include "ObjectFactory.h"
#include "eive/objects.h"
void scheduling::schedulingScex(TaskFactory& factory, PeriodicTaskIF*& scexDevHandler, void scheduling::schedulingScex(TaskFactory& factory, PeriodicTaskIF*& scexDevHandler,
PeriodicTaskIF*& scexReaderTask) { PeriodicTaskIF*& scexReaderTask) {

View File

@ -5,9 +5,9 @@
#include <fsfw_hal/common/gpio/GpioCookie.h> #include <fsfw_hal/common/gpio/GpioCookie.h>
#include <fsfw_hal/common/gpio/GpioIF.h> #include <fsfw_hal/common/gpio/GpioIF.h>
#include <fsfw_hal/common/gpio/gpioDefinitions.h> #include <fsfw_hal/common/gpio/gpioDefinitions.h>
#include <fsfw_hal/linux/serial/SerialCookie.h>
#include <fsfw_hal/linux/spi/SpiComIF.h> #include <fsfw_hal/linux/spi/SpiComIF.h>
#include <fsfw_hal/linux/spi/SpiCookie.h> #include <fsfw_hal/linux/spi/SpiCookie.h>
#include <fsfw_hal/linux/uart/UartCookie.h>
#include <linux/callbacks/gpioCallbacks.h> #include <linux/callbacks/gpioCallbacks.h>
#include <linux/devices/Max31865RtdLowlevelHandler.h> #include <linux/devices/Max31865RtdLowlevelHandler.h>
#include <mission/controller/AcsController.h> #include <mission/controller/AcsController.h>

View File

@ -333,14 +333,12 @@ void SpiTestClass::performPeriodicMax1227Test() {
} }
void SpiTestClass::performMax1227Test() { void SpiTestClass::performMax1227Test() {
std::string deviceName = "";
#ifdef XIPHOS_Q7S #ifdef XIPHOS_Q7S
std::string deviceName = q7s::SPI_DEFAULT_DEV; std::string deviceName = q7s::SPI_DEFAULT_DEV;
#elif defined(RASPBERRY_PI) #elif defined(RASPBERRY_PI)
std::string deviceName = "";
#elif defined(EGSE) #elif defined(EGSE)
std::string deviceName = "";
#elif defined(TE0720_1CFA) #elif defined(TE0720_1CFA)
std::string deviceName = "";
#endif #endif
int fd = 0; int fd = 0;
UnixFileGuard fileHelper(deviceName, &fd, O_RDWR, "SpiComIF::initializeInterface"); UnixFileGuard fileHelper(deviceName, &fd, O_RDWR, "SpiComIF::initializeInterface");
@ -381,8 +379,9 @@ void SpiTestClass::max1227RadSensorTest(int fd) {
DiffSel::NONE_0); DiffSel::NONE_0);
spiTransferStruct[0].len = 1; spiTransferStruct[0].len = 1;
transfer(fd, gpioIds::CS_RAD_SENSOR); transfer(fd, gpioIds::CS_RAD_SENSOR);
max1227::prepareExternallyClockedRead0ToN(sendBuffer.data(), 7, spiTransferStruct[0].len); size_t tmpSz = spiTransferStruct[0].len;
size_t tmpLen = spiTransferStruct[0].len; max1227::prepareExternallyClockedRead0ToN(sendBuffer.data(), 7, tmpSz);
size_t tmpLen = tmpSz;
spiTransferStruct[0].len = 1; spiTransferStruct[0].len = 1;
transfer(fd, gpioIds::CS_RAD_SENSOR); transfer(fd, gpioIds::CS_RAD_SENSOR);
std::memcpy(sendBuffer.data(), sendBuffer.data() + 1, tmpLen - 1); std::memcpy(sendBuffer.data(), sendBuffer.data() + 1, tmpLen - 1);
@ -403,7 +402,8 @@ void SpiTestClass::max1227RadSensorTest(int fd) {
for (int idx = 0; idx < 8; idx++) { for (int idx = 0; idx < 8; idx++) {
sif::info << "ADC raw " << idx << ": " << adcRaw[idx] << std::endl; sif::info << "ADC raw " << idx << ": " << adcRaw[idx] << std::endl;
} }
max1227::prepareExternallyClockedTemperatureRead(sendBuffer.data(), spiTransferStruct[0].len); tmpSz = spiTransferStruct[0].len;
max1227::prepareExternallyClockedTemperatureRead(sendBuffer.data(), tmpSz);
spiTransferStruct[0].len = 1; spiTransferStruct[0].len = 1;
transfer(fd, gpioIds::CS_RAD_SENSOR); transfer(fd, gpioIds::CS_RAD_SENSOR);
usleep(65); usleep(65);
@ -467,7 +467,8 @@ void SpiTestClass::max1227SusTest(int fd, SusTestCfg &cfg) {
spiTransferStruct[0].len = 1; spiTransferStruct[0].len = 1;
transfer(fd, cfg.gpioId); transfer(fd, cfg.gpioId);
max1227::prepareExternallyClockedRead0ToN(sendBuffer.data(), 5, spiTransferStruct[0].len); size_t tmpSz = spiTransferStruct[0].len;
max1227::prepareExternallyClockedRead0ToN(sendBuffer.data(), 5, tmpSz);
transfer(fd, cfg.gpioId); transfer(fd, cfg.gpioId);
uint16_t adcRaw[6] = {}; uint16_t adcRaw[6] = {};
adcRaw[0] = (recvBuffer[1] << 8) | recvBuffer[2]; adcRaw[0] = (recvBuffer[1] << 8) | recvBuffer[2];
@ -552,10 +553,11 @@ void SpiTestClass::max1227PlPcduTest(int fd) {
spiTransferStruct[0].len = 1; spiTransferStruct[0].len = 1;
transfer(fd, gpioIds::PLPCDU_ADC_CS); transfer(fd, gpioIds::PLPCDU_ADC_CS);
uint8_t n = 11; uint8_t n = 11;
max1227::prepareExternallyClockedRead0ToN(sendBuffer.data(), n, spiTransferStruct[0].len); size_t tmpSz = spiTransferStruct[0].len;
size_t dummy = 0; max1227::prepareExternallyClockedRead0ToN(sendBuffer.data(), n, tmpSz);
max1227::prepareExternallyClockedTemperatureRead(sendBuffer.data() + spiTransferStruct[0].len, max1227::prepareExternallyClockedTemperatureRead(sendBuffer.data() + spiTransferStruct[0].len,
dummy); tmpSz);
spiTransferStruct[0].len = tmpSz;
// + 1 to account for temp conversion byte // + 1 to account for temp conversion byte
spiTransferStruct[0].len += 1; spiTransferStruct[0].len += 1;
transfer(fd, gpioIds::PLPCDU_ADC_CS); transfer(fd, gpioIds::PLPCDU_ADC_CS);
@ -585,9 +587,11 @@ void SpiTestClass::max1227PlPcduTest(int fd) {
spiTransferStruct[0].len = 1; spiTransferStruct[0].len = 1;
transfer(fd, gpioIds::PLPCDU_ADC_CS); transfer(fd, gpioIds::PLPCDU_ADC_CS);
uint8_t n = 11; uint8_t n = 11;
max1227::prepareExternallyClockedRead0ToN(sendBuffer.data(), n, spiTransferStruct[0].len); size_t tmpLen = spiTransferStruct[0].len;
max1227::prepareExternallyClockedRead0ToN(sendBuffer.data(), n, tmpLen);
max1227::prepareExternallyClockedTemperatureRead(sendBuffer.data() + spiTransferStruct[0].len, max1227::prepareExternallyClockedTemperatureRead(sendBuffer.data() + spiTransferStruct[0].len,
spiTransferStruct[0].len); tmpLen);
spiTransferStruct[0].len = tmpLen;
transfer(fd, gpioIds::PLPCDU_ADC_CS); transfer(fd, gpioIds::PLPCDU_ADC_CS);
uint16_t adcRaw[n + 1] = {}; uint16_t adcRaw[n + 1] = {};
for (uint8_t idx = 0; idx < n + 1; idx++) { for (uint8_t idx = 0; idx < n + 1; idx++) {

View File

@ -3,7 +3,7 @@
#include <errno.h> // Error integer and strerror() function #include <errno.h> // Error integer and strerror() function
#include <fcntl.h> // Contains file controls like O_RDWR #include <fcntl.h> // Contains file controls like O_RDWR
#include <fsfw/tasks/TaskFactory.h> #include <fsfw/tasks/TaskFactory.h>
#include <fsfw_hal/linux/uart/UartCookie.h> #include <fsfw_hal/linux/serial/SerialCookie.h>
#include <linux/devices/ScexDleParser.h> #include <linux/devices/ScexDleParser.h>
#include <linux/devices/ScexHelper.h> #include <linux/devices/ScexHelper.h>
#include <linux/devices/ScexUartReader.h> #include <linux/devices/ScexUartReader.h>
@ -13,6 +13,7 @@
#include <string> #include <string>
#include "OBSWConfig.h" #include "OBSWConfig.h"
#include "eive/objects.h"
#include "fsfw/globalfunctions/CRC.h" #include "fsfw/globalfunctions/CRC.h"
#include "fsfw/globalfunctions/DleEncoder.h" #include "fsfw/globalfunctions/DleEncoder.h"
#include "fsfw/globalfunctions/arrayprinter.h" #include "fsfw/globalfunctions/arrayprinter.h"

View File

@ -5,7 +5,7 @@
#include <fsfw/globalfunctions/DleEncoder.h> #include <fsfw/globalfunctions/DleEncoder.h>
#include <fsfw/globalfunctions/DleParser.h> #include <fsfw/globalfunctions/DleParser.h>
#include <fsfw/timemanager/Countdown.h> #include <fsfw/timemanager/Countdown.h>
#include <fsfw_hal/linux/uart/UartCookie.h> #include <fsfw_hal/linux/serial/SerialCookie.h>
#include <termios.h> // Contains POSIX terminal control definitions #include <termios.h> // Contains POSIX terminal control definitions
#include <array> #include <array>

View File

@ -6,7 +6,7 @@
#include <fsfw/ipc/MutexGuard.h> #include <fsfw/ipc/MutexGuard.h>
#include <fsfw/tasks/SemaphoreFactory.h> #include <fsfw/tasks/SemaphoreFactory.h>
#include <fsfw/tasks/TaskFactory.h> #include <fsfw/tasks/TaskFactory.h>
#include <fsfw_hal/linux/uart/UartCookie.h> #include <fsfw_hal/linux/serial/SerialCookie.h>
#include <unistd.h> // write(), read(), close() #include <unistd.h> // write(), read(), close()
#include <cerrno> // Error integer and strerror() function #include <cerrno> // Error integer and strerror() function

View File

@ -1,6 +1,7 @@
#ifndef MPSOC_RETURN_VALUES_IF_H_ #ifndef MPSOC_RETURN_VALUES_IF_H_
#define MPSOC_RETURN_VALUES_IF_H_ #define MPSOC_RETURN_VALUES_IF_H_
#include "eive/resultClassIds.h"
#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/returnvalues/returnvalue.h"
class MPSoCReturnValuesIF { class MPSoCReturnValuesIF {

View File

@ -8,8 +8,10 @@
#include <fsfw/timemanager/Clock.h> #include <fsfw/timemanager/Clock.h>
#include <fsfw/tmtcpacket/ccsds/SpacePacketCreator.h> #include <fsfw/tmtcpacket/ccsds/SpacePacketCreator.h>
#include <fsfw/tmtcpacket/ccsds/SpacePacketReader.h> #include <fsfw/tmtcpacket/ccsds/SpacePacketReader.h>
#include <linux/devices/devicedefinitions/PlocSupervisorDefinitions.h>
#include <optional>
#include "eive/resultClassIds.h"
#include "mission/devices/devicedefinitions/SpBase.h" #include "mission/devices/devicedefinitions/SpBase.h"
namespace supv { namespace supv {

View File

@ -31,7 +31,7 @@ ReturnValue_t PlocMPSoCHandler::initialize() {
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
return result; return result;
} }
uartComIf = dynamic_cast<UartComIF*>(communicationInterface); uartComIf = dynamic_cast<SerialComIF*>(communicationInterface);
if (uartComIf == nullptr) { if (uartComIf == nullptr) {
sif::warning << "PlocMPSoCHandler::initialize: Invalid uart com if" << std::endl; sif::warning << "PlocMPSoCHandler::initialize: Invalid uart com if" << std::endl;
return ObjectManagerIF::CHILD_INIT_FAILED; return ObjectManagerIF::CHILD_INIT_FAILED;

View File

@ -1,6 +1,8 @@
#ifndef BSP_Q7S_DEVICES_PLOC_PLOCMPSOCHANDLER_H_ #ifndef BSP_Q7S_DEVICES_PLOC_PLOCMPSOCHANDLER_H_
#define BSP_Q7S_DEVICES_PLOC_PLOCMPSOCHANDLER_H_ #define BSP_Q7S_DEVICES_PLOC_PLOCMPSOCHANDLER_H_
#include <fsfw_hal/linux/serial/SerialComIF.h>
#include <string> #include <string>
#include "PlocMPSoCHelper.h" #include "PlocMPSoCHelper.h"
@ -10,7 +12,6 @@
#include "fsfw/ipc/QueueFactory.h" #include "fsfw/ipc/QueueFactory.h"
#include "fsfw/tmtcservices/SourceSequenceCounter.h" #include "fsfw/tmtcservices/SourceSequenceCounter.h"
#include "fsfw_hal/linux/gpio/Gpio.h" #include "fsfw_hal/linux/gpio/Gpio.h"
#include "fsfw_hal/linux/uart/UartComIF.h"
#include "linux/devices/devicedefinitions/MPSoCReturnValuesIF.h" #include "linux/devices/devicedefinitions/MPSoCReturnValuesIF.h"
#include "linux/devices/devicedefinitions/PlocMPSoCDefinitions.h" #include "linux/devices/devicedefinitions/PlocMPSoCDefinitions.h"
#include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h" #include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h"
@ -123,7 +124,7 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
*/ */
DeviceCommandId_t nextReplyId = mpsoc::NONE; DeviceCommandId_t nextReplyId = mpsoc::NONE;
UartComIF* uartComIf = nullptr; SerialComIF* uartComIf = nullptr;
PlocMPSoCHelper* plocMPSoCHelper = nullptr; PlocMPSoCHelper* plocMPSoCHelper = nullptr;
Gpio uartIsolatorSwitch; Gpio uartIsolatorSwitch;

View File

@ -57,7 +57,7 @@ ReturnValue_t PlocMPSoCHelper::performOperation(uint8_t operationCode) {
} }
ReturnValue_t PlocMPSoCHelper::setComIF(DeviceCommunicationIF* communicationInterface_) { ReturnValue_t PlocMPSoCHelper::setComIF(DeviceCommunicationIF* communicationInterface_) {
uartComIF = dynamic_cast<UartComIF*>(communicationInterface_); uartComIF = dynamic_cast<SerialComIF*>(communicationInterface_);
if (uartComIF == nullptr) { if (uartComIF == nullptr) {
sif::warning << "PlocMPSoCHelper::initialize: Invalid uart com if" << std::endl; sif::warning << "PlocMPSoCHelper::initialize: Invalid uart com if" << std::endl;
return returnvalue::FAILED; return returnvalue::FAILED;

View File

@ -1,6 +1,8 @@
#ifndef BSP_Q7S_DEVICES_PLOCMPSOCHELPER_H_ #ifndef BSP_Q7S_DEVICES_PLOCMPSOCHELPER_H_
#define BSP_Q7S_DEVICES_PLOCMPSOCHELPER_H_ #define BSP_Q7S_DEVICES_PLOCMPSOCHELPER_H_
#include <fsfw_hal/linux/serial/SerialComIF.h>
#include <string> #include <string>
#include "fsfw/devicehandlers/CookieIF.h" #include "fsfw/devicehandlers/CookieIF.h"
@ -9,7 +11,6 @@
#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/returnvalues/returnvalue.h"
#include "fsfw/tasks/ExecutableObjectIF.h" #include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw/tmtcservices/SourceSequenceCounter.h" #include "fsfw/tmtcservices/SourceSequenceCounter.h"
#include "fsfw_hal/linux/uart/UartComIF.h"
#include "linux/devices/devicedefinitions/PlocMPSoCDefinitions.h" #include "linux/devices/devicedefinitions/PlocMPSoCDefinitions.h"
#ifdef XIPHOS_Q7S #ifdef XIPHOS_Q7S
#include "bsp_q7s/fs/SdCardManager.h" #include "bsp_q7s/fs/SdCardManager.h"
@ -136,7 +137,7 @@ class PlocMPSoCHelper : public SystemObject, public ExecutableObjectIF {
* Communication interface of MPSoC responsible for low level access. Must be set by the * Communication interface of MPSoC responsible for low level access. Must be set by the
* MPSoC Handler. * MPSoC Handler.
*/ */
UartComIF* uartComIF = nullptr; SerialComIF* uartComIF = nullptr;
// Communication cookie. Must be set by the MPSoC Handler // Communication cookie. Must be set by the MPSoC Handler
CookieIF* comCookie = nullptr; CookieIF* comCookie = nullptr;
// Sequence count, must be set by Ploc MPSoC Handler // Sequence count, must be set by Ploc MPSoC Handler

View File

@ -5,7 +5,12 @@
#include <linux/devices/devicedefinitions/PlocSupervisorDefinitions.h> #include <linux/devices/devicedefinitions/PlocSupervisorDefinitions.h>
#include "OBSWConfig.h" #include "OBSWConfig.h"
#ifdef XIPHOS_Q7S
#include "bsp_q7s/fs/SdCardManager.h" #include "bsp_q7s/fs/SdCardManager.h"
#endif
#include "eive/eventSubsystemIds.h"
#include "fsfw/action/ActionHelper.h" #include "fsfw/action/ActionHelper.h"
#include "fsfw/action/CommandActionHelper.h" #include "fsfw/action/CommandActionHelper.h"
#include "fsfw/action/CommandsActionsIF.h" #include "fsfw/action/CommandsActionsIF.h"
@ -13,7 +18,7 @@
#include "fsfw/objectmanager/SystemObject.h" #include "fsfw/objectmanager/SystemObject.h"
#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/returnvalues/returnvalue.h"
#include "fsfw/tasks/ExecutableObjectIF.h" #include "fsfw/tasks/ExecutableObjectIF.h"
#include "linux/fsfwconfig/objects/systemObjectList.h" #include "objects/systemObjectList.h"
/** /**
* @brief Because the buffer of the linux tty driver is limited to 2 x 65535 bytes, this class is * @brief Because the buffer of the linux tty driver is limited to 2 x 65535 bytes, this class is

View File

@ -49,7 +49,7 @@ ReturnValue_t PlocSupervisorHandler::initialize() {
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
return result; return result;
} }
#ifndef TE0720_1CFA #ifdef XIPHOS_Q7S
sdcMan = SdCardManager::instance(); sdcMan = SdCardManager::instance();
#endif /* TE0720_1CFA */ #endif /* TE0720_1CFA */
if (supvHelper == nullptr) { if (supvHelper == nullptr) {
@ -1761,7 +1761,7 @@ ReturnValue_t PlocSupervisorHandler::createMramDumpFile() {
std::string filename = "mram-dump--" + timeStamp + ".bin"; std::string filename = "mram-dump--" + timeStamp + ".bin";
#ifndef TE0720_1CFA #ifdef XIPHOS_Q7S
std::string currentMountPrefix = sdcMan->getCurrentMountPrefix(); std::string currentMountPrefix = sdcMan->getCurrentMountPrefix();
#else #else
std::string currentMountPrefix("/mnt/sd0"); std::string currentMountPrefix("/mnt/sd0");

View File

@ -1,18 +1,21 @@
#ifndef MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_ #ifndef MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_
#define MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_ #define MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_
#include <fsfw_hal/linux/serial/SerialComIF.h>
#include <linux/devices/ploc/PlocSupvUartMan.h> #include <linux/devices/ploc/PlocSupvUartMan.h>
#include "OBSWConfig.h" #include "OBSWConfig.h"
#include "bsp_q7s/fs/SdCardManager.h"
#include "devices/powerSwitcherList.h" #include "devices/powerSwitcherList.h"
#include "fsfw/devicehandlers/DeviceHandlerBase.h" #include "fsfw/devicehandlers/DeviceHandlerBase.h"
#include "fsfw/timemanager/Countdown.h" #include "fsfw/timemanager/Countdown.h"
#include "fsfw_hal/linux/gpio/Gpio.h" #include "fsfw_hal/linux/gpio/Gpio.h"
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h" #include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
#include "fsfw_hal/linux/uart/UartComIF.h"
#include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h" #include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h"
#ifdef XIPHOS_Q7S
#include "bsp_q7s/fs/SdCardManager.h"
#endif
using supv::ExecutionReport; using supv::ExecutionReport;
/** /**
@ -114,7 +117,7 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
*/ */
DeviceCommandId_t nextReplyId = supv::NONE; DeviceCommandId_t nextReplyId = supv::NONE;
UartComIF* uartComIf = nullptr; SerialComIF* uartComIf = nullptr;
LinuxLibgpioIF* gpioComIF = nullptr; LinuxLibgpioIF* gpioComIF = nullptr;
Gpio uartIsolatorSwitch; Gpio uartIsolatorSwitch;
@ -141,9 +144,9 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
/** This buffer is used to concatenate space packets received in two different read steps */ /** This buffer is used to concatenate space packets received in two different read steps */
uint8_t spacePacketBuffer[supv::MAX_PACKET_SIZE]; uint8_t spacePacketBuffer[supv::MAX_PACKET_SIZE];
#ifndef TE0720_1CFA #ifdef XIPHOS_Q7S
SdCardManager* sdcMan = nullptr; SdCardManager* sdcMan = nullptr;
#endif /* BOARD_TE0720 == 0 */ #endif
// Path to supervisor specific files on SD card // Path to supervisor specific files on SD card
std::string supervisorFilePath = "ploc/supervisor"; std::string supervisorFilePath = "ploc/supervisor";

View File

@ -16,9 +16,10 @@
#include "bsp_q7s/fs/SdCardManager.h" #include "bsp_q7s/fs/SdCardManager.h"
#endif #endif
#include <fsfw_hal/linux/serial/helper.h>
#include "fsfw/tasks/TaskFactory.h" #include "fsfw/tasks/TaskFactory.h"
#include "fsfw/timemanager/Countdown.h" #include "fsfw/timemanager/Countdown.h"
#include "fsfw_hal/linux/uart/helper.h"
#include "mission/utility/Filenaming.h" #include "mission/utility/Filenaming.h"
#include "mission/utility/ProgressPrinter.h" #include "mission/utility/ProgressPrinter.h"
#include "mission/utility/Timestamp.h" #include "mission/utility/Timestamp.h"

View File

@ -2,6 +2,7 @@
#define BSP_Q7S_DEVICES_PLOCSUPVHELPER_H_ #define BSP_Q7S_DEVICES_PLOCSUPVHELPER_H_
#include <fsfw/container/SimpleRingBuffer.h> #include <fsfw/container/SimpleRingBuffer.h>
#include <fsfw_hal/linux/serial/SerialComIF.h>
#include <termios.h> #include <termios.h>
#include <string> #include <string>
@ -13,7 +14,6 @@
#include "fsfw/osal/linux/BinarySemaphore.h" #include "fsfw/osal/linux/BinarySemaphore.h"
#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/returnvalues/returnvalue.h"
#include "fsfw/tasks/ExecutableObjectIF.h" #include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw_hal/linux/uart/UartComIF.h"
#include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h" #include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h"
#ifdef XIPHOS_Q7S #ifdef XIPHOS_Q7S

View File

@ -1,6 +1,7 @@
#ifndef BSP_Q7S_DEVICES_ARCSECDATALINKLAYER_H_ #ifndef BSP_Q7S_DEVICES_ARCSECDATALINKLAYER_H_
#define BSP_Q7S_DEVICES_ARCSECDATALINKLAYER_H_ #define BSP_Q7S_DEVICES_ARCSECDATALINKLAYER_H_
#include "eive/resultClassIds.h"
#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/returnvalues/returnvalue.h"
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h" #include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"

View File

@ -5,6 +5,7 @@
#include <fstream> #include <fstream>
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
#include "eive/resultClassIds.h"
#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/returnvalues/returnvalue.h"
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h" #include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"

View File

@ -1591,7 +1591,7 @@ void StarTrackerHandler::preparePowerRequest() {
void StarTrackerHandler::prepareSwitchToBootloaderCmd() { void StarTrackerHandler::prepareSwitchToBootloaderCmd() {
uint32_t length = 0; uint32_t length = 0;
struct RebootActionRequest rebootReq; struct RebootActionRequest rebootReq {};
arc_pack_reboot_action_req(&rebootReq, commandBuffer, &length); arc_pack_reboot_action_req(&rebootReq, commandBuffer, &length);
dataLinkLayer.encodeFrame(commandBuffer, length); dataLinkLayer.encodeFrame(commandBuffer, length);
rawPacket = dataLinkLayer.getEncodedFrame(); rawPacket = dataLinkLayer.getEncodedFrame();

View File

@ -85,7 +85,7 @@ ReturnValue_t StrHelper::performOperation(uint8_t operationCode) {
} }
ReturnValue_t StrHelper::setComIF(DeviceCommunicationIF* communicationInterface_) { ReturnValue_t StrHelper::setComIF(DeviceCommunicationIF* communicationInterface_) {
uartComIF = dynamic_cast<UartComIF*>(communicationInterface_); uartComIF = dynamic_cast<SerialComIF*>(communicationInterface_);
if (uartComIF == nullptr) { if (uartComIF == nullptr) {
sif::warning << "StrHelper::initialize: Invalid uart com if" << std::endl; sif::warning << "StrHelper::initialize: Invalid uart com if" << std::endl;
return returnvalue::FAILED; return returnvalue::FAILED;

View File

@ -10,12 +10,13 @@
#include "bsp_q7s/fs/SdCardManager.h" #include "bsp_q7s/fs/SdCardManager.h"
#endif #endif
#include <fsfw_hal/linux/serial/SerialComIF.h>
#include "fsfw/devicehandlers/CookieIF.h" #include "fsfw/devicehandlers/CookieIF.h"
#include "fsfw/objectmanager/SystemObject.h" #include "fsfw/objectmanager/SystemObject.h"
#include "fsfw/osal/linux/BinarySemaphore.h" #include "fsfw/osal/linux/BinarySemaphore.h"
#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/returnvalues/returnvalue.h"
#include "fsfw/tasks/ExecutableObjectIF.h" #include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw_hal/linux/uart/UartComIF.h"
extern "C" { extern "C" {
#include "thirdparty/arcsec_star_tracker/client/generated/actionreq.h" #include "thirdparty/arcsec_star_tracker/client/generated/actionreq.h"
@ -255,7 +256,7 @@ class StrHelper : public SystemObject, public ExecutableObjectIF {
* UART communication object responsible for low level access of star tracker * UART communication object responsible for low level access of star tracker
* Must be set by star tracker handler * Must be set by star tracker handler
*/ */
UartComIF* uartComIF = nullptr; SerialComIF* uartComIF = nullptr;
// Communication cookie. Must be set by the star tracker handler // Communication cookie. Must be set by the star tracker handler
CookieIF* comCookie = nullptr; CookieIF* comCookie = nullptr;

View File

@ -1 +0,0 @@
#include "addresses.h"