need to fix some linker errors..
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
Robin Müller 2024-04-16 15:33:42 +02:00
parent 97433359c2
commit 9477d04008
4 changed files with 29 additions and 24 deletions

View File

@ -10,9 +10,10 @@
#include <linux/acs/RwPollingTask.h> #include <linux/acs/RwPollingTask.h>
#include <linux/acs/StrComHandler.h> #include <linux/acs/StrComHandler.h>
#include <linux/com/SyrlinksComHandler.h> #include <linux/com/SyrlinksComHandler.h>
#include <linux/payload/FreshMpsocHandler.h>
#include <linux/payload/MpsocCommunication.h>
#include <linux/payload/PlocMemoryDumper.h> #include <linux/payload/PlocMemoryDumper.h>
#include <linux/payload/PlocMpsocHandler.h> #include <linux/payload/PlocMpsocSpecialComHelper.h>
#include <linux/payload/PlocMpsocSpecialComHelperLegacy.h>
#include <linux/payload/ScexUartReader.h> #include <linux/payload/ScexUartReader.h>
#include <linux/payload/plocMpsocHelpers.h> #include <linux/payload/plocMpsocHelpers.h>
#include <linux/power/CspComIF.h> #include <linux/power/CspComIF.h>
@ -47,6 +48,7 @@
#include "devices/gpioIds.h" #include "devices/gpioIds.h"
#include "devices/powerSwitcherList.h" #include "devices/powerSwitcherList.h"
#include "eive/definitions.h" #include "eive/definitions.h"
#include "eive/objects.h"
#include "fsfw/ipc/QueueFactory.h" #include "fsfw/ipc/QueueFactory.h"
#include "linux/ObjectFactory.h" #include "linux/ObjectFactory.h"
#include "linux/boardtest/I2cTestClass.h" #include "linux/boardtest/I2cTestClass.h"
@ -59,6 +61,9 @@
#include "linux/ipcore/Ptme.h" #include "linux/ipcore/Ptme.h"
#include "linux/ipcore/PtmeConfig.h" #include "linux/ipcore/PtmeConfig.h"
#include "linux/payload/FreshSupvHandler.h" #include "linux/payload/FreshSupvHandler.h"
#include "linux/payload/MpsocCommunication.h"
#include "linux/payload/PlocMpsocSpecialComHelper.h"
#include "linux/payload/SerialConfig.h"
#include "mission/config/configfile.h" #include "mission/config/configfile.h"
#include "mission/system/acs/AcsBoardFdir.h" #include "mission/system/acs/AcsBoardFdir.h"
#include "mission/system/acs/AcsSubsystem.h" #include "mission/system/acs/AcsSubsystem.h"
@ -624,14 +629,15 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwit
auto mpsocGpioCookie = new GpioCookie; auto mpsocGpioCookie = new GpioCookie;
mpsocGpioCookie->addGpio(gpioIds::ENABLE_MPSOC_UART, gpioConfigMPSoC); mpsocGpioCookie->addGpio(gpioIds::ENABLE_MPSOC_UART, gpioConfigMPSoC);
gpioChecker(gpioComIF->addGpios(mpsocGpioCookie), "PLOC MPSoC"); gpioChecker(gpioComIF->addGpios(mpsocGpioCookie), "PLOC MPSoC");
auto mpsocCookie = SerialConfig serialCfg(q7s::UART_PLOC_MPSOC_DEV, serial::PLOC_MPSOC_BAUD, mpsoc::MAX_REPLY_SIZE,
new SerialCookie(objects::PLOC_MPSOC_HANDLER, q7s::UART_PLOC_MPSOC_DEV, UartModes::NON_CANONICAL);
serial::PLOC_MPSOC_BAUD, mpsoc::MAX_REPLY_SIZE, UartModes::NON_CANONICAL); auto mpsocCommunication = new MpsocCommunication(objects::PLOC_MPSOC_COMMUNICATION, serialCfg);
mpsocCookie->setNoFixedSizeReply(); auto specialComHelper =
auto plocMpsocHelper = new PlocMpsocSpecialComHelperLegacy(objects::PLOC_MPSOC_HELPER); new PlocMpsocSpecialComHelper(objects::PLOC_MPSOC_HELPER, *mpsocCommunication);
auto* mpsocHandler = new PlocMpsocHandler( DhbConfig dhbConf(objects::PLOC_MPSOC_HANDLER);
objects::PLOC_MPSOC_HANDLER, objects::UART_COM_IF, mpsocCookie, plocMpsocHelper, auto* mpsocHandler = new FreshMpsocHandler(dhbConf, *mpsocCommunication, *specialComHelper,
Gpio(gpioIds::ENABLE_MPSOC_UART, gpioComIF), objects::PLOC_SUPERVISOR_HANDLER); Gpio(gpioIds::ENABLE_MPSOC_UART, gpioComIF),
objects::PLOC_SUPERVISOR_HANDLER);
mpsocHandler->connectModeTreeParent(satsystem::payload::SUBSYSTEM); mpsocHandler->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
#endif /* OBSW_ADD_PLOC_MPSOC == 1 */ #endif /* OBSW_ADD_PLOC_MPSOC == 1 */
#if OBSW_ADD_PLOC_SUPERVISOR == 1 #if OBSW_ADD_PLOC_SUPERVISOR == 1
@ -650,7 +656,7 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwit
supv::MAX_PACKET_SIZE * 20, UartModes::NON_CANONICAL); supv::MAX_PACKET_SIZE * 20, UartModes::NON_CANONICAL);
supervisorCookie->setNoFixedSizeReply(); supervisorCookie->setNoFixedSizeReply();
new PlocSupvUartManager(objects::PLOC_SUPERVISOR_HELPER); new PlocSupvUartManager(objects::PLOC_SUPERVISOR_HELPER);
DhbConfig dhbConf(objects::PLOC_SUPERVISOR_HANDLER); dhbConf = DhbConfig(objects::PLOC_SUPERVISOR_HANDLER);
auto* supvHandler = auto* supvHandler =
new FreshSupvHandler(dhbConf, supervisorCookie, Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF), new FreshSupvHandler(dhbConf, supervisorCookie, Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF),
pwrSwitcher, power::PDU1_CH6_PLOC_12V); pwrSwitcher, power::PDU1_CH6_PLOC_12V);

View File

@ -77,6 +77,7 @@ enum commonObjects : uint32_t {
PLOC_MPSOC_HANDLER = 0x44330015, PLOC_MPSOC_HANDLER = 0x44330015,
PLOC_SUPERVISOR_HANDLER = 0x44330016, PLOC_SUPERVISOR_HANDLER = 0x44330016,
PLOC_SUPERVISOR_HELPER = 0x44330017, PLOC_SUPERVISOR_HELPER = 0x44330017,
PLOC_MPSOC_COMMUNICATION = 0x44330018,
SCEX = 0x44330032, SCEX = 0x44330032,
SOLAR_ARRAY_DEPL_HANDLER = 0x444100A2, SOLAR_ARRAY_DEPL_HANDLER = 0x444100A2,
HEATER_HANDLER = 0x444100A4, HEATER_HANDLER = 0x444100A4,

View File

@ -13,7 +13,7 @@
#include "linux/payload/plocSupvDefs.h" #include "linux/payload/plocSupvDefs.h"
FreshMpsocHandler::FreshMpsocHandler(DhbConfig cfg, MpsocCommunication& comInterface, FreshMpsocHandler::FreshMpsocHandler(DhbConfig cfg, MpsocCommunication& comInterface,
PlocMpsocSpecialComHelper* specialComHelper, PlocMpsocSpecialComHelper& specialComHelper,
Gpio uartIsolatorSwitch, object_id_t supervisorHandler) Gpio uartIsolatorSwitch, object_id_t supervisorHandler)
: FreshDeviceHandlerBase(cfg), : FreshDeviceHandlerBase(cfg),
comInterface(comInterface), comInterface(comInterface),
@ -142,7 +142,7 @@ ReturnValue_t FreshMpsocHandler::initialize() {
return ObjectManagerIF::CHILD_INIT_FAILED; return ObjectManagerIF::CHILD_INIT_FAILED;
} }
specialComHelper->setSequenceCount(&commandSequenceCount); specialComHelper.setSequenceCount(&commandSequenceCount);
result = commandActionHelper.initialize(); result = commandActionHelper.initialize();
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
return ObjectManagerIF::CHILD_INIT_FAILED; return ObjectManagerIF::CHILD_INIT_FAILED;
@ -235,7 +235,7 @@ ReturnValue_t FreshMpsocHandler::executeAction(ActionId_t actionId, MessageQueue
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
return result; return result;
} }
result = specialComHelper->startFlashWrite(flashWritePusCmd.getObcFile(), result = specialComHelper.startFlashWrite(flashWritePusCmd.getObcFile(),
flashWritePusCmd.getMPSoCFile()); flashWritePusCmd.getMPSoCFile());
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
return result; return result;
@ -249,7 +249,7 @@ ReturnValue_t FreshMpsocHandler::executeAction(ActionId_t actionId, MessageQueue
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
return result; return result;
} }
result = specialComHelper->startFlashRead(flashReadPusCmd.getObcFile(), result = specialComHelper.startFlashRead(flashReadPusCmd.getObcFile(),
flashReadPusCmd.getMPSoCFile(), flashReadPusCmd.getMPSoCFile(),
flashReadPusCmd.getReadSize()); flashReadPusCmd.getReadSize());
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
@ -1101,8 +1101,6 @@ bool FreshMpsocHandler::handleHwShutdown() {
} }
void FreshMpsocHandler::stopSpecialComHelper() { void FreshMpsocHandler::stopSpecialComHelper() {
if (specialComHelper != nullptr) { specialComHelper.stopProcess();
specialComHelper->stopProcess();
}
specialComHelperExecuting = false; specialComHelperExecuting = false;
} }

View File

@ -19,7 +19,7 @@ class FreshMpsocHandler : public FreshDeviceHandlerBase, public CommandsActionsI
enum OpCode { DEFAULT_OPERATION = 0, PARSE_TM = 1 }; enum OpCode { DEFAULT_OPERATION = 0, PARSE_TM = 1 };
FreshMpsocHandler(DhbConfig cfg, MpsocCommunication& comInterface, FreshMpsocHandler(DhbConfig cfg, MpsocCommunication& comInterface,
PlocMpsocSpecialComHelper* plocMPSoCHelper, Gpio uartIsolatorSwitch, PlocMpsocSpecialComHelper& specialComHelper, Gpio uartIsolatorSwitch,
object_id_t supervisorHandler); object_id_t supervisorHandler);
/** /**
@ -44,9 +44,9 @@ class FreshMpsocHandler : public FreshDeviceHandlerBase, public CommandsActionsI
enum class PowerState { IDLE, PENDING_STARTUP, PENDING_SHUTDOWN, SUPV_FAILED, DONE }; enum class PowerState { IDLE, PENDING_STARTUP, PENDING_SHUTDOWN, SUPV_FAILED, DONE };
bool transitionActive = false; bool transitionActive = false;
MpsocCommunication comInterface; MpsocCommunication& comInterface;
PlocMpsocSpecialComHelper& specialComHelper;
MessageQueueIF* eventQueue = nullptr; MessageQueueIF* eventQueue = nullptr;
PlocMpsocSpecialComHelper* specialComHelper;
SourceSequenceCounter commandSequenceCount = SourceSequenceCounter(0); SourceSequenceCounter commandSequenceCount = SourceSequenceCounter(0);
MessageQueueIF* commandActionHelperQueue = nullptr; MessageQueueIF* commandActionHelperQueue = nullptr;
CommandActionHelper commandActionHelper; CommandActionHelper commandActionHelper;