Added new payload PST
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit

This commit is contained in:
Robin Müller 2023-11-14 13:25:53 +01:00
parent bd4449d7dd
commit bb20def961
11 changed files with 39 additions and 13 deletions

View File

@ -13,7 +13,6 @@
#include <linux/payload/PlocMemoryDumper.h> #include <linux/payload/PlocMemoryDumper.h>
#include <linux/payload/PlocMpsocHandler.h> #include <linux/payload/PlocMpsocHandler.h>
#include <linux/payload/PlocMpsocSpecialComHelper.h> #include <linux/payload/PlocMpsocSpecialComHelper.h>
#include <linux/payload/PlocSupervisorHandler.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>
@ -60,6 +59,7 @@
#include "linux/ipcore/PdecHandler.h" #include "linux/ipcore/PdecHandler.h"
#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 "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"
@ -651,10 +651,11 @@ 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();
auto supvHelper = new PlocSupvUartManager(objects::PLOC_SUPERVISOR_HELPER); auto supvHelper = new PlocSupvUartManager(objects::PLOC_SUPERVISOR_HELPER);
auto* supvHandler = new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, supervisorCookie,
Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF), DhbConfig dhbConf(objects::PLOC_SUPERVISOR_HANDLER);
power::PDU1_CH6_PLOC_12V, *supvHelper); auto* supvHandler =
supvHandler->setPowerSwitcher(&pwrSwitch); new FreshSupvHandler(dhbConf, supervisorCookie, Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF),
pwrSwitch, power::PDU1_CH6_PLOC_12V, *supvHelper);
supvHandler->connectModeTreeParent(satsystem::payload::SUBSYSTEM); supvHandler->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */ #endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
static_cast<void>(consumer); static_cast<void>(consumer);

View File

@ -383,11 +383,12 @@ void scheduling::initTasks() {
} }
#endif /* OBSW_ADD_PLOC_SUPERVISOR */ #endif /* OBSW_ADD_PLOC_SUPERVISOR */
PeriodicTaskIF* plTask = factory->createPeriodicTask( FixedTimeslotTaskIF* plTask = factory->createFixedTimeslotTask(
"PL_TASK", 25, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.5, missedDeadlineFunc, &RR_SCHEDULING); "PL_TASK", 25, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.5, missedDeadlineFunc, &RR_SCHEDULING);
plTask->addComponent(objects::CAM_SWITCHER); // plTask->addComponent(objects::CAM_SWITCHER);
scheduling::addMpsocSupvHandlers(plTask); // scheduling::addMpsocSupvHandlers(plTask);
scheduling::scheduleScexDev(plTask); // scheduling::scheduleScexDev(plTask);
pst::pstPayload(plTask);
#if OBSW_ADD_SCEX_DEVICE == 1 #if OBSW_ADD_SCEX_DEVICE == 1
PeriodicTaskIF* scexReaderTask; PeriodicTaskIF* scexReaderTask;

View File

@ -5,7 +5,6 @@ target_sources(
FreshSupvHandler.cpp FreshSupvHandler.cpp
PlocMpsocSpecialComHelper.cpp PlocMpsocSpecialComHelper.cpp
plocMpsocHelpers.cpp plocMpsocHelpers.cpp
PlocSupervisorHandler.cpp
PlocSupvUartMan.cpp PlocSupvUartMan.cpp
ScexDleParser.cpp ScexDleParser.cpp
ScexHelper.cpp ScexHelper.cpp

View File

@ -82,7 +82,7 @@ void FreshSupvHandler::performDeviceOperation(uint8_t opCode) {
} }
} }
} }
} else if (opCode == OpCode::HANDLE_ACTIVE_CMDS) { } else if (opCode == OpCode::PARSE_TM) {
std::vector<ActionId_t> cmdsToRemove; std::vector<ActionId_t> cmdsToRemove;
for (auto& activeCmd : activeActionCmds) { for (auto& activeCmd : activeActionCmds) {
if (activeCmd.second.cmdCountdown.hasTimedOut()) { if (activeCmd.second.cmdCountdown.hasTimedOut()) {

View File

@ -19,7 +19,7 @@ static constexpr bool REDUCE_NORMAL_MODE_PRINTOUT = true;
class FreshSupvHandler : public FreshDeviceHandlerBase { class FreshSupvHandler : public FreshDeviceHandlerBase {
public: public:
enum OpCode { DEFAULT_OPERATION = 0, HANDLE_ACTIVE_CMDS = 1 }; enum OpCode { DEFAULT_OPERATION = 0, PARSE_TM = 1 };
FreshSupvHandler(DhbConfig cfg, CookieIF* comCookie, Gpio uartIsolatorSwitch, FreshSupvHandler(DhbConfig cfg, CookieIF* comCookie, Gpio uartIsolatorSwitch,
PowerSwitchIF& switchIF, power::Switch_t powerSwitch, PowerSwitchIF& switchIF, power::Switch_t powerSwitch,

View File

@ -24,6 +24,7 @@
#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"
#include "tas/crc.h"
using namespace returnvalue; using namespace returnvalue;
using namespace supv; using namespace supv;

View File

@ -16,7 +16,6 @@
#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/returnvalues/returnvalue.h"
#include "fsfw/tasks/ExecutableObjectIF.h" #include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw_hal/linux/serial/SerialComIF.h" #include "fsfw_hal/linux/serial/SerialComIF.h"
#include "tas/crc.h"
#ifdef XIPHOS_Q7S #ifdef XIPHOS_Q7S
#include "bsp_q7s/fs/SdCardManager.h" #include "bsp_q7s/fs/SdCardManager.h"

View File

@ -9,6 +9,8 @@
#include "OBSWConfig.h" #include "OBSWConfig.h"
#include "eive/definitions.h" #include "eive/definitions.h"
#include "eive/objects.h"
#include "linux/payload/FreshSupvHandler.h"
#ifndef RPI_TEST_ADIS16507 #ifndef RPI_TEST_ADIS16507
#define RPI_TEST_ADIS16507 0 #define RPI_TEST_ADIS16507 0
@ -608,3 +610,24 @@ ReturnValue_t pst::pstTcsAndAcs(FixedTimeslotTaskIF *thisSequence, AcsPstCfg cfg
0); 0);
return returnvalue::OK; return returnvalue::OK;
} }
ReturnValue_t pst::pstPayload(FixedTimeslotTaskIF *thisSequence) {
uint32_t length = thisSequence->getPeriodMs();
thisSequence->addSlot(objects::CAM_SWITCHER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::PLOC_SUPERVISOR_HANDLER, length * 0,
FreshSupvHandler::OpCode::DEFAULT_OPERATION);
thisSequence->addSlot(objects::PLOC_SUPERVISOR_HANDLER, length * 0.1,
FreshSupvHandler::OpCode::PARSE_TM);
thisSequence->addSlot(objects::PLOC_SUPERVISOR_HANDLER, length * 0.2,
FreshSupvHandler::OpCode::PARSE_TM);
static_cast<void>(length);
return thisSequence->checkSequence();
}

View File

@ -63,6 +63,8 @@ ReturnValue_t pstTcsAndAcs(FixedTimeslotTaskIF* thisSequence, AcsPstCfg cfg);
ReturnValue_t pstI2c(TmpSchedConfig schedConf, FixedTimeslotTaskIF* thisSequence); ReturnValue_t pstI2c(TmpSchedConfig schedConf, FixedTimeslotTaskIF* thisSequence);
ReturnValue_t pstPayload(FixedTimeslotTaskIF* thisSequence);
/** /**
* Generic test PST * Generic test PST
* @param thisSequence * @param thisSequence