added ploc helper objects

This commit is contained in:
Jakob Meier 2022-03-16 17:00:07 +01:00
parent 8bf91f2645
commit b0b2854d44
4 changed files with 39 additions and 26 deletions

View File

@ -145,6 +145,15 @@ void initmission::initTasks() {
#endif /* BOARD_TE0720 */
#if OBSW_ADD_PLOC_MPSOC == 1
PeriodicTaskIF* mpsocHelperTask = factory->createPeriodicTask(
"PLOC_MPSOC_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
result = mpsocHelperTask->addComponent(objects::PLOC_MPSOC_HELPER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PLOC_MPSOC_HELPER", objects::PLOC_MPSOC_HELPER);
}
#endif /* OBSW_ADD_PLOC_MPSOC */
#if OBSW_TEST_CCSDS_BRIDGE == 1
PeriodicTaskIF* ptmeTestTask = factory->createPeriodicTask(
"PTME_TEST", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
@ -393,23 +402,23 @@ void initmission::createTestTasks(TaskFactory& factory,
}
/**
â â
âŒâ∠ââââŒ
âŒââ∠ââââââ?
â?ââââââââââââââââââ?
âââââââââââââââˆââââˆââ?
âââââââââââââââââââˆâˆâââŒ
â?ââââââââââââââââââââââââŒ
âŒâââŒâˆâââââââââˆâââââââââˆââ?
â?ââââââââââââŒâˆâˆââââââââââââŒ
âŒââââˆâˆâââââââââââââââââââââŒ
âŒâââ?ââˆââˆâŒâââââââââââââââââââ?
â?âââ?ââ?âââââââââââââââââââââââŒ
â?âââââââââââââââââââââââââââ?
âŒââââââââââââââââââââââââââŒ
â?âââââââââââââââââââââââââ?
âââââââââââââââââââââââââŒ
ââââââââââââââââââââââ
ââââââââââââââââââ
ââââââââââââ
**/

View File

@ -17,6 +17,7 @@
#include "bsp_q7s/devices/ploc/PlocSupervisorHandler.h"
#include "bsp_q7s/devices/ploc/PlocUpdater.h"
#include "bsp_q7s/devices/ploc/PlocMPSoCHandler.h"
#include "bsp_q7s/devices/ploc/PlocMPSoCHelper.h"
#include "bsp_q7s/devices/devicedefinitions/PlocMPSoCDefinitions.h"
#include "bsp_q7s/memory/FileSystemHandler.h"
#include "busConf.h"
@ -175,7 +176,7 @@ void ObjectFactory::produce(void* args) {
#if OBSW_ADD_PLOC_MPSOC == 1
UartCookie* plocMpsocCookie =
new UartCookie(objects::PLOC_MPSOC_HANDLER, q7s::UART_PLOC_MPSOC_DEV,
UartModes::NON_CANONICAL, uart::PLOC_MPSOC_BAUD, PLOC_MPSOC::MAX_REPLY_SIZE);
UartModes::NON_CANONICAL, uart::PLOC_MPSOC_BAUD, mpsoc::MAX_REPLY_SIZE);
new PlocMPSoCHandler(objects::PLOC_MPSOC_HANDLER, objects::UART_COM_IF, plocMpsocCookie);
#endif /* OBSW_ADD_PLOC_MPSOC == 1 */
@ -1288,12 +1289,14 @@ void ObjectFactory::createTestComponents(LinuxLibgpioIF* gpioComIF) {
#endif
#if BOARD_TE0720 == 1 && OBSW_ADD_PLOC_MPSOC == 1
UartCookie* plocUartCookie =
new UartCookie(std::string("/dev/ttyPS1"), 115200, PLOC_MPSOC::MAX_REPLY_SIZE);
UartCookie* mpsocUartCookie =
new UartCookie(objects::PLOC_MPSOC_HANDLER, std::string("/dev/ttyPS2"),
UartModes::NON_CANONICAL, 115200, mpsoc::MAX_REPLY_SIZE);
/* Testing PlocMPSoCHandler on TE0720-03-1CFA */
PlocMPSoCHandler* mpsocPlocHandler =
new PlocMPSoCHandler(objects::PLOC_MPSOC_HANDLER, objects::UART_COM_IF, plocUartCookie);
mpsocPlocHandler->setStartUpImmediately();
PlocMPSoCHelper* plocMpsocHelper = new PlocMPSoCHelper(objects::PLOC_MPSOC_HELPER);
PlocMPSoCHandler* plocMPSoCHandler = new PlocMPSoCHandler(
objects::PLOC_MPSOC_HANDLER, objects::UART_COM_IF, mpsocUartCookie, plocMpsocHelper);
plocMPSoCHandler->setStartUpImmediately();
#endif
#if BOARD_TE0720 == 1 && OBSW_TEST_TE7020_HEATER == 1

View File

@ -128,7 +128,7 @@ ReturnValue_t PlocMPSoCHelper::flashfopen() {
ReturnValue_t result = RETURN_OK;
(*sequenceCount)++;
mpsoc::FlashFopen flashFopen(*sequenceCount);
result = flashFopen.createPacket(flashWrite.file);
result = flashFopen.createPacket(flashWrite.file, mpsoc::FlashFopen::APPEND);
if (result != RETURN_OK) {
return result;
}

View File

@ -42,6 +42,7 @@ enum commonObjects: uint32_t {
IMTQ_HANDLER = 0x44140014,
PLOC_MPSOC_HANDLER = 0x44330015,
PLOC_SUPERVISOR_HANDLER = 0x44330016,
PLOC_SUPERVISOR_HELPER = 0x44330017,
/**
* Not yet specified which pt1000 will measure which device/location in the satellite.