Thermal controller and temperature bugfixes #266

Merged
muellerr merged 40 commits from meier/thermal-bugfixes into develop 2022-06-20 09:43:04 +02:00
41 changed files with 469 additions and 450 deletions
Showing only changes of commit 89757c447c - Show all commits

View File

@ -434,8 +434,7 @@ endif()
target_link_libraries(${LIB_EIVE_MISSION} target_link_libraries(${LIB_EIVE_MISSION}
PUBLIC ${LIB_FSFW_NAME} ${LIB_LWGPS_NAME} ${LIB_OS_NAME}) PUBLIC ${LIB_FSFW_NAME} ${LIB_LWGPS_NAME} ${LIB_OS_NAME})
target_link_libraries(${LIB_DUMMIES} target_link_libraries(${LIB_DUMMIES} PUBLIC ${LIB_FSFW_NAME} ${LIB_JSON_NAME})
PUBLIC ${LIB_FSFW_NAME} ${LIB_JSON_NAME})
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_EIVE_MISSION} ${LIB_DUMMIES}) target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_EIVE_MISSION} ${LIB_DUMMIES})

View File

@ -1,6 +1,7 @@
#include "InitMission.h" #include "InitMission.h"
#include <OBSWConfig.h> #include <OBSWConfig.h>
#include <bsp_hosted/fsfwconfig/pollingsequence/DummyPst.h>
#include <fsfw/objectmanager/ObjectManager.h> #include <fsfw/objectmanager/ObjectManager.h>
#include <fsfw/objectmanager/ObjectManagerIF.h> #include <fsfw/objectmanager/ObjectManagerIF.h>
#include <fsfw/returnvalues/HasReturnvaluesIF.h> #include <fsfw/returnvalues/HasReturnvaluesIF.h>
@ -9,7 +10,6 @@
#include <fsfw/tasks/PeriodicTaskIF.h> #include <fsfw/tasks/PeriodicTaskIF.h>
#include <fsfw/tasks/TaskFactory.h> #include <fsfw/tasks/TaskFactory.h>
#include <mission/utility/InitMission.h> #include <mission/utility/InitMission.h>
#include <bsp_hosted/fsfwconfig/pollingsequence/DummyPst.h>
#include <iostream> #include <iostream>

View File

@ -2,10 +2,10 @@
#include <fsfw/tmtcservices/CommandingServiceBase.h> #include <fsfw/tmtcservices/CommandingServiceBase.h>
#include <fsfw/tmtcservices/PusServiceBase.h> #include <fsfw/tmtcservices/PusServiceBase.h>
#include <mission/controller/ThermalController.h>
#include <mission/core/GenericFactory.h> #include <mission/core/GenericFactory.h>
#include <mission/utility/TmFunnel.h> #include <mission/utility/TmFunnel.h>
#include <objects/systemObjectList.h> #include <objects/systemObjectList.h>
#include <mission/controller/ThermalController.h>
#include <tmtc/apid.h> #include <tmtc/apid.h>
#include <tmtc/pusIds.h> #include <tmtc/pusIds.h>
@ -26,23 +26,23 @@
#include <test/testtasks/TestTask.h> #include <test/testtasks/TestTask.h>
#endif #endif
#include <dummies/TemperatureSensorsDummy.h>
#include <dummies/SusDummy.h>
#include <dummies/BpxDummy.h>
#include <dummies/RwDummy.h>
#include <dummies/StarTrackerDummy.h>
#include <dummies/SyrlinksDummy.h>
#include <dummies/ImtqDummy.h>
#include <dummies/AcuDummy.h> #include <dummies/AcuDummy.h>
#include <dummies/PduDummy.h> #include <dummies/BpxDummy.h>
#include <dummies/P60DockDummy.h> #include <dummies/ComCookieDummy.h>
#include <dummies/ComIFDummy.h>
#include <dummies/CoreControllerDummy.h>
#include <dummies/GyroAdisDummy.h> #include <dummies/GyroAdisDummy.h>
#include <dummies/GyroL3GD20Dummy.h> #include <dummies/GyroL3GD20Dummy.h>
#include <dummies/ImtqDummy.h>
#include <dummies/MgmLIS3MDLDummy.h> #include <dummies/MgmLIS3MDLDummy.h>
#include <dummies/P60DockDummy.h>
#include <dummies/PduDummy.h>
#include <dummies/PlPcduDummy.h> #include <dummies/PlPcduDummy.h>
#include <dummies/CoreControllerDummy.h> #include <dummies/RwDummy.h>
#include <dummies/ComIFDummy.h> #include <dummies/StarTrackerDummy.h>
#include <dummies/ComCookieDummy.h> #include <dummies/SusDummy.h>
#include <dummies/SyrlinksDummy.h>
#include <dummies/TemperatureSensorsDummy.h>
void Factory::setStaticFrameworkObjectIds() { void Factory::setStaticFrameworkObjectIds() {
PusServiceBase::packetSource = objects::PUS_PACKET_DISTRIBUTOR; PusServiceBase::packetSource = objects::PUS_PACKET_DISTRIBUTOR;
@ -89,5 +89,5 @@ void ObjectFactory::produce(void* args) {
new SusDummy(); new SusDummy();
new ThermalController(objects::THERMAL_CONTROLLER, objects::NO_OBJECT); new ThermalController(objects::THERMAL_CONTROLLER, objects::NO_OBJECT);
//new TestTask(objects::TEST_TASK); // new TestTask(objects::TEST_TASK);
} }

View File

@ -5,6 +5,7 @@
* Generated on: 2021-05-17 19:12:49 * Generated on: 2021-05-17 19:12:49
*/ */
#include "translateObjects.h" #include "translateObjects.h"
#include "systemObjectList.h" #include "systemObjectList.h"
const char *TEST_TASK_STRING = "TEST_TASK"; const char *TEST_TASK_STRING = "TEST_TASK";

View File

@ -44,7 +44,8 @@ ReturnValue_t dummy_pst::pst(FixedTimeslotTaskIF *thisSequence) {
thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
@ -80,37 +81,43 @@ ReturnValue_t dummy_pst::pst(FixedTimeslotTaskIF *thisSequence) {
thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);

View File

@ -107,7 +107,7 @@ void Factory::setStaticFrameworkObjectIds() {
DeviceHandlerBase::powerSwitcherId = objects::PCDU_HANDLER; DeviceHandlerBase::powerSwitcherId = objects::PCDU_HANDLER;
#endif /* OBSW_Q7S_EM == 1 */ #endif /* OBSW_Q7S_EM == 1 */
#if OBSW_TM_TO_PTME == 1 #if OBSW_TM_TO_PTME == 1
TmFunnel::downlinkDestination = objects::CCSDS_HANDLER; TmFunnel::downlinkDestination = objects::CCSDS_HANDLER;
#else #else
TmFunnel::downlinkDestination = objects::TMTC_BRIDGE; TmFunnel::downlinkDestination = objects::TMTC_BRIDGE;

View File

@ -1,4 +1,5 @@
#include "AcuDummy.h" #include "AcuDummy.h"
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h> #include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
AcuDummy::AcuDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie) AcuDummy::AcuDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
@ -10,22 +11,19 @@ void AcuDummy::doStartUp() {}
void AcuDummy::doShutDown() {} void AcuDummy::doShutDown() {}
ReturnValue_t AcuDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { ReturnValue_t AcuDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; }
return NOTHING_TO_SEND;
}
ReturnValue_t AcuDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { ReturnValue_t AcuDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND; return NOTHING_TO_SEND;
} }
ReturnValue_t AcuDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand, ReturnValue_t AcuDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t *commandData, const uint8_t *commandData, size_t commandDataLen) {
size_t commandDataLen) {
return RETURN_OK; return RETURN_OK;
} }
ReturnValue_t AcuDummy::scanForReply(const uint8_t *start, size_t len, ReturnValue_t AcuDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
DeviceCommandId_t *foundId, size_t *foundLen) { size_t *foundLen) {
return RETURN_OK; return RETURN_OK;
} }
@ -33,13 +31,12 @@ ReturnValue_t AcuDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t
return RETURN_OK; return RETURN_OK;
} }
void AcuDummy::fillCommandAndReplyMap() { void AcuDummy::fillCommandAndReplyMap() {}
}
uint32_t AcuDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } uint32_t AcuDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
ReturnValue_t AcuDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, ReturnValue_t AcuDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager& poolManager) { LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(P60System::pool::ACU_TEMPERATURES, new PoolEntry<float>(3)); localDataPoolMap.emplace(P60System::pool::ACU_TEMPERATURES, new PoolEntry<float>(3));
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }

View File

@ -1,4 +1,5 @@
#include "BpxDummy.h" #include "BpxDummy.h"
#include <mission/devices/devicedefinitions/BpxBatteryDefinitions.h> #include <mission/devices/devicedefinitions/BpxBatteryDefinitions.h>
BpxDummy::BpxDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie) BpxDummy::BpxDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
@ -10,22 +11,19 @@ void BpxDummy::doStartUp() {}
void BpxDummy::doShutDown() {} void BpxDummy::doShutDown() {}
ReturnValue_t BpxDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { ReturnValue_t BpxDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; }
return NOTHING_TO_SEND;
}
ReturnValue_t BpxDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { ReturnValue_t BpxDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND; return NOTHING_TO_SEND;
} }
ReturnValue_t BpxDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand, ReturnValue_t BpxDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t *commandData, const uint8_t *commandData, size_t commandDataLen) {
size_t commandDataLen) {
return RETURN_OK; return RETURN_OK;
} }
ReturnValue_t BpxDummy::scanForReply(const uint8_t *start, size_t len, ReturnValue_t BpxDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
DeviceCommandId_t *foundId, size_t *foundLen) { size_t *foundLen) {
return RETURN_OK; return RETURN_OK;
} }
@ -33,13 +31,12 @@ ReturnValue_t BpxDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t
return RETURN_OK; return RETURN_OK;
} }
void BpxDummy::fillCommandAndReplyMap() { void BpxDummy::fillCommandAndReplyMap() {}
}
uint32_t BpxDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } uint32_t BpxDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
ReturnValue_t BpxDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, ReturnValue_t BpxDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager& poolManager) { LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(BpxBattery::BATT_TEMP_1, &battTemp1); localDataPoolMap.emplace(BpxBattery::BATT_TEMP_1, &battTemp1);
localDataPoolMap.emplace(BpxBattery::BATT_TEMP_2, &battTemp2); localDataPoolMap.emplace(BpxBattery::BATT_TEMP_2, &battTemp2);
localDataPoolMap.emplace(BpxBattery::BATT_TEMP_3, &battTemp3); localDataPoolMap.emplace(BpxBattery::BATT_TEMP_3, &battTemp3);

View File

@ -1,19 +1,19 @@
target_sources(${LIB_DUMMIES} PUBLIC target_sources(
TemperatureSensorsDummy.cpp ${LIB_DUMMIES}
SusDummy.cpp PUBLIC TemperatureSensorsDummy.cpp
BpxDummy.cpp SusDummy.cpp
ComIFDummy.cpp BpxDummy.cpp
ComCookieDummy.cpp ComIFDummy.cpp
RwDummy.cpp ComCookieDummy.cpp
StarTrackerDummy.cpp RwDummy.cpp
SyrlinksDummy.cpp StarTrackerDummy.cpp
ImtqDummy.cpp SyrlinksDummy.cpp
AcuDummy.cpp ImtqDummy.cpp
PduDummy.cpp AcuDummy.cpp
P60DockDummy.cpp PduDummy.cpp
GyroAdisDummy.cpp P60DockDummy.cpp
GyroL3GD20Dummy.cpp GyroAdisDummy.cpp
MgmLIS3MDLDummy.cpp GyroL3GD20Dummy.cpp
PlPcduDummy.cpp MgmLIS3MDLDummy.cpp
CoreControllerDummy.cpp PlPcduDummy.cpp
) CoreControllerDummy.cpp)

View File

@ -11,7 +11,6 @@
*/ */
class ComIFDummy : public DeviceCommunicationIF, public SystemObject { class ComIFDummy : public DeviceCommunicationIF, public SystemObject {
public: public:
ComIFDummy(object_id_t objectId); ComIFDummy(object_id_t objectId);
virtual ~ComIFDummy(); virtual ~ComIFDummy();

View File

@ -1,14 +1,13 @@
#include "CoreControllerDummy.h" #include "CoreControllerDummy.h"
#include <objects/systemObjectList.h>
#include <bsp_q7s/core/CoreDefinitions.h> #include <bsp_q7s/core/CoreDefinitions.h>
#include <objects/systemObjectList.h>
#include <cmath> #include <cmath>
#include <cstdlib> #include <cstdlib>
CoreControllerDummy::CoreControllerDummy(object_id_t objectId) CoreControllerDummy::CoreControllerDummy(object_id_t objectId)
: ExtendedControllerBase(objectId, objects::NO_OBJECT) { : ExtendedControllerBase(objectId, objects::NO_OBJECT) {}
}
ReturnValue_t CoreControllerDummy::initialize() { ReturnValue_t CoreControllerDummy::initialize() {
static bool done = false; static bool done = false;
@ -27,12 +26,10 @@ ReturnValue_t CoreControllerDummy::handleCommandMessage(CommandMessage* message)
return RETURN_FAILED; return RETURN_FAILED;
} }
void CoreControllerDummy::performControlOperation() { void CoreControllerDummy::performControlOperation() { return; }
return;
}
ReturnValue_t CoreControllerDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, ReturnValue_t CoreControllerDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager &poolManager) { LocalDataPoolManager& poolManager) {
localDataPoolMap.emplace(core::TEMPERATURE, new PoolEntry<float>({0})); localDataPoolMap.emplace(core::TEMPERATURE, new PoolEntry<float>({0}));
localDataPoolMap.emplace(core::PS_VOLTAGE, new PoolEntry<float>({0})); localDataPoolMap.emplace(core::PS_VOLTAGE, new PoolEntry<float>({0}));
localDataPoolMap.emplace(core::PL_VOLTAGE, new PoolEntry<float>({0})); localDataPoolMap.emplace(core::PL_VOLTAGE, new PoolEntry<float>({0}));

View File

@ -11,19 +11,22 @@ void GyroAdisDummy::doStartUp() {}
void GyroAdisDummy::doShutDown() {} void GyroAdisDummy::doShutDown() {}
ReturnValue_t GyroAdisDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } ReturnValue_t GyroAdisDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND;
}
ReturnValue_t GyroAdisDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { ReturnValue_t GyroAdisDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND; return NOTHING_TO_SEND;
} }
ReturnValue_t GyroAdisDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand, ReturnValue_t GyroAdisDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t *commandData, size_t commandDataLen) { const uint8_t *commandData,
size_t commandDataLen) {
return RETURN_OK; return RETURN_OK;
} }
ReturnValue_t GyroAdisDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId, ReturnValue_t GyroAdisDummy::scanForReply(const uint8_t *start, size_t len,
size_t *foundLen) { DeviceCommandId_t *foundId, size_t *foundLen) {
return RETURN_OK; return RETURN_OK;
} }

View File

@ -11,19 +11,22 @@ void GyroL3GD20Dummy::doStartUp() {}
void GyroL3GD20Dummy::doShutDown() {} void GyroL3GD20Dummy::doShutDown() {}
ReturnValue_t GyroL3GD20Dummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } ReturnValue_t GyroL3GD20Dummy::buildNormalDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND;
}
ReturnValue_t GyroL3GD20Dummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { ReturnValue_t GyroL3GD20Dummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND; return NOTHING_TO_SEND;
} }
ReturnValue_t GyroL3GD20Dummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand, ReturnValue_t GyroL3GD20Dummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t *commandData, size_t commandDataLen) { const uint8_t *commandData,
size_t commandDataLen) {
return RETURN_OK; return RETURN_OK;
} }
ReturnValue_t GyroL3GD20Dummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId, ReturnValue_t GyroL3GD20Dummy::scanForReply(const uint8_t *start, size_t len,
size_t *foundLen) { DeviceCommandId_t *foundId, size_t *foundLen) {
return RETURN_OK; return RETURN_OK;
} }

View File

@ -1,4 +1,5 @@
#include "ImtqDummy.h" #include "ImtqDummy.h"
#include <mission/devices/devicedefinitions/IMTQHandlerDefinitions.h> #include <mission/devices/devicedefinitions/IMTQHandlerDefinitions.h>
ImtqDummy::ImtqDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie) ImtqDummy::ImtqDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
@ -10,9 +11,7 @@ void ImtqDummy::doStartUp() {}
void ImtqDummy::doShutDown() {} void ImtqDummy::doShutDown() {}
ReturnValue_t ImtqDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { ReturnValue_t ImtqDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; }
return NOTHING_TO_SEND;
}
ReturnValue_t ImtqDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { ReturnValue_t ImtqDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND; return NOTHING_TO_SEND;
@ -24,8 +23,8 @@ ReturnValue_t ImtqDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand
return RETURN_OK; return RETURN_OK;
} }
ReturnValue_t ImtqDummy::scanForReply(const uint8_t *start, size_t len, ReturnValue_t ImtqDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
DeviceCommandId_t *foundId, size_t *foundLen) { size_t *foundLen) {
return RETURN_OK; return RETURN_OK;
} }
@ -33,13 +32,12 @@ ReturnValue_t ImtqDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_
return RETURN_OK; return RETURN_OK;
} }
void ImtqDummy::fillCommandAndReplyMap() { void ImtqDummy::fillCommandAndReplyMap() {}
}
uint32_t ImtqDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } uint32_t ImtqDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
ReturnValue_t ImtqDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, ReturnValue_t ImtqDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager& poolManager) { LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(IMTQ::MCU_TEMPERATURE, new PoolEntry<int16_t>({0})); localDataPoolMap.emplace(IMTQ::MCU_TEMPERATURE, new PoolEntry<int16_t>({0}));
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }

View File

@ -11,19 +11,22 @@ void MgmLIS3MDLDummy::doStartUp() {}
void MgmLIS3MDLDummy::doShutDown() {} void MgmLIS3MDLDummy::doShutDown() {}
ReturnValue_t MgmLIS3MDLDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } ReturnValue_t MgmLIS3MDLDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND;
}
ReturnValue_t MgmLIS3MDLDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { ReturnValue_t MgmLIS3MDLDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND; return NOTHING_TO_SEND;
} }
ReturnValue_t MgmLIS3MDLDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand, ReturnValue_t MgmLIS3MDLDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t *commandData, size_t commandDataLen) { const uint8_t *commandData,
size_t commandDataLen) {
return RETURN_OK; return RETURN_OK;
} }
ReturnValue_t MgmLIS3MDLDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId, ReturnValue_t MgmLIS3MDLDummy::scanForReply(const uint8_t *start, size_t len,
size_t *foundLen) { DeviceCommandId_t *foundId, size_t *foundLen) {
return RETURN_OK; return RETURN_OK;
} }

View File

@ -11,19 +11,22 @@ void P60DockDummy::doStartUp() {}
void P60DockDummy::doShutDown() {} void P60DockDummy::doShutDown() {}
ReturnValue_t P60DockDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } ReturnValue_t P60DockDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND;
}
ReturnValue_t P60DockDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { ReturnValue_t P60DockDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND; return NOTHING_TO_SEND;
} }
ReturnValue_t P60DockDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand, ReturnValue_t P60DockDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t *commandData, size_t commandDataLen) { const uint8_t *commandData,
size_t commandDataLen) {
return RETURN_OK; return RETURN_OK;
} }
ReturnValue_t P60DockDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId, ReturnValue_t P60DockDummy::scanForReply(const uint8_t *start, size_t len,
size_t *foundLen) { DeviceCommandId_t *foundId, size_t *foundLen) {
return RETURN_OK; return RETURN_OK;
} }

View File

@ -1,4 +1,5 @@
#include "PlPcduDummy.h" #include "PlPcduDummy.h"
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h> #include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
PlPcduDummy::PlPcduDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie) PlPcduDummy::PlPcduDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
@ -33,13 +34,12 @@ ReturnValue_t PlPcduDummy::interpretDeviceReply(DeviceCommandId_t id, const uint
return RETURN_OK; return RETURN_OK;
} }
void PlPcduDummy::fillCommandAndReplyMap() { void PlPcduDummy::fillCommandAndReplyMap() {}
}
uint32_t PlPcduDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } uint32_t PlPcduDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
ReturnValue_t PlPcduDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, ReturnValue_t PlPcduDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager& poolManager) { LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(plpcdu::PlPcduPoolIds::TEMP, new PoolEntry<float>({0.0})); localDataPoolMap.emplace(plpcdu::PlPcduPoolIds::TEMP, new PoolEntry<float>({0.0}));
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }

View File

@ -1,4 +1,5 @@
#include "RwDummy.h" #include "RwDummy.h"
#include <mission/devices/devicedefinitions/RwDefinitions.h> #include <mission/devices/devicedefinitions/RwDefinitions.h>
RwDummy::RwDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie) RwDummy::RwDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
@ -10,22 +11,19 @@ void RwDummy::doStartUp() {}
void RwDummy::doShutDown() {} void RwDummy::doShutDown() {}
ReturnValue_t RwDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { ReturnValue_t RwDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; }
return NOTHING_TO_SEND;
}
ReturnValue_t RwDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { ReturnValue_t RwDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND; return NOTHING_TO_SEND;
} }
ReturnValue_t RwDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand, ReturnValue_t RwDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t *commandData, const uint8_t *commandData, size_t commandDataLen) {
size_t commandDataLen) {
return RETURN_OK; return RETURN_OK;
} }
ReturnValue_t RwDummy::scanForReply(const uint8_t *start, size_t len, ReturnValue_t RwDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
DeviceCommandId_t *foundId, size_t *foundLen) { size_t *foundLen) {
return RETURN_OK; return RETURN_OK;
} }
@ -33,13 +31,12 @@ ReturnValue_t RwDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t
return RETURN_OK; return RETURN_OK;
} }
void RwDummy::fillCommandAndReplyMap() { void RwDummy::fillCommandAndReplyMap() {}
}
uint32_t RwDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } uint32_t RwDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
ReturnValue_t RwDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, ReturnValue_t RwDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager& poolManager) { LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(RwDefinitions::TEMPERATURE_C, new PoolEntry<int32_t>({0})); localDataPoolMap.emplace(RwDefinitions::TEMPERATURE_C, new PoolEntry<int32_t>({0}));
localDataPoolMap.emplace(RwDefinitions::CURR_SPEED, new PoolEntry<int32_t>({0})); localDataPoolMap.emplace(RwDefinitions::CURR_SPEED, new PoolEntry<int32_t>({0}));

View File

@ -1,4 +1,5 @@
#include "StarTrackerDummy.h" #include "StarTrackerDummy.h"
#include <linux/devices/devicedefinitions/StarTrackerDefinitions.h> #include <linux/devices/devicedefinitions/StarTrackerDefinitions.h>
StarTrackerDummy::StarTrackerDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie) StarTrackerDummy::StarTrackerDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
@ -33,13 +34,12 @@ ReturnValue_t StarTrackerDummy::interpretDeviceReply(DeviceCommandId_t id, const
return RETURN_OK; return RETURN_OK;
} }
void StarTrackerDummy::fillCommandAndReplyMap() { void StarTrackerDummy::fillCommandAndReplyMap() {}
}
uint32_t StarTrackerDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } uint32_t StarTrackerDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
ReturnValue_t StarTrackerDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, ReturnValue_t StarTrackerDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager& poolManager) { LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(startracker::MCU_TEMPERATURE, new PoolEntry<float>({0})); localDataPoolMap.emplace(startracker::MCU_TEMPERATURE, new PoolEntry<float>({0}));
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }

View File

@ -6,8 +6,7 @@
#include <cstdlib> #include <cstdlib>
SusDummy::SusDummy() SusDummy::SusDummy()
: ExtendedControllerBase(objects::SUS_0_N_LOC_XFYFZM_PT_XF, objects::NO_OBJECT), : ExtendedControllerBase(objects::SUS_0_N_LOC_XFYFZM_PT_XF, objects::NO_OBJECT), susSet(this) {
susSet(this) {
ObjectManager::instance()->insert(objects::SUS_6_R_LOC_XFYBZM_PT_XF, this); ObjectManager::instance()->insert(objects::SUS_6_R_LOC_XFYBZM_PT_XF, this);
ObjectManager::instance()->insert(objects::SUS_1_N_LOC_XBYFZM_PT_XB, this); ObjectManager::instance()->insert(objects::SUS_1_N_LOC_XBYFZM_PT_XB, this);
ObjectManager::instance()->insert(objects::SUS_7_R_LOC_XBYBZM_PT_XB, this); ObjectManager::instance()->insert(objects::SUS_7_R_LOC_XBYBZM_PT_XB, this);
@ -34,9 +33,7 @@ ReturnValue_t SusDummy::initialize() {
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }
ReturnValue_t SusDummy::handleCommandMessage(CommandMessage* message) { ReturnValue_t SusDummy::handleCommandMessage(CommandMessage* message) { return RETURN_FAILED; }
return RETURN_FAILED;
}
void SusDummy::performControlOperation() { void SusDummy::performControlOperation() {
iteration++; iteration++;
@ -52,10 +49,9 @@ void SusDummy::performControlOperation() {
susSet.commit(); susSet.commit();
} }
ReturnValue_t SusDummy::initializeLocalDataPool( ReturnValue_t SusDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
localpool::DataPool& localDataPoolMap, LocalDataPoolManager& poolManager) { LocalDataPoolManager& poolManager) {
localDataPoolMap.emplace(SUS::SusPoolIds::TEMPERATURE_C, localDataPoolMap.emplace(SUS::SusPoolIds::TEMPERATURE_C, new PoolEntry<float>({0}, 1, true));
new PoolEntry<float>({0}, 1, true));
localDataPoolMap.emplace(SUS::SusPoolIds::CHANNEL_VEC, new PoolEntry<uint16_t>({0})); localDataPoolMap.emplace(SUS::SusPoolIds::CHANNEL_VEC, new PoolEntry<uint16_t>({0}));
return RETURN_OK; return RETURN_OK;

View File

@ -1,4 +1,5 @@
#include "SyrlinksDummy.h" #include "SyrlinksDummy.h"
#include <mission/devices/devicedefinitions/SyrlinksDefinitions.h> #include <mission/devices/devicedefinitions/SyrlinksDefinitions.h>
SyrlinksDummy::SyrlinksDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie) SyrlinksDummy::SyrlinksDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
@ -33,13 +34,12 @@ ReturnValue_t SyrlinksDummy::interpretDeviceReply(DeviceCommandId_t id, const ui
return RETURN_OK; return RETURN_OK;
} }
void SyrlinksDummy::fillCommandAndReplyMap() { void SyrlinksDummy::fillCommandAndReplyMap() {}
}
uint32_t SyrlinksDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } uint32_t SyrlinksDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
ReturnValue_t SyrlinksDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, ReturnValue_t SyrlinksDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager& poolManager) { LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(syrlinks::TEMP_BASEBAND_BOARD, new PoolEntry<float>({0})); localDataPoolMap.emplace(syrlinks::TEMP_BASEBAND_BOARD, new PoolEntry<float>({0}));
localDataPoolMap.emplace(syrlinks::TEMP_POWER_AMPLIFIER, new PoolEntry<float>({0})); localDataPoolMap.emplace(syrlinks::TEMP_POWER_AMPLIFIER, new PoolEntry<float>({0}));
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;

View File

@ -8,10 +8,10 @@
#include <fsfw_hal/linux/spi/SpiCookie.h> #include <fsfw_hal/linux/spi/SpiCookie.h>
#include <linux/callbacks/gpioCallbacks.h> #include <linux/callbacks/gpioCallbacks.h>
#include <linux/devices/Max31865RtdLowlevelHandler.h> #include <linux/devices/Max31865RtdLowlevelHandler.h>
#include <mission/controller/ThermalController.h>
#include <mission/devices/Max31865EiveHandler.h> #include <mission/devices/Max31865EiveHandler.h>
#include <mission/devices/Max31865PT1000Handler.h> #include <mission/devices/Max31865PT1000Handler.h>
#include <mission/devices/SusHandler.h> #include <mission/devices/SusHandler.h>
#include <mission/controller/ThermalController.h>
#include <mission/system/SusAssembly.h> #include <mission/system/SusAssembly.h>
#include <mission/system/TcsBoardAssembly.h> #include <mission/system/TcsBoardAssembly.h>
#include <mission/system/fdir/RtdFdir.h> #include <mission/system/fdir/RtdFdir.h>

View File

@ -101,31 +101,31 @@ static const uint16_t TC_WRITE_SEQ_EXECUTION_DELAY = 80;
static const uint16_t TC_DOWNLINK_PWR_ON_EXECUTION_DELAY = 8; static const uint16_t TC_DOWNLINK_PWR_ON_EXECUTION_DELAY = 8;
namespace status_code { namespace status_code {
static const uint16_t UNKNOWN_APID = 0x5DD; static const uint16_t UNKNOWN_APID = 0x5DD;
static const uint16_t INCORRECT_LENGTH = 0x5DE; static const uint16_t INCORRECT_LENGTH = 0x5DE;
static const uint16_t INCORRECT_CRC = 0x5DF; static const uint16_t INCORRECT_CRC = 0x5DF;
static const uint16_t INCORRECT_PKT_SEQ_CNT = 0x5E0; static const uint16_t INCORRECT_PKT_SEQ_CNT = 0x5E0;
static const uint16_t TC_NOT_ALLOWED_IN_MODE = 0x5E1; static const uint16_t TC_NOT_ALLOWED_IN_MODE = 0x5E1;
static const uint16_t TC_EXEUTION_DISABLED = 0x5E2; static const uint16_t TC_EXEUTION_DISABLED = 0x5E2;
static const uint16_t FLASH_MOUNT_FAILED = 0x5E3; static const uint16_t FLASH_MOUNT_FAILED = 0x5E3;
static const uint16_t FLASH_FILE_ALREADY_CLOSED = 0x5E4; static const uint16_t FLASH_FILE_ALREADY_CLOSED = 0x5E4;
static const uint16_t FLASH_FILE_OPEN_FAILED = 0x5E5; static const uint16_t FLASH_FILE_OPEN_FAILED = 0x5E5;
static const uint16_t FLASH_FILE_ALREDY_OPEN = 0x5E6; static const uint16_t FLASH_FILE_ALREDY_OPEN = 0x5E6;
static const uint16_t FLASH_FILE_NOT_OPEN = 0x5E7; static const uint16_t FLASH_FILE_NOT_OPEN = 0x5E7;
static const uint16_t FLASH_UNMOUNT_FAILED = 0x5E8; static const uint16_t FLASH_UNMOUNT_FAILED = 0x5E8;
static const uint16_t HEAP_ALLOCATION_FAILED = 0x5E9; static const uint16_t HEAP_ALLOCATION_FAILED = 0x5E9;
static const uint16_t INVALID_PARAMETER = 0x5EA; static const uint16_t INVALID_PARAMETER = 0x5EA;
static const uint16_t NOT_INITIALIZED = 0x5EB; static const uint16_t NOT_INITIALIZED = 0x5EB;
static const uint16_t REBOOT_IMMINENT = 0x5EC; static const uint16_t REBOOT_IMMINENT = 0x5EC;
static const uint16_t CORRUPT_DATA = 0x5ED; static const uint16_t CORRUPT_DATA = 0x5ED;
static const uint16_t FLASH_CORRECTABLE_MISMATCH = 0x5EE; static const uint16_t FLASH_CORRECTABLE_MISMATCH = 0x5EE;
static const uint16_t FLASH_UNCORRECTABLE_MISMATCH = 0x5EF; static const uint16_t FLASH_UNCORRECTABLE_MISMATCH = 0x5EF;
static const uint16_t RESERVED_0 = 0x5F0; static const uint16_t RESERVED_0 = 0x5F0;
static const uint16_t RESERVED_1 = 0x5F1; static const uint16_t RESERVED_1 = 0x5F1;
static const uint16_t RESERVED_2 = 0x5F2; static const uint16_t RESERVED_2 = 0x5F2;
static const uint16_t RESERVED_3 = 0x5F3; static const uint16_t RESERVED_3 = 0x5F3;
static const uint16_t RESERVED_4 = 0x5F4; static const uint16_t RESERVED_4 = 0x5F4;
} } // namespace status_code
/** /**
* @brief Abstract base class for TC space packet of MPSoC. * @brief Abstract base class for TC space packet of MPSoC.

View File

@ -693,7 +693,8 @@ ReturnValue_t PlocMPSoCHandler::handleCamCmdRpt(const uint8_t* data) {
sif::info << "PlocMPSoCHandler: CamCmdRpt Ack value: 0x" << std::hex sif::info << "PlocMPSoCHandler: CamCmdRpt Ack value: 0x" << std::hex
<< static_cast<unsigned int>(ackValue) << std::endl; << static_cast<unsigned int>(ackValue) << std::endl;
#endif /* OBSW_DEBUG_PLOC_MPSOC == 1 */ #endif /* OBSW_DEBUG_PLOC_MPSOC == 1 */
handleDeviceTM(packet.getPacketData() + sizeof(uint16_t), packet.getPacketDataLength() - 1, mpsoc::TM_CAM_CMD_RPT); handleDeviceTM(packet.getPacketData() + sizeof(uint16_t), packet.getPacketDataLength() - 1,
mpsoc::TM_CAM_CMD_RPT);
return result; return result;
} }
@ -1035,72 +1036,72 @@ void PlocMPSoCHandler::handleActionCommandFailure(ActionId_t actionId) {
} }
std::string PlocMPSoCHandler::getStatusString(uint16_t status) { std::string PlocMPSoCHandler::getStatusString(uint16_t status) {
switch(status) { switch (status) {
case(mpsoc::status_code::UNKNOWN_APID): { case (mpsoc::status_code::UNKNOWN_APID): {
return "Unknown APID"; return "Unknown APID";
break; break;
} }
case(mpsoc::status_code::INCORRECT_LENGTH): { case (mpsoc::status_code::INCORRECT_LENGTH): {
return "Incorrect length"; return "Incorrect length";
break; break;
} }
case(mpsoc::status_code::INCORRECT_CRC): { case (mpsoc::status_code::INCORRECT_CRC): {
return "Incorrect crc"; return "Incorrect crc";
break; break;
} }
case(mpsoc::status_code::INCORRECT_PKT_SEQ_CNT): { case (mpsoc::status_code::INCORRECT_PKT_SEQ_CNT): {
return "Incorrect packet sequence count"; return "Incorrect packet sequence count";
break; break;
} }
case(mpsoc::status_code::TC_NOT_ALLOWED_IN_MODE): { case (mpsoc::status_code::TC_NOT_ALLOWED_IN_MODE): {
return "TC not allowed in this mode"; return "TC not allowed in this mode";
break; break;
} }
case(mpsoc::status_code::TC_EXEUTION_DISABLED): { case (mpsoc::status_code::TC_EXEUTION_DISABLED): {
return "TC execution disabled"; return "TC execution disabled";
break; break;
} }
case(mpsoc::status_code::FLASH_MOUNT_FAILED): { case (mpsoc::status_code::FLASH_MOUNT_FAILED): {
return "Flash mount failed"; return "Flash mount failed";
break; break;
} }
case(mpsoc::status_code::FLASH_FILE_ALREADY_CLOSED): { case (mpsoc::status_code::FLASH_FILE_ALREADY_CLOSED): {
return "Flash file already closed"; return "Flash file already closed";
break; break;
} }
case(mpsoc::status_code::FLASH_FILE_NOT_OPEN): { case (mpsoc::status_code::FLASH_FILE_NOT_OPEN): {
return "Flash file not open"; return "Flash file not open";
break; break;
} }
case(mpsoc::status_code::FLASH_UNMOUNT_FAILED): { case (mpsoc::status_code::FLASH_UNMOUNT_FAILED): {
return "Flash unmount failed"; return "Flash unmount failed";
break; break;
} }
case(mpsoc::status_code::HEAP_ALLOCATION_FAILED): { case (mpsoc::status_code::HEAP_ALLOCATION_FAILED): {
return "Heap allocation failed"; return "Heap allocation failed";
break; break;
} }
case(mpsoc::status_code::INVALID_PARAMETER): { case (mpsoc::status_code::INVALID_PARAMETER): {
return "Invalid parameter"; return "Invalid parameter";
break; break;
} }
case(mpsoc::status_code::NOT_INITIALIZED): { case (mpsoc::status_code::NOT_INITIALIZED): {
return "Not initialized"; return "Not initialized";
break; break;
} }
case(mpsoc::status_code::REBOOT_IMMINENT): { case (mpsoc::status_code::REBOOT_IMMINENT): {
return "Reboot imminent"; return "Reboot imminent";
break; break;
} }
case(mpsoc::status_code::CORRUPT_DATA): { case (mpsoc::status_code::CORRUPT_DATA): {
return "Corrupt data"; return "Corrupt data";
break; break;
} }
case(mpsoc::status_code::FLASH_CORRECTABLE_MISMATCH): { case (mpsoc::status_code::FLASH_CORRECTABLE_MISMATCH): {
return "Flash correctable mismatch"; return "Flash correctable mismatch";
break; break;
} }
case(mpsoc::status_code::FLASH_UNCORRECTABLE_MISMATCH): { case (mpsoc::status_code::FLASH_UNCORRECTABLE_MISMATCH): {
return "Flash uncorrectable mismatch"; return "Flash uncorrectable mismatch";
break; break;
} }

View File

@ -142,7 +142,7 @@ ReturnValue_t PlocSupervisorHandler::executeAction(ActionId_t actionId,
} }
void PlocSupervisorHandler::doStartUp() { void PlocSupervisorHandler::doStartUp() {
if (setTimeDuringStartup) { if (setTimeDuringStartup) {
switch (startupState) { switch (startupState) {
case StartupState::OFF: { case StartupState::OFF: {
bootTimeout.resetTimer(); bootTimeout.resetTimer();
@ -164,10 +164,10 @@ if (setTimeDuringStartup) {
default: default:
break; break;
} }
} else { } else {
uartIsolatorSwitch.pullHigh(); uartIsolatorSwitch.pullHigh();
setMode(_MODE_TO_ON); setMode(_MODE_TO_ON);
} }
} }
void PlocSupervisorHandler::doShutDown() { void PlocSupervisorHandler::doShutDown() {
@ -1950,8 +1950,8 @@ void PlocSupervisorHandler::handleExecutionFailureReport(uint16_t statusCode) {
void PlocSupervisorHandler::printAckFailureInfo(uint16_t statusCode, DeviceCommandId_t commandId) { void PlocSupervisorHandler::printAckFailureInfo(uint16_t statusCode, DeviceCommandId_t commandId) {
sif::warning << "PlocSupervisorHandler: Received Ack failure report with status code: 0x" sif::warning << "PlocSupervisorHandler: Received Ack failure report with status code: 0x"
<< std::hex << statusCode << std::endl; << std::hex << statusCode << std::endl;
switch(commandId) { switch (commandId) {
case(supv::SET_TIME_REF): { case (supv::SET_TIME_REF): {
sif::info << "PlocSupervisoHandler: Setting time failed. Make sure the OBC has a valid time" sif::info << "PlocSupervisoHandler: Setting time failed. Make sure the OBC has a valid time"
<< std::endl; << std::endl;
break; break;

View File

@ -61,7 +61,7 @@ enum sourceObjects : uint32_t {
DUMMY_INTERFACE = 0x5400CAFE, DUMMY_INTERFACE = 0x5400CAFE,
DUMMY_HANDLER = 0x5400AFFE, DUMMY_HANDLER = 0x5400AFFE,
P60DOCK_TEST_TASK = 0x00005060, P60DOCK_TEST_TASK = 0x00005060,
DUMMY_COM_IF= 0x54000040 DUMMY_COM_IF = 0x54000040
}; };
} }

View File

@ -2,11 +2,11 @@
#define MISSION_CONTROLLER_THERMALCONTROLLER_H_ #define MISSION_CONTROLLER_THERMALCONTROLLER_H_
#include <fsfw/controller/ExtendedControllerBase.h> #include <fsfw/controller/ExtendedControllerBase.h>
#include <fsfw/timemanager/Countdown.h>
#include <mission/controller/controllerdefinitions/ThermalControllerDefinitions.h> #include <mission/controller/controllerdefinitions/ThermalControllerDefinitions.h>
#include <mission/devices/devicedefinitions/Max31865Definitions.h> #include <mission/devices/devicedefinitions/Max31865Definitions.h>
#include <mission/devices/devicedefinitions/SusDefinitions.h> #include <mission/devices/devicedefinitions/SusDefinitions.h>
#include <mission/devices/devicedefinitions/Tmp1075Definitions.h> #include <mission/devices/devicedefinitions/Tmp1075Definitions.h>
#include <fsfw/timemanager/Countdown.h>
class ThermalController : public ExtendedControllerBase { class ThermalController : public ExtendedControllerBase {
public: public:
@ -28,14 +28,9 @@ class ThermalController : public ExtendedControllerBase {
uint32_t* msToReachTheMode) override; uint32_t* msToReachTheMode) override;
private: private:
static const uint32_t DELAY = 500; static const uint32_t DELAY = 500;
enum class InternalState { enum class InternalState { STARTUP, INITIAL_DELAY, READY };
STARTUP,
INITIAL_DELAY,
READY
};
InternalState internalState = InternalState::STARTUP; InternalState internalState = InternalState::STARTUP;

View File

@ -164,8 +164,7 @@ class SusTemperatures : public StaticLocalDataSet<ENTRIES_SUS_TEMPERATURE_SET> {
public: public:
SusTemperatures(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, SUS_TEMPERATURES) {} SusTemperatures(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, SUS_TEMPERATURES) {}
SusTemperatures(object_id_t objectId) SusTemperatures(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, SUS_TEMPERATURES)) {}
: StaticLocalDataSet(sid_t(objectId, SUS_TEMPERATURES)) {}
lp_var_t<float> sus_0_n_loc_xfyfzm_pt_xf = lp_var_t<float> sus_0_n_loc_xfyfzm_pt_xf =
lp_var_t<float>(sid.objectId, PoolIds::SUS_0_N_LOC_XFYFZM_PT_XF, this); lp_var_t<float>(sid.objectId, PoolIds::SUS_0_N_LOC_XFYFZM_PT_XF, this);

View File

@ -75,7 +75,8 @@ ReturnValue_t ACUHandler::parseHkTableReply(const uint8_t *packet) {
dataOffset += 4; dataOffset += 4;
for (size_t idx = 0; idx < 3; idx++) { for (size_t idx = 0; idx < 3; idx++) {
coreHk.temperatures[idx] = static_cast<int16_t>((packet[dataOffset] << 8) | packet[dataOffset + 1]) * 0.1; coreHk.temperatures[idx] =
static_cast<int16_t>((packet[dataOffset] << 8) | packet[dataOffset + 1]) * 0.1;
dataOffset += 4; dataOffset += 4;
} }

View File

@ -472,7 +472,8 @@ ReturnValue_t GomspaceDeviceHandler::parsePduHkTable(PDU::PduCoreHk& coreHk, PDU
dataOffset += 4; dataOffset += 4;
auxHk.vbat = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); auxHk.vbat = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4; dataOffset += 4;
coreHk.temperature = static_cast<int16_t>(*(packet + dataOffset) << 8 | *(packet + dataOffset + 1)) * 0.1; coreHk.temperature =
static_cast<int16_t>(*(packet + dataOffset) << 8 | *(packet + dataOffset + 1)) * 0.1;
dataOffset += 4; dataOffset += 4;
for (uint8_t idx = 0; idx < 3; idx++) { for (uint8_t idx = 0; idx < 3; idx++) {

View File

@ -14,8 +14,8 @@
#include <fsfw/timemanager/Countdown.h> #include <fsfw/timemanager/Countdown.h>
#include <fsfw_hal/common/gpio/GpioIF.h> #include <fsfw_hal/common/gpio/GpioIF.h>
#include <vector>
#include <array> #include <array>
#include <vector>
#include "devices/heaterSwitcherList.h" #include "devices/heaterSwitcherList.h"

View File

@ -181,7 +181,8 @@ ReturnValue_t Max31865EiveHandler::initializeLocalDataPool(localpool::DataPool&
using namespace MAX31865; using namespace MAX31865;
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::RTD_VALUE), new PoolEntry<float>({0})); localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::RTD_VALUE), new PoolEntry<float>({0}));
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::TEMPERATURE_C), new PoolEntry<float>({0})); localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::TEMPERATURE_C), new PoolEntry<float>({0}));
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::LAST_FAULT_BYTE), new PoolEntry<uint8_t>({0})); localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::LAST_FAULT_BYTE),
new PoolEntry<uint8_t>({0}));
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::FAULT_BYTE), new PoolEntry<uint8_t>({0})); localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::FAULT_BYTE), new PoolEntry<uint8_t>({0}));
poolManager.subscribeForPeriodicPacket(sensorDataset.getSid(), false, 30.0, false); poolManager.subscribeForPeriodicPacket(sensorDataset.getSid(), false, 30.0, false);
return RETURN_OK; return RETURN_OK;

View File

@ -57,9 +57,11 @@ void P60DockHandler::parseHkTableReply(const uint8_t *packet) {
dataOffset += 3; dataOffset += 3;
} }
coreHk.temperature1 = static_cast<int16_t>(*(packet + dataOffset) << 8 | *(packet + dataOffset + 1)) * 0.1; coreHk.temperature1 =
static_cast<int16_t>(*(packet + dataOffset) << 8 | *(packet + dataOffset + 1)) * 0.1;
dataOffset += 4; dataOffset += 4;
coreHk.temperature2 = static_cast<int16_t>(*(packet + dataOffset) << 8 | *(packet + dataOffset + 1)) * 0.1; coreHk.temperature2 =
static_cast<int16_t>(*(packet + dataOffset) << 8 | *(packet + dataOffset + 1)) * 0.1;
dataOffset += 4; dataOffset += 4;
auxHk.bootcause = *(packet + dataOffset) << 24 | auxHk.bootcause = *(packet + dataOffset) << 24 |

View File

@ -95,8 +95,7 @@ ReturnValue_t Tmp1075Handler::interpretDeviceReply(DeviceCommandId_t id, const u
dataset.temperatureCelcius = tempValue; dataset.temperatureCelcius = tempValue;
dataset.setValidity(true, true); dataset.setValidity(true, true);
dataset.commit(); dataset.commit();
} } else {
else {
dataset.setValidity(false, true); dataset.setValidity(false, true);
} }
break; break;

View File

@ -38,18 +38,37 @@
// Custom "glue logic" to convert the month name to a usable number // Custom "glue logic" to convert the month name to a usable number
#define GET_MONTH(str, i) \ #define GET_MONTH(str, i) \
(str[i] == 'J' && str[i + 1] == 'a' && str[i + 2] == 'n' ? 1 \ (str[i] == 'J' && str[i + 1] == 'a' && str[i + 2] == 'n' \
: str[i] == 'F' && str[i + 1] == 'e' && str[i + 2] == 'b' ? 2 \ ? 1 \
: str[i] == 'M' && str[i + 1] == 'a' && str[i + 2] == 'r' ? 3 \ : str[i] == 'F' && str[i + 1] == 'e' && str[i + 2] == 'b' \
: str[i] == 'A' && str[i + 1] == 'p' && str[i + 2] == 'r' ? 4 \ ? 2 \
: str[i] == 'M' && str[i + 1] == 'a' && str[i + 2] == 'y' ? 5 \ : str[i] == 'M' && str[i + 1] == 'a' && str[i + 2] == 'r' \
: str[i] == 'J' && str[i + 1] == 'u' && str[i + 2] == 'n' ? 6 \ ? 3 \
: str[i] == 'J' && str[i + 1] == 'u' && str[i + 2] == 'l' ? 7 \ : str[i] == 'A' && str[i + 1] == 'p' && str[i + 2] == 'r' \
: str[i] == 'A' && str[i + 1] == 'u' && str[i + 2] == 'g' ? 8 \ ? 4 \
: str[i] == 'S' && str[i + 1] == 'e' && str[i + 2] == 'p' ? 9 \ : str[i] == 'M' && str[i + 1] == 'a' && str[i + 2] == 'y' \
: str[i] == 'O' && str[i + 1] == 'c' && str[i + 2] == 't' ? 10 \ ? 5 \
: str[i] == 'N' && str[i + 1] == 'o' && str[i + 2] == 'v' ? 11 \ : str[i] == 'J' && str[i + 1] == 'u' && str[i + 2] == 'n' \
: str[i] == 'D' && str[i + 1] == 'e' && str[i + 2] == 'c' ? 12 \ ? 6 \
: str[i] == 'J' && str[i + 1] == 'u' && str[i + 2] == 'l' \
? 7 \
: str[i] == 'A' && str[i + 1] == 'u' && \
str[i + 2] == 'g' \
? 8 \
: str[i] == 'S' && str[i + 1] == 'e' && \
str[i + 2] == 'p' \
? 9 \
: str[i] == 'O' && str[i + 1] == 'c' && \
str[i + 2] == 't' \
? 10 \
: str[i] == 'N' && \
str[i + 1] == 'o' && \
str[i + 2] == 'v' \
? 11 \
: str[i] == 'D' && \
str[i + 1] == 'e' && \
str[i + 2] == 'c' \
? 12 \
: 0) : 0)
// extract the information from the time string given by __TIME__ and __DATE__ // extract the information from the time string given by __TIME__ and __DATE__

View File

@ -12,6 +12,7 @@ folder_list=(
"./bsp_egse" "./bsp_egse"
"./test" "./test"
"./common" "./common"
"./dummies"
) )
cmake_fmt="cmake-format" cmake_fmt="cmake-format"

View File

@ -1,9 +1,9 @@
#include <dummies/SusDummy.h> #include <dummies/SusDummy.h>
#include <dummies/TemperatureSensorsDummy.h> #include <dummies/TemperatureSensorsDummy.h>
#include <fsfw/ipc/QueueFactory.h> #include <fsfw/ipc/QueueFactory.h>
#include <mission/controller/ThermalController.h>
#include <fsfw/tasks/PeriodicTaskIF.h> #include <fsfw/tasks/PeriodicTaskIF.h>
#include <fsfw/tasks/TaskFactory.h> #include <fsfw/tasks/TaskFactory.h>
#include <mission/controller/ThermalController.h>
#include <catch2/catch_test_macros.hpp> #include <catch2/catch_test_macros.hpp>