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

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

View File

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

View File

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

View File

@ -19,7 +19,7 @@ class FreshMpsocHandler : public FreshDeviceHandlerBase, public CommandsActionsI
enum OpCode { DEFAULT_OPERATION = 0, PARSE_TM = 1 };
FreshMpsocHandler(DhbConfig cfg, MpsocCommunication& comInterface,
PlocMpsocSpecialComHelper* plocMPSoCHelper, Gpio uartIsolatorSwitch,
PlocMpsocSpecialComHelper& specialComHelper, Gpio uartIsolatorSwitch,
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 };
bool transitionActive = false;
MpsocCommunication comInterface;
MpsocCommunication& comInterface;
PlocMpsocSpecialComHelper& specialComHelper;
MessageQueueIF* eventQueue = nullptr;
PlocMpsocSpecialComHelper* specialComHelper;
SourceSequenceCounter commandSequenceCount = SourceSequenceCounter(0);
MessageQueueIF* commandActionHelperQueue = nullptr;
CommandActionHelper commandActionHelper;