v1.16.0 #323
@ -52,6 +52,7 @@ list yields a list of all related PRs for each release.
|
|||||||
- Fix for EM SW: Always create ACS Task
|
- Fix for EM SW: Always create ACS Task
|
||||||
- Added Scex device handler and Scex uart reader
|
- Added Scex device handler and Scex uart reader
|
||||||
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/303
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/303
|
||||||
|
- ACS Subsystem. PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/228
|
||||||
|
|
||||||
# [v1.13.0] 24.08.2022
|
# [v1.13.0] 24.08.2022
|
||||||
|
|
||||||
|
@ -65,6 +65,6 @@ void ObjectFactory::produce(void* args) {
|
|||||||
dummy::createDummies(cfg);
|
dummy::createDummies(cfg);
|
||||||
new TemperatureSensorsDummy();
|
new TemperatureSensorsDummy();
|
||||||
new SusDummy();
|
new SusDummy();
|
||||||
new ThermalController(objects::THERMAL_CONTROLLER, objects::NO_OBJECT);
|
new ThermalController(objects::THERMAL_CONTROLLER);
|
||||||
new TestTask(objects::TEST_TASK);
|
new TestTask(objects::TEST_TASK);
|
||||||
}
|
}
|
||||||
|
@ -31,10 +31,7 @@ xsc::Chip CoreController::CURRENT_CHIP = xsc::Chip::NO_CHIP;
|
|||||||
xsc::Copy CoreController::CURRENT_COPY = xsc::Copy::NO_COPY;
|
xsc::Copy CoreController::CURRENT_COPY = xsc::Copy::NO_COPY;
|
||||||
|
|
||||||
CoreController::CoreController(object_id_t objectId)
|
CoreController::CoreController(object_id_t objectId)
|
||||||
: ExtendedControllerBase(objectId, objects::NO_OBJECT, 5),
|
: ExtendedControllerBase(objectId, 5), opDivider5(5), opDivider10(10), hkSet(this) {
|
||||||
opDivider5(5),
|
|
||||||
opDivider10(10),
|
|
||||||
hkSet(this) {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
try {
|
try {
|
||||||
result = initWatchdogFifo();
|
result = initWatchdogFifo();
|
||||||
|
@ -184,6 +184,10 @@ void initmission::initTasks() {
|
|||||||
initmission::printAddObjectError("SUS_BOARD_ASS", objects::SUS_BOARD_ASS);
|
initmission::printAddObjectError("SUS_BOARD_ASS", objects::SUS_BOARD_ASS);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
result = acsSysTask->addComponent(objects::ACS_SUBSYSTEM);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
initmission::printAddObjectError("ACS_SUBSYSTEM", objects::ACS_SUBSYSTEM);
|
||||||
|
}
|
||||||
|
|
||||||
#if OBSW_ADD_RTD_DEVICES == 1
|
#if OBSW_ADD_RTD_DEVICES == 1
|
||||||
PeriodicTaskIF* tcsPollingTask = factory->createPeriodicTask(
|
PeriodicTaskIF* tcsPollingTask = factory->createPeriodicTask(
|
||||||
@ -192,6 +196,7 @@ void initmission::initTasks() {
|
|||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("SPI_RTD_POLLING", objects::SPI_RTD_COM_IF);
|
initmission::printAddObjectError("SPI_RTD_POLLING", objects::SPI_RTD_COM_IF);
|
||||||
}
|
}
|
||||||
|
|
||||||
PeriodicTaskIF* tcsTask = factory->createPeriodicTask(
|
PeriodicTaskIF* tcsTask = factory->createPeriodicTask(
|
||||||
"TCS_TASK", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
"TCS_TASK", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
||||||
std::array<object_id_t, EiveMax31855::NUM_RTDS> rtdIds = {
|
std::array<object_id_t, EiveMax31855::NUM_RTDS> rtdIds = {
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
#include "ObjectFactory.h"
|
#include "ObjectFactory.h"
|
||||||
|
|
||||||
#include <linux/devices/ScexUartReader.h>
|
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#include "bsp_q7s/boardtest/Q7STestTask.h"
|
#include "bsp_q7s/boardtest/Q7STestTask.h"
|
||||||
#include "bsp_q7s/callbacks/gnssCallback.h"
|
#include "bsp_q7s/callbacks/gnssCallback.h"
|
||||||
@ -23,6 +21,7 @@
|
|||||||
#include "linux/callbacks/gpioCallbacks.h"
|
#include "linux/callbacks/gpioCallbacks.h"
|
||||||
#include "linux/csp/CspComIF.h"
|
#include "linux/csp/CspComIF.h"
|
||||||
#include "linux/devices/GPSHyperionLinuxController.h"
|
#include "linux/devices/GPSHyperionLinuxController.h"
|
||||||
|
#include "linux/devices/ScexUartReader.h"
|
||||||
#include "linux/devices/devicedefinitions/PlocMPSoCDefinitions.h"
|
#include "linux/devices/devicedefinitions/PlocMPSoCDefinitions.h"
|
||||||
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
||||||
#include "linux/devices/ploc/PlocMPSoCHandler.h"
|
#include "linux/devices/ploc/PlocMPSoCHandler.h"
|
||||||
@ -37,12 +36,15 @@
|
|||||||
#include "linux/obc/Ptme.h"
|
#include "linux/obc/Ptme.h"
|
||||||
#include "linux/obc/PtmeConfig.h"
|
#include "linux/obc/PtmeConfig.h"
|
||||||
#include "mission/csp/CspCookie.h"
|
#include "mission/csp/CspCookie.h"
|
||||||
#include "mission/system/RwAssembly.h"
|
|
||||||
#include "mission/system/fdir/AcsBoardFdir.h"
|
#include "mission/system/fdir/AcsBoardFdir.h"
|
||||||
#include "mission/system/fdir/GomspacePowerFdir.h"
|
#include "mission/system/fdir/GomspacePowerFdir.h"
|
||||||
#include "mission/system/fdir/RtdFdir.h"
|
#include "mission/system/fdir/RtdFdir.h"
|
||||||
#include "mission/system/fdir/SusFdir.h"
|
#include "mission/system/fdir/SusFdir.h"
|
||||||
#include "mission/system/fdir/SyrlinksFdir.h"
|
#include "mission/system/fdir/SyrlinksFdir.h"
|
||||||
|
#include "mission/system/objects/AcsSubsystem.h"
|
||||||
|
#include "mission/system/objects/RwAssembly.h"
|
||||||
|
#include "mission/system/objects/TcsBoardAssembly.h"
|
||||||
|
#include "mission/system/tree/acsModeTree.h"
|
||||||
#include "tmtc/pusIds.h"
|
#include "tmtc/pusIds.h"
|
||||||
#if OBSW_TEST_LIBGPIOD == 1
|
#if OBSW_TEST_LIBGPIOD == 1
|
||||||
#include "linux/boardtest/LibgpiodTest.h"
|
#include "linux/boardtest/LibgpiodTest.h"
|
||||||
@ -89,7 +91,7 @@
|
|||||||
#include "mission/devices/devicedefinitions/RwDefinitions.h"
|
#include "mission/devices/devicedefinitions/RwDefinitions.h"
|
||||||
#include "mission/devices/devicedefinitions/SyrlinksDefinitions.h"
|
#include "mission/devices/devicedefinitions/SyrlinksDefinitions.h"
|
||||||
#include "mission/devices/devicedefinitions/payloadPcduDefinitions.h"
|
#include "mission/devices/devicedefinitions/payloadPcduDefinitions.h"
|
||||||
#include "mission/system/AcsBoardAssembly.h"
|
#include "mission/system/objects/AcsBoardAssembly.h"
|
||||||
#include "mission/tmtc/CCSDSHandler.h"
|
#include "mission/tmtc/CCSDSHandler.h"
|
||||||
#include "mission/tmtc/TmFunnel.h"
|
#include "mission/tmtc/TmFunnel.h"
|
||||||
#include "mission/tmtc/VirtualChannel.h"
|
#include "mission/tmtc/VirtualChannel.h"
|
||||||
@ -228,6 +230,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
|||||||
PowerSwitchIF* pwrSwitcher) {
|
PowerSwitchIF* pwrSwitcher) {
|
||||||
using namespace gpio;
|
using namespace gpio;
|
||||||
GpioCookie* gpioCookieAcsBoard = new GpioCookie();
|
GpioCookie* gpioCookieAcsBoard = new GpioCookie();
|
||||||
|
std::vector<std::reference_wrapper<DeviceHandlerBase>> assemblyChildren;
|
||||||
|
|
||||||
std::stringstream consumer;
|
std::stringstream consumer;
|
||||||
GpiodRegularByLineName* gpio = nullptr;
|
GpiodRegularByLineName* gpio = nullptr;
|
||||||
@ -332,11 +335,11 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
|||||||
SpiCookie* spiCookie =
|
SpiCookie* spiCookie =
|
||||||
new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, MGMLIS3MDL::MAX_BUFFER_SIZE,
|
new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, MGMLIS3MDL::MAX_BUFFER_SIZE,
|
||||||
spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
|
spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
|
||||||
auto mgmLis3Handler = new MgmLIS3MDLHandler(objects::MGM_0_LIS3_HANDLER, objects::SPI_MAIN_COM_IF,
|
auto mgmLis3Handler0 = new MgmLIS3MDLHandler(
|
||||||
spiCookie, spi::LIS3_TRANSITION_DELAY);
|
objects::MGM_0_LIS3_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::LIS3_TRANSITION_DELAY);
|
||||||
fdir = new AcsBoardFdir(objects::MGM_0_LIS3_HANDLER);
|
fdir = new AcsBoardFdir(objects::MGM_0_LIS3_HANDLER);
|
||||||
mgmLis3Handler->setCustomFdir(fdir);
|
mgmLis3Handler0->setCustomFdir(fdir);
|
||||||
static_cast<void>(mgmLis3Handler);
|
assemblyChildren.push_back(*mgmLis3Handler0);
|
||||||
#if OBSW_TEST_ACS == 1
|
#if OBSW_TEST_ACS == 1
|
||||||
mgmLis3Handler->setStartUpImmediately();
|
mgmLis3Handler->setStartUpImmediately();
|
||||||
mgmLis3Handler->setToGoToNormalMode(true);
|
mgmLis3Handler->setToGoToNormalMode(true);
|
||||||
@ -347,13 +350,12 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
|||||||
spiCookie =
|
spiCookie =
|
||||||
new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, RM3100::MAX_BUFFER_SIZE,
|
new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, RM3100::MAX_BUFFER_SIZE,
|
||||||
spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
|
spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
|
||||||
auto mgmRm3100Handler =
|
auto mgmRm3100Handler1 =
|
||||||
new MgmRM3100Handler(objects::MGM_1_RM3100_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie,
|
new MgmRM3100Handler(objects::MGM_1_RM3100_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie,
|
||||||
spi::RM3100_TRANSITION_DELAY);
|
spi::RM3100_TRANSITION_DELAY);
|
||||||
fdir = new AcsBoardFdir(objects::MGM_1_RM3100_HANDLER);
|
fdir = new AcsBoardFdir(objects::MGM_1_RM3100_HANDLER);
|
||||||
mgmRm3100Handler->setCustomFdir(fdir);
|
mgmRm3100Handler1->setCustomFdir(fdir);
|
||||||
mgmRm3100Handler->setParent(objects::ACS_BOARD_ASS);
|
assemblyChildren.push_back(*mgmRm3100Handler1);
|
||||||
static_cast<void>(mgmRm3100Handler);
|
|
||||||
#if OBSW_TEST_ACS == 1
|
#if OBSW_TEST_ACS == 1
|
||||||
mgmRm3100Handler->setStartUpImmediately();
|
mgmRm3100Handler->setStartUpImmediately();
|
||||||
mgmRm3100Handler->setToGoToNormalMode(true);
|
mgmRm3100Handler->setToGoToNormalMode(true);
|
||||||
@ -364,12 +366,11 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
|||||||
spiCookie =
|
spiCookie =
|
||||||
new SpiCookie(addresses::MGM_2_LIS3, gpioIds::MGM_2_LIS3_CS, MGMLIS3MDL::MAX_BUFFER_SIZE,
|
new SpiCookie(addresses::MGM_2_LIS3, gpioIds::MGM_2_LIS3_CS, MGMLIS3MDL::MAX_BUFFER_SIZE,
|
||||||
spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
|
spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
|
||||||
mgmLis3Handler = new MgmLIS3MDLHandler(objects::MGM_2_LIS3_HANDLER, objects::SPI_MAIN_COM_IF,
|
auto* mgmLis3Handler2 = new MgmLIS3MDLHandler(
|
||||||
spiCookie, spi::LIS3_TRANSITION_DELAY);
|
objects::MGM_2_LIS3_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::LIS3_TRANSITION_DELAY);
|
||||||
fdir = new AcsBoardFdir(objects::MGM_2_LIS3_HANDLER);
|
fdir = new AcsBoardFdir(objects::MGM_2_LIS3_HANDLER);
|
||||||
mgmLis3Handler->setCustomFdir(fdir);
|
mgmLis3Handler2->setCustomFdir(fdir);
|
||||||
mgmLis3Handler->setParent(objects::ACS_BOARD_ASS);
|
assemblyChildren.push_back(*mgmLis3Handler2);
|
||||||
static_cast<void>(mgmLis3Handler);
|
|
||||||
#if OBSW_TEST_ACS == 1
|
#if OBSW_TEST_ACS == 1
|
||||||
mgmLis3Handler->setStartUpImmediately();
|
mgmLis3Handler->setStartUpImmediately();
|
||||||
mgmLis3Handler->setToGoToNormalMode(true);
|
mgmLis3Handler->setToGoToNormalMode(true);
|
||||||
@ -380,11 +381,12 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
|||||||
spiCookie =
|
spiCookie =
|
||||||
new SpiCookie(addresses::MGM_3_RM3100, gpioIds::MGM_3_RM3100_CS, RM3100::MAX_BUFFER_SIZE,
|
new SpiCookie(addresses::MGM_3_RM3100, gpioIds::MGM_3_RM3100_CS, RM3100::MAX_BUFFER_SIZE,
|
||||||
spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
|
spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
|
||||||
mgmRm3100Handler = new MgmRM3100Handler(objects::MGM_3_RM3100_HANDLER, objects::SPI_MAIN_COM_IF,
|
auto* mgmRm3100Handler3 =
|
||||||
spiCookie, spi::RM3100_TRANSITION_DELAY);
|
new MgmRM3100Handler(objects::MGM_3_RM3100_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie,
|
||||||
|
spi::RM3100_TRANSITION_DELAY);
|
||||||
fdir = new AcsBoardFdir(objects::MGM_3_RM3100_HANDLER);
|
fdir = new AcsBoardFdir(objects::MGM_3_RM3100_HANDLER);
|
||||||
mgmRm3100Handler->setCustomFdir(fdir);
|
mgmRm3100Handler3->setCustomFdir(fdir);
|
||||||
mgmRm3100Handler->setParent(objects::ACS_BOARD_ASS);
|
assemblyChildren.push_back(*mgmRm3100Handler3);
|
||||||
#if OBSW_TEST_ACS == 1
|
#if OBSW_TEST_ACS == 1
|
||||||
mgmRm3100Handler->setStartUpImmediately();
|
mgmRm3100Handler->setStartUpImmediately();
|
||||||
mgmRm3100Handler->setToGoToNormalMode(true);
|
mgmRm3100Handler->setToGoToNormalMode(true);
|
||||||
@ -402,8 +404,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
|||||||
ADIS1650X::Type::ADIS16505);
|
ADIS1650X::Type::ADIS16505);
|
||||||
fdir = new AcsBoardFdir(objects::GYRO_0_ADIS_HANDLER);
|
fdir = new AcsBoardFdir(objects::GYRO_0_ADIS_HANDLER);
|
||||||
adisHandler->setCustomFdir(fdir);
|
adisHandler->setCustomFdir(fdir);
|
||||||
adisHandler->setParent(objects::ACS_BOARD_ASS);
|
assemblyChildren.push_back(*adisHandler);
|
||||||
static_cast<void>(adisHandler);
|
|
||||||
#if OBSW_TEST_ACS == 1
|
#if OBSW_TEST_ACS == 1
|
||||||
adisHandler->setStartUpImmediately();
|
adisHandler->setStartUpImmediately();
|
||||||
adisHandler->setToGoToNormalModeImmediately();
|
adisHandler->setToGoToNormalModeImmediately();
|
||||||
@ -414,12 +415,11 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
|||||||
// Gyro 1 Side A
|
// Gyro 1 Side A
|
||||||
spiCookie = new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, L3GD20H::MAX_BUFFER_SIZE,
|
spiCookie = new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, L3GD20H::MAX_BUFFER_SIZE,
|
||||||
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
|
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
|
||||||
auto gyroL3gHandler = new GyroHandlerL3GD20H(
|
auto gyroL3gHandler1 = new GyroHandlerL3GD20H(
|
||||||
objects::GYRO_1_L3G_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::L3G_TRANSITION_DELAY);
|
objects::GYRO_1_L3G_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::L3G_TRANSITION_DELAY);
|
||||||
fdir = new AcsBoardFdir(objects::GYRO_1_L3G_HANDLER);
|
fdir = new AcsBoardFdir(objects::GYRO_1_L3G_HANDLER);
|
||||||
gyroL3gHandler->setCustomFdir(fdir);
|
gyroL3gHandler1->setCustomFdir(fdir);
|
||||||
gyroL3gHandler->setParent(objects::ACS_BOARD_ASS);
|
assemblyChildren.push_back(*gyroL3gHandler1);
|
||||||
static_cast<void>(gyroL3gHandler);
|
|
||||||
#if OBSW_TEST_ACS == 1
|
#if OBSW_TEST_ACS == 1
|
||||||
gyroL3gHandler->setStartUpImmediately();
|
gyroL3gHandler->setStartUpImmediately();
|
||||||
gyroL3gHandler->setToGoToNormalMode(true);
|
gyroL3gHandler->setToGoToNormalMode(true);
|
||||||
@ -435,7 +435,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
|||||||
spiCookie, ADIS1650X::Type::ADIS16505);
|
spiCookie, ADIS1650X::Type::ADIS16505);
|
||||||
fdir = new AcsBoardFdir(objects::GYRO_2_ADIS_HANDLER);
|
fdir = new AcsBoardFdir(objects::GYRO_2_ADIS_HANDLER);
|
||||||
adisHandler->setCustomFdir(fdir);
|
adisHandler->setCustomFdir(fdir);
|
||||||
adisHandler->setParent(objects::ACS_BOARD_ASS);
|
assemblyChildren.push_back(*adisHandler);
|
||||||
#if OBSW_TEST_ACS == 1
|
#if OBSW_TEST_ACS == 1
|
||||||
adisHandler->setStartUpImmediately();
|
adisHandler->setStartUpImmediately();
|
||||||
adisHandler->setToGoToNormalModeImmediately();
|
adisHandler->setToGoToNormalModeImmediately();
|
||||||
@ -443,11 +443,11 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
|||||||
// Gyro 3 Side B
|
// Gyro 3 Side B
|
||||||
spiCookie = new SpiCookie(addresses::GYRO_3_L3G, gpioIds::GYRO_3_L3G_CS, L3GD20H::MAX_BUFFER_SIZE,
|
spiCookie = new SpiCookie(addresses::GYRO_3_L3G, gpioIds::GYRO_3_L3G_CS, L3GD20H::MAX_BUFFER_SIZE,
|
||||||
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
|
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
|
||||||
gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_3_L3G_HANDLER, objects::SPI_MAIN_COM_IF,
|
auto gyroL3gHandler3 = new GyroHandlerL3GD20H(
|
||||||
spiCookie, spi::L3G_TRANSITION_DELAY);
|
objects::GYRO_3_L3G_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::L3G_TRANSITION_DELAY);
|
||||||
fdir = new AcsBoardFdir(objects::GYRO_3_L3G_HANDLER);
|
fdir = new AcsBoardFdir(objects::GYRO_3_L3G_HANDLER);
|
||||||
gyroL3gHandler->setCustomFdir(fdir);
|
gyroL3gHandler3->setCustomFdir(fdir);
|
||||||
gyroL3gHandler->setParent(objects::ACS_BOARD_ASS);
|
assemblyChildren.push_back(*gyroL3gHandler3);
|
||||||
#if OBSW_TEST_ACS == 1
|
#if OBSW_TEST_ACS == 1
|
||||||
gyroL3gHandler->setStartUpImmediately();
|
gyroL3gHandler->setStartUpImmediately();
|
||||||
gyroL3gHandler->setToGoToNormalMode(true);
|
gyroL3gHandler->setToGoToNormalMode(true);
|
||||||
@ -464,14 +464,22 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
|||||||
auto gpsCtrl =
|
auto gpsCtrl =
|
||||||
new GPSHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps);
|
new GPSHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps);
|
||||||
gpsCtrl->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS);
|
gpsCtrl->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS);
|
||||||
|
|
||||||
AcsBoardHelper acsBoardHelper = AcsBoardHelper(
|
AcsBoardHelper acsBoardHelper = AcsBoardHelper(
|
||||||
objects::MGM_0_LIS3_HANDLER, objects::MGM_1_RM3100_HANDLER, objects::MGM_2_LIS3_HANDLER,
|
objects::MGM_0_LIS3_HANDLER, objects::MGM_1_RM3100_HANDLER, objects::MGM_2_LIS3_HANDLER,
|
||||||
objects::MGM_3_RM3100_HANDLER, objects::GYRO_0_ADIS_HANDLER, objects::GYRO_1_L3G_HANDLER,
|
objects::MGM_3_RM3100_HANDLER, objects::GYRO_0_ADIS_HANDLER, objects::GYRO_1_L3G_HANDLER,
|
||||||
objects::GYRO_2_ADIS_HANDLER, objects::GYRO_3_L3G_HANDLER, objects::GPS_CONTROLLER);
|
objects::GYRO_2_ADIS_HANDLER, objects::GYRO_3_L3G_HANDLER, objects::GPS_CONTROLLER);
|
||||||
auto acsAss = new AcsBoardAssembly(objects::ACS_BOARD_ASS, objects::NO_OBJECT, pwrSwitcher,
|
auto acsAss =
|
||||||
acsBoardHelper, gpioComIF);
|
new AcsBoardAssembly(objects::ACS_BOARD_ASS, pwrSwitcher, acsBoardHelper, gpioComIF);
|
||||||
static_cast<void>(acsAss);
|
static_cast<void>(acsAss);
|
||||||
|
for (auto& assChild : assemblyChildren) {
|
||||||
|
ReturnValue_t result = assChild.get().connectModeTreeParent(*acsAss);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
sif::error << "Connecting assembly for ACS board component " << assChild.get().getObjectId()
|
||||||
|
<< " failed" << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
gpsCtrl->connectModeTreeParent(*acsAss);
|
||||||
|
acsAss->connectModeTreeParent(satsystem::ACS_SUBSYSTEM);
|
||||||
#endif /* OBSW_ADD_ACS_HANDLERS == 1 */
|
#endif /* OBSW_ADD_ACS_HANDLERS == 1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -684,9 +692,16 @@ void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF,
|
|||||||
}
|
}
|
||||||
|
|
||||||
RwHelper rwHelper(rwIds);
|
RwHelper rwHelper(rwIds);
|
||||||
auto* rwAss = new RwAssembly(objects::RW_ASS, objects::NO_OBJECT, pwrSwitcher,
|
auto* rwAss =
|
||||||
pcdu::Switches::PDU2_CH2_RW_5V, rwHelper);
|
new RwAssembly(objects::RW_ASS, pwrSwitcher, pcdu::Switches::PDU2_CH2_RW_5V, rwHelper);
|
||||||
static_cast<void>(rwAss);
|
for (uint8_t idx = 0; idx < rws.size(); idx++) {
|
||||||
|
ReturnValue_t result = rws[idx]->connectModeTreeParent(*rwAss);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
sif::error << "Connecting RW " << static_cast<int>(idx) << " to RW assembly failed"
|
||||||
|
<< std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rwAss->connectModeTreeParent(satsystem::ACS_SUBSYSTEM);
|
||||||
#endif /* OBSW_ADD_RW == 1 */
|
#endif /* OBSW_ADD_RW == 1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -885,6 +900,7 @@ void ObjectFactory::createStrComponents(PowerSwitchIF* pwrSwitcher) {
|
|||||||
new StarTrackerHandler(objects::STAR_TRACKER, objects::UART_COM_IF, starTrackerCookie,
|
new StarTrackerHandler(objects::STAR_TRACKER, objects::UART_COM_IF, starTrackerCookie,
|
||||||
strHelper, pcdu::PDU1_CH2_STAR_TRACKER_5V);
|
strHelper, pcdu::PDU1_CH2_STAR_TRACKER_5V);
|
||||||
starTracker->setPowerSwitcher(pwrSwitcher);
|
starTracker->setPowerSwitcher(pwrSwitcher);
|
||||||
|
starTracker->connectModeTreeParent(satsystem::ACS_SUBSYSTEM);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher) {
|
void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher) {
|
||||||
@ -893,6 +909,7 @@ void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher) {
|
|||||||
auto imtqHandler = new ImtqHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie,
|
auto imtqHandler = new ImtqHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie,
|
||||||
pcdu::Switches::PDU1_CH3_MGT_5V);
|
pcdu::Switches::PDU1_CH3_MGT_5V);
|
||||||
imtqHandler->setPowerSwitcher(pwrSwitcher);
|
imtqHandler->setPowerSwitcher(pwrSwitcher);
|
||||||
|
imtqHandler->connectModeTreeParent(satsystem::ACS_SUBSYSTEM);
|
||||||
static_cast<void>(imtqHandler);
|
static_cast<void>(imtqHandler);
|
||||||
#if OBSW_TEST_IMTQ == 1
|
#if OBSW_TEST_IMTQ == 1
|
||||||
imtqHandler->setStartUpImmediately();
|
imtqHandler->setStartUpImmediately();
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include "linux/ObjectFactory.h"
|
#include "linux/ObjectFactory.h"
|
||||||
#include "linux/callbacks/gpioCallbacks.h"
|
#include "linux/callbacks/gpioCallbacks.h"
|
||||||
#include "mission/core/GenericFactory.h"
|
#include "mission/core/GenericFactory.h"
|
||||||
|
#include "mission/system/tree/acsModeTree.h"
|
||||||
|
|
||||||
void ObjectFactory::produce(void* args) {
|
void ObjectFactory::produce(void* args) {
|
||||||
ObjectFactory::setStatics();
|
ObjectFactory::setStatics();
|
||||||
@ -75,5 +76,6 @@ void ObjectFactory::produce(void* args) {
|
|||||||
|
|
||||||
createMiscComponents();
|
createMiscComponents();
|
||||||
createThermalController();
|
createThermalController();
|
||||||
createAcsController();
|
createAcsController(true);
|
||||||
|
satsystem::initAcsSubsystem(objects::NO_OBJECT);
|
||||||
}
|
}
|
||||||
|
@ -127,6 +127,8 @@ enum commonObjects : uint32_t {
|
|||||||
SUS_BOARD_ASS = 0x73000002,
|
SUS_BOARD_ASS = 0x73000002,
|
||||||
TCS_BOARD_ASS = 0x73000003,
|
TCS_BOARD_ASS = 0x73000003,
|
||||||
RW_ASS = 0x73000004,
|
RW_ASS = 0x73000004,
|
||||||
|
ACS_SUBSYSTEM = 0x73010001,
|
||||||
|
EIVE_SYSTEM = 0x73010000,
|
||||||
CFDP_HANDLER = 0x73000005,
|
CFDP_HANDLER = 0x73000005,
|
||||||
CFDP_DISTRIBUTOR = 0x73000006,
|
CFDP_DISTRIBUTOR = 0x73000006,
|
||||||
TM_FUNNEL = 0x73000100,
|
TM_FUNNEL = 0x73000100,
|
||||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
|||||||
Subproject commit 24612091690f191d799f30ba38b5f750d0617fa3
|
Subproject commit 7600ed1ea70ef2998739800f84722dd7cadb7552
|
@ -181,15 +181,15 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
12709;0x31a5;I_MPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
|
12709;0x31a5;I_MPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
|
||||||
12710;0x31a6;U_HPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
|
12710;0x31a6;U_HPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
|
||||||
12711;0x31a7;I_HPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
|
12711;0x31a7;I_HPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
|
||||||
12800;0x3200;TRANSITION_OTHER_SIDE_FAILED;HIGH;;mission/system/AcsBoardAssembly.h
|
12800;0x3200;TRANSITION_OTHER_SIDE_FAILED;HIGH;;mission/system/objects/AcsBoardAssembly.h
|
||||||
12801;0x3201;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;;mission/system/AcsBoardAssembly.h
|
12801;0x3201;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;;mission/system/objects/AcsBoardAssembly.h
|
||||||
12802;0x3202;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;;mission/system/AcsBoardAssembly.h
|
12802;0x3202;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;;mission/system/objects/AcsBoardAssembly.h
|
||||||
12803;0x3203;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/AcsBoardAssembly.h
|
12803;0x3203;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/objects/AcsBoardAssembly.h
|
||||||
12900;0x3264;TRANSITION_OTHER_SIDE_FAILED;HIGH;;mission/system/SusAssembly.h
|
12900;0x3264;TRANSITION_OTHER_SIDE_FAILED;HIGH;;mission/system/objects/SusAssembly.h
|
||||||
12901;0x3265;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;;mission/system/SusAssembly.h
|
12901;0x3265;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;;mission/system/objects/SusAssembly.h
|
||||||
12902;0x3266;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;;mission/system/SusAssembly.h
|
12902;0x3266;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;;mission/system/objects/SusAssembly.h
|
||||||
12903;0x3267;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/SusAssembly.h
|
12903;0x3267;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/objects/SusAssembly.h
|
||||||
13000;0x32c8;CHILDREN_LOST_MODE;MEDIUM;;mission/system/TcsBoardAssembly.h
|
13000;0x32c8;CHILDREN_LOST_MODE;MEDIUM;;mission/system/objects/TcsBoardAssembly.h
|
||||||
13100;0x332c;GPS_FIX_CHANGE;INFO;Fix has changed. P1: Old fix. P2: New fix 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix;mission/devices/devicedefinitions/GPSDefinitions.h
|
13100;0x332c;GPS_FIX_CHANGE;INFO;Fix has changed. P1: Old fix. P2: New fix 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix;mission/devices/devicedefinitions/GPSDefinitions.h
|
||||||
13200;0x3390;P60_BOOT_COUNT;INFO;P60 boot count is broadcasted once at SW startup. P1: Boot count;mission/devices/P60DockHandler.h
|
13200;0x3390;P60_BOOT_COUNT;INFO;P60 boot count is broadcasted once at SW startup. P1: Boot count;mission/devices/P60DockHandler.h
|
||||||
13201;0x3391;BATT_MODE;INFO;Battery mode is broadcasted at startup. P1: Mode;mission/devices/P60DockHandler.h
|
13201;0x3391;BATT_MODE;INFO;Battery mode is broadcasted at startup. P1: Mode;mission/devices/P60DockHandler.h
|
||||||
|
|
@ -136,5 +136,7 @@
|
|||||||
0x73000100;TM_FUNNEL
|
0x73000100;TM_FUNNEL
|
||||||
0x73000101;PUS_TM_FUNNEL
|
0x73000101;PUS_TM_FUNNEL
|
||||||
0x73000102;CFDP_TM_FUNNEL
|
0x73000102;CFDP_TM_FUNNEL
|
||||||
|
0x73010000;EIVE_SYSTEM
|
||||||
|
0x73010001;ACS_SUBSYSTEM
|
||||||
0x73500000;CCSDS_IP_CORE_BRIDGE
|
0x73500000;CCSDS_IP_CORE_BRIDGE
|
||||||
0xFFFFFFFF;NO_OBJECT
|
0xFFFFFFFF;NO_OBJECT
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 233 translations.
|
* @brief Auto-generated event translation file. Contains 233 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2022-10-27 09:03:07
|
* Generated on: 2022-10-27 09:17:50
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 140 translations.
|
* Contains 142 translations.
|
||||||
* Generated on: 2022-10-27 09:03:07
|
* Generated on: 2022-10-27 09:17:50
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
@ -144,6 +144,8 @@ const char *CFDP_DISTRIBUTOR_STRING = "CFDP_DISTRIBUTOR";
|
|||||||
const char *TM_FUNNEL_STRING = "TM_FUNNEL";
|
const char *TM_FUNNEL_STRING = "TM_FUNNEL";
|
||||||
const char *PUS_TM_FUNNEL_STRING = "PUS_TM_FUNNEL";
|
const char *PUS_TM_FUNNEL_STRING = "PUS_TM_FUNNEL";
|
||||||
const char *CFDP_TM_FUNNEL_STRING = "CFDP_TM_FUNNEL";
|
const char *CFDP_TM_FUNNEL_STRING = "CFDP_TM_FUNNEL";
|
||||||
|
const char *EIVE_SYSTEM_STRING = "EIVE_SYSTEM";
|
||||||
|
const char *ACS_SUBSYSTEM_STRING = "ACS_SUBSYSTEM";
|
||||||
const char *CCSDS_IP_CORE_BRIDGE_STRING = "CCSDS_IP_CORE_BRIDGE";
|
const char *CCSDS_IP_CORE_BRIDGE_STRING = "CCSDS_IP_CORE_BRIDGE";
|
||||||
const char *NO_OBJECT_STRING = "NO_OBJECT";
|
const char *NO_OBJECT_STRING = "NO_OBJECT";
|
||||||
|
|
||||||
@ -425,6 +427,10 @@ const char *translateObject(object_id_t object) {
|
|||||||
return PUS_TM_FUNNEL_STRING;
|
return PUS_TM_FUNNEL_STRING;
|
||||||
case 0x73000102:
|
case 0x73000102:
|
||||||
return CFDP_TM_FUNNEL_STRING;
|
return CFDP_TM_FUNNEL_STRING;
|
||||||
|
case 0x73010000:
|
||||||
|
return EIVE_SYSTEM_STRING;
|
||||||
|
case 0x73010001:
|
||||||
|
return ACS_SUBSYSTEM_STRING;
|
||||||
case 0x73500000:
|
case 0x73500000:
|
||||||
return CCSDS_IP_CORE_BRIDGE_STRING;
|
return CCSDS_IP_CORE_BRIDGE_STRING;
|
||||||
case 0xFFFFFFFF:
|
case 0xFFFFFFFF:
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "ObjectFactory.h"
|
#include "ObjectFactory.h"
|
||||||
|
|
||||||
#include <fsfw/power/PowerSwitchIF.h>
|
#include <fsfw/power/PowerSwitchIF.h>
|
||||||
|
#include <fsfw/subsystem/Subsystem.h>
|
||||||
#include <fsfw_hal/common/gpio/GpioCookie.h>
|
#include <fsfw_hal/common/gpio/GpioCookie.h>
|
||||||
#include <fsfw_hal/common/gpio/GpioIF.h>
|
#include <fsfw_hal/common/gpio/GpioIF.h>
|
||||||
#include <fsfw_hal/common/gpio/gpioDefinitions.h>
|
#include <fsfw_hal/common/gpio/gpioDefinitions.h>
|
||||||
@ -15,15 +16,16 @@
|
|||||||
#include <mission/devices/Max31865PT1000Handler.h>
|
#include <mission/devices/Max31865PT1000Handler.h>
|
||||||
#include <mission/devices/ScexDeviceHandler.h>
|
#include <mission/devices/ScexDeviceHandler.h>
|
||||||
#include <mission/devices/SusHandler.h>
|
#include <mission/devices/SusHandler.h>
|
||||||
#include <mission/system/SusAssembly.h>
|
|
||||||
#include <mission/system/TcsBoardAssembly.h>
|
|
||||||
#include <mission/system/fdir/RtdFdir.h>
|
#include <mission/system/fdir/RtdFdir.h>
|
||||||
#include <mission/system/fdir/SusFdir.h>
|
#include <mission/system/fdir/SusFdir.h>
|
||||||
|
#include <mission/system/objects/SusAssembly.h>
|
||||||
|
#include <mission/system/objects/TcsBoardAssembly.h>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#include "devConf.h"
|
#include "devConf.h"
|
||||||
#include "devices/addresses.h"
|
#include "devices/addresses.h"
|
||||||
#include "devices/gpioIds.h"
|
#include "devices/gpioIds.h"
|
||||||
|
#include "mission/system/tree/acsModeTree.h"
|
||||||
|
|
||||||
void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiComIF,
|
void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiComIF,
|
||||||
PowerSwitchIF* pwrSwitcher, std::string spiDev) {
|
PowerSwitchIF* pwrSwitcher, std::string spiDev) {
|
||||||
@ -78,7 +80,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
|||||||
susHandlers[0] =
|
susHandlers[0] =
|
||||||
new SusHandler(objects::SUS_0_N_LOC_XFYFZM_PT_XF, 0, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_0_N_LOC_XFYFZM_PT_XF, 0, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_0_N_LOC_XFYFZM_PT_XF);
|
fdir = new SusFdir(objects::SUS_0_N_LOC_XFYFZM_PT_XF);
|
||||||
susHandlers[0]->setParent(objects::SUS_BOARD_ASS);
|
|
||||||
susHandlers[0]->setCustomFdir(fdir);
|
susHandlers[0]->setCustomFdir(fdir);
|
||||||
|
|
||||||
spiCookie = new SpiCookie(addresses::SUS_1, gpioIds::CS_SUS_1, SUS::MAX_CMD_SIZE,
|
spiCookie = new SpiCookie(addresses::SUS_1, gpioIds::CS_SUS_1, SUS::MAX_CMD_SIZE,
|
||||||
@ -86,7 +87,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
|||||||
susHandlers[1] =
|
susHandlers[1] =
|
||||||
new SusHandler(objects::SUS_1_N_LOC_XBYFZM_PT_XB, 1, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_1_N_LOC_XBYFZM_PT_XB, 1, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_1_N_LOC_XBYFZM_PT_XB);
|
fdir = new SusFdir(objects::SUS_1_N_LOC_XBYFZM_PT_XB);
|
||||||
susHandlers[1]->setParent(objects::SUS_BOARD_ASS);
|
|
||||||
susHandlers[1]->setCustomFdir(fdir);
|
susHandlers[1]->setCustomFdir(fdir);
|
||||||
|
|
||||||
spiCookie = new SpiCookie(addresses::SUS_2, gpioIds::CS_SUS_2, SUS::MAX_CMD_SIZE,
|
spiCookie = new SpiCookie(addresses::SUS_2, gpioIds::CS_SUS_2, SUS::MAX_CMD_SIZE,
|
||||||
@ -94,7 +94,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
|||||||
susHandlers[2] =
|
susHandlers[2] =
|
||||||
new SusHandler(objects::SUS_2_N_LOC_XFYBZB_PT_YB, 2, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_2_N_LOC_XFYBZB_PT_YB, 2, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_2_N_LOC_XFYBZB_PT_YB);
|
fdir = new SusFdir(objects::SUS_2_N_LOC_XFYBZB_PT_YB);
|
||||||
susHandlers[2]->setParent(objects::SUS_BOARD_ASS);
|
|
||||||
susHandlers[2]->setCustomFdir(fdir);
|
susHandlers[2]->setCustomFdir(fdir);
|
||||||
|
|
||||||
spiCookie = new SpiCookie(addresses::SUS_3, gpioIds::CS_SUS_3, SUS::MAX_CMD_SIZE,
|
spiCookie = new SpiCookie(addresses::SUS_3, gpioIds::CS_SUS_3, SUS::MAX_CMD_SIZE,
|
||||||
@ -102,7 +101,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
|||||||
susHandlers[3] =
|
susHandlers[3] =
|
||||||
new SusHandler(objects::SUS_3_N_LOC_XFYBZF_PT_YF, 3, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_3_N_LOC_XFYBZF_PT_YF, 3, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_3_N_LOC_XFYBZF_PT_YF);
|
fdir = new SusFdir(objects::SUS_3_N_LOC_XFYBZF_PT_YF);
|
||||||
susHandlers[3]->setParent(objects::SUS_BOARD_ASS);
|
|
||||||
susHandlers[3]->setCustomFdir(fdir);
|
susHandlers[3]->setCustomFdir(fdir);
|
||||||
|
|
||||||
spiCookie = new SpiCookie(addresses::SUS_4, gpioIds::CS_SUS_4, SUS::MAX_CMD_SIZE,
|
spiCookie = new SpiCookie(addresses::SUS_4, gpioIds::CS_SUS_4, SUS::MAX_CMD_SIZE,
|
||||||
@ -110,7 +108,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
|||||||
susHandlers[4] =
|
susHandlers[4] =
|
||||||
new SusHandler(objects::SUS_4_N_LOC_XMYFZF_PT_ZF, 4, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_4_N_LOC_XMYFZF_PT_ZF, 4, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_4_N_LOC_XMYFZF_PT_ZF);
|
fdir = new SusFdir(objects::SUS_4_N_LOC_XMYFZF_PT_ZF);
|
||||||
susHandlers[4]->setParent(objects::SUS_BOARD_ASS);
|
|
||||||
susHandlers[4]->setCustomFdir(fdir);
|
susHandlers[4]->setCustomFdir(fdir);
|
||||||
|
|
||||||
spiCookie = new SpiCookie(addresses::SUS_5, gpioIds::CS_SUS_5, SUS::MAX_CMD_SIZE,
|
spiCookie = new SpiCookie(addresses::SUS_5, gpioIds::CS_SUS_5, SUS::MAX_CMD_SIZE,
|
||||||
@ -118,7 +115,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
|||||||
susHandlers[5] =
|
susHandlers[5] =
|
||||||
new SusHandler(objects::SUS_5_N_LOC_XFYMZB_PT_ZB, 5, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_5_N_LOC_XFYMZB_PT_ZB, 5, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_5_N_LOC_XFYMZB_PT_ZB);
|
fdir = new SusFdir(objects::SUS_5_N_LOC_XFYMZB_PT_ZB);
|
||||||
susHandlers[5]->setParent(objects::SUS_BOARD_ASS);
|
|
||||||
susHandlers[5]->setCustomFdir(fdir);
|
susHandlers[5]->setCustomFdir(fdir);
|
||||||
|
|
||||||
spiCookie = new SpiCookie(addresses::SUS_6, gpioIds::CS_SUS_6, SUS::MAX_CMD_SIZE,
|
spiCookie = new SpiCookie(addresses::SUS_6, gpioIds::CS_SUS_6, SUS::MAX_CMD_SIZE,
|
||||||
@ -126,7 +122,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
|||||||
susHandlers[6] =
|
susHandlers[6] =
|
||||||
new SusHandler(objects::SUS_6_R_LOC_XFYBZM_PT_XF, 6, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_6_R_LOC_XFYBZM_PT_XF, 6, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_6_R_LOC_XFYBZM_PT_XF);
|
fdir = new SusFdir(objects::SUS_6_R_LOC_XFYBZM_PT_XF);
|
||||||
susHandlers[6]->setParent(objects::SUS_BOARD_ASS);
|
|
||||||
susHandlers[6]->setCustomFdir(fdir);
|
susHandlers[6]->setCustomFdir(fdir);
|
||||||
|
|
||||||
spiCookie = new SpiCookie(addresses::SUS_7, gpioIds::CS_SUS_7, SUS::MAX_CMD_SIZE,
|
spiCookie = new SpiCookie(addresses::SUS_7, gpioIds::CS_SUS_7, SUS::MAX_CMD_SIZE,
|
||||||
@ -134,7 +129,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
|||||||
susHandlers[7] =
|
susHandlers[7] =
|
||||||
new SusHandler(objects::SUS_7_R_LOC_XBYBZM_PT_XB, 7, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_7_R_LOC_XBYBZM_PT_XB, 7, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_7_R_LOC_XBYBZM_PT_XB);
|
fdir = new SusFdir(objects::SUS_7_R_LOC_XBYBZM_PT_XB);
|
||||||
susHandlers[7]->setParent(objects::SUS_BOARD_ASS);
|
|
||||||
susHandlers[7]->setCustomFdir(fdir);
|
susHandlers[7]->setCustomFdir(fdir);
|
||||||
|
|
||||||
spiCookie = new SpiCookie(addresses::SUS_8, gpioIds::CS_SUS_8, SUS::MAX_CMD_SIZE,
|
spiCookie = new SpiCookie(addresses::SUS_8, gpioIds::CS_SUS_8, SUS::MAX_CMD_SIZE,
|
||||||
@ -142,7 +136,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
|||||||
susHandlers[8] =
|
susHandlers[8] =
|
||||||
new SusHandler(objects::SUS_8_R_LOC_XBYBZB_PT_YB, 8, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_8_R_LOC_XBYBZB_PT_YB, 8, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_8_R_LOC_XBYBZB_PT_YB);
|
fdir = new SusFdir(objects::SUS_8_R_LOC_XBYBZB_PT_YB);
|
||||||
susHandlers[8]->setParent(objects::SUS_BOARD_ASS);
|
|
||||||
susHandlers[8]->setCustomFdir(fdir);
|
susHandlers[8]->setCustomFdir(fdir);
|
||||||
|
|
||||||
spiCookie = new SpiCookie(addresses::SUS_9, gpioIds::CS_SUS_9, SUS::MAX_CMD_SIZE,
|
spiCookie = new SpiCookie(addresses::SUS_9, gpioIds::CS_SUS_9, SUS::MAX_CMD_SIZE,
|
||||||
@ -150,7 +143,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
|||||||
susHandlers[9] =
|
susHandlers[9] =
|
||||||
new SusHandler(objects::SUS_9_R_LOC_XBYBZB_PT_YF, 9, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_9_R_LOC_XBYBZB_PT_YF, 9, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_9_R_LOC_XBYBZB_PT_YF);
|
fdir = new SusFdir(objects::SUS_9_R_LOC_XBYBZB_PT_YF);
|
||||||
susHandlers[9]->setParent(objects::SUS_BOARD_ASS);
|
|
||||||
susHandlers[9]->setCustomFdir(fdir);
|
susHandlers[9]->setCustomFdir(fdir);
|
||||||
|
|
||||||
spiCookie = new SpiCookie(addresses::SUS_10, gpioIds::CS_SUS_10, SUS::MAX_CMD_SIZE,
|
spiCookie = new SpiCookie(addresses::SUS_10, gpioIds::CS_SUS_10, SUS::MAX_CMD_SIZE,
|
||||||
@ -158,7 +150,6 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
|||||||
susHandlers[10] =
|
susHandlers[10] =
|
||||||
new SusHandler(objects::SUS_10_N_LOC_XMYBZF_PT_ZF, 10, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_10_N_LOC_XMYBZF_PT_ZF, 10, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_10_N_LOC_XMYBZF_PT_ZF);
|
fdir = new SusFdir(objects::SUS_10_N_LOC_XMYBZF_PT_ZF);
|
||||||
susHandlers[10]->setParent(objects::SUS_BOARD_ASS);
|
|
||||||
susHandlers[10]->setCustomFdir(fdir);
|
susHandlers[10]->setCustomFdir(fdir);
|
||||||
|
|
||||||
spiCookie = new SpiCookie(addresses::SUS_11, gpioIds::CS_SUS_11, SUS::MAX_CMD_SIZE,
|
spiCookie = new SpiCookie(addresses::SUS_11, gpioIds::CS_SUS_11, SUS::MAX_CMD_SIZE,
|
||||||
@ -166,11 +157,24 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
|||||||
susHandlers[11] =
|
susHandlers[11] =
|
||||||
new SusHandler(objects::SUS_11_R_LOC_XBYMZB_PT_ZB, 11, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_11_R_LOC_XBYMZB_PT_ZB, 11, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_11_R_LOC_XBYMZB_PT_ZB);
|
fdir = new SusFdir(objects::SUS_11_R_LOC_XBYMZB_PT_ZB);
|
||||||
susHandlers[11]->setParent(objects::SUS_BOARD_ASS);
|
|
||||||
susHandlers[11]->setCustomFdir(fdir);
|
susHandlers[11]->setCustomFdir(fdir);
|
||||||
|
|
||||||
|
std::array<object_id_t, 12> susIds = {
|
||||||
|
objects::SUS_0_N_LOC_XFYFZM_PT_XF, objects::SUS_1_N_LOC_XBYFZM_PT_XB,
|
||||||
|
objects::SUS_2_N_LOC_XFYBZB_PT_YB, objects::SUS_3_N_LOC_XFYBZF_PT_YF,
|
||||||
|
objects::SUS_4_N_LOC_XMYFZF_PT_ZF, objects::SUS_5_N_LOC_XFYMZB_PT_ZB,
|
||||||
|
objects::SUS_6_R_LOC_XFYBZM_PT_XF, objects::SUS_7_R_LOC_XBYBZM_PT_XB,
|
||||||
|
objects::SUS_8_R_LOC_XBYBZB_PT_YB, objects::SUS_9_R_LOC_XBYBZB_PT_YF,
|
||||||
|
objects::SUS_10_N_LOC_XMYBZF_PT_ZF, objects::SUS_11_R_LOC_XBYMZB_PT_ZB};
|
||||||
|
SusAssHelper susAssHelper = SusAssHelper(susIds);
|
||||||
|
auto susAss = new SusAssembly(objects::SUS_BOARD_ASS, pwrSwitcher, susAssHelper);
|
||||||
for (auto& sus : susHandlers) {
|
for (auto& sus : susHandlers) {
|
||||||
if (sus != nullptr) {
|
if (sus != nullptr) {
|
||||||
|
ReturnValue_t result = sus->connectModeTreeParent(*susAss);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
sif::error << "Connecting SUS " << sus->getObjectId() << " to SUS assembly failed"
|
||||||
|
<< std::endl;
|
||||||
|
}
|
||||||
#if OBSW_TEST_SUS == 1
|
#if OBSW_TEST_SUS == 1
|
||||||
sus->setStartUpImmediately();
|
sus->setStartUpImmediately();
|
||||||
sus->setToGoToNormalMode(true);
|
sus->setToGoToNormalMode(true);
|
||||||
@ -180,17 +184,7 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::array<object_id_t, 12> susIds = {
|
susAss->connectModeTreeParent(satsystem::ACS_SUBSYSTEM);
|
||||||
objects::SUS_0_N_LOC_XFYFZM_PT_XF, objects::SUS_1_N_LOC_XBYFZM_PT_XB,
|
|
||||||
objects::SUS_2_N_LOC_XFYBZB_PT_YB, objects::SUS_3_N_LOC_XFYBZF_PT_YF,
|
|
||||||
objects::SUS_4_N_LOC_XMYFZF_PT_ZF, objects::SUS_5_N_LOC_XFYMZB_PT_ZB,
|
|
||||||
objects::SUS_6_R_LOC_XFYBZM_PT_XF, objects::SUS_7_R_LOC_XBYBZM_PT_XB,
|
|
||||||
objects::SUS_8_R_LOC_XBYBZB_PT_YB, objects::SUS_9_R_LOC_XBYBZB_PT_YF,
|
|
||||||
objects::SUS_10_N_LOC_XMYBZF_PT_ZF, objects::SUS_11_R_LOC_XBYMZB_PT_ZB};
|
|
||||||
SusAssHelper susAssHelper = SusAssHelper(susIds);
|
|
||||||
auto susAss =
|
|
||||||
new SusAssembly(objects::SUS_BOARD_ASS, objects::NO_OBJECT, pwrSwitcher, susAssHelper);
|
|
||||||
static_cast<void>(susAss);
|
|
||||||
#endif /* OBSW_ADD_SUN_SENSORS == 1 */
|
#endif /* OBSW_ADD_SUN_SENSORS == 1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -292,6 +286,11 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF,
|
|||||||
std::array<SpiCookie*, NUM_RTDS> rtdCookies = {};
|
std::array<SpiCookie*, NUM_RTDS> rtdCookies = {};
|
||||||
std::array<Max31865EiveHandler*, NUM_RTDS> rtds = {};
|
std::array<Max31865EiveHandler*, NUM_RTDS> rtds = {};
|
||||||
RtdFdir* rtdFdir = nullptr;
|
RtdFdir* rtdFdir = nullptr;
|
||||||
|
|
||||||
|
TcsBoardHelper helper(rtdInfos);
|
||||||
|
TcsBoardAssembly* tcsBoardAss = new TcsBoardAssembly(
|
||||||
|
objects::TCS_BOARD_ASS, pwrSwitcher, pcdu::Switches::PDU1_CH0_TCS_BOARD_3V3, helper);
|
||||||
|
static_cast<void>(tcsBoardAss);
|
||||||
// Create special low level reader communication interface
|
// Create special low level reader communication interface
|
||||||
new Max31865RtdReader(objects::SPI_RTD_COM_IF, comIF, gpioComIF);
|
new Max31865RtdReader(objects::SPI_RTD_COM_IF, comIF, gpioComIF);
|
||||||
for (uint8_t idx = 0; idx < NUM_RTDS; idx++) {
|
for (uint8_t idx = 0; idx < NUM_RTDS; idx++) {
|
||||||
@ -303,7 +302,11 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF,
|
|||||||
rtds[idx] =
|
rtds[idx] =
|
||||||
new Max31865EiveHandler(rtdInfos[idx].first, objects::SPI_RTD_COM_IF, rtdLowLevelCookie);
|
new Max31865EiveHandler(rtdInfos[idx].first, objects::SPI_RTD_COM_IF, rtdLowLevelCookie);
|
||||||
rtds[idx]->setDeviceInfo(idx, rtdInfos[idx].second);
|
rtds[idx]->setDeviceInfo(idx, rtdInfos[idx].second);
|
||||||
rtds[idx]->setParent(objects::TCS_BOARD_ASS);
|
ReturnValue_t result = rtds[idx]->connectModeTreeParent(*tcsBoardAss);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
sif::error << "Connecting RTD " << static_cast<int>(idx) << " to RTD Assembly failed"
|
||||||
|
<< std::endl;
|
||||||
|
}
|
||||||
rtdFdir = new RtdFdir(rtdInfos[idx].first);
|
rtdFdir = new RtdFdir(rtdInfos[idx].first);
|
||||||
rtds[idx]->setCustomFdir(rtdFdir);
|
rtds[idx]->setCustomFdir(rtdFdir);
|
||||||
#if OBSW_DEBUG_RTD == 1
|
#if OBSW_DEBUG_RTD == 1
|
||||||
@ -315,11 +318,6 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
TcsBoardHelper helper(rtdInfos);
|
|
||||||
TcsBoardAssembly* tcsBoardAss =
|
|
||||||
new TcsBoardAssembly(objects::TCS_BOARD_ASS, objects::NO_OBJECT, pwrSwitcher,
|
|
||||||
pcdu::Switches::PDU1_CH0_TCS_BOARD_3V3, helper);
|
|
||||||
static_cast<void>(tcsBoardAss);
|
|
||||||
#endif // OBSW_ADD_RTD_DEVICES == 1
|
#endif // OBSW_ADD_RTD_DEVICES == 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -340,10 +338,16 @@ void ObjectFactory::createScexComponents(std::string uartDev, PowerSwitchIF* pwr
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createThermalController() {
|
void ObjectFactory::createThermalController() {
|
||||||
new ThermalController(objects::THERMAL_CONTROLLER, objects::NO_OBJECT);
|
new ThermalController(objects::THERMAL_CONTROLLER);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createAcsController() { new AcsController(objects::ACS_CONTROLLER); }
|
AcsController* ObjectFactory::createAcsController(bool connectSubsystem) {
|
||||||
|
auto acsCtrl = new AcsController(objects::ACS_CONTROLLER);
|
||||||
|
if (connectSubsystem) {
|
||||||
|
acsCtrl->connectModeTreeParent(satsystem::ACS_SUBSYSTEM);
|
||||||
|
}
|
||||||
|
return acsCtrl;
|
||||||
|
}
|
||||||
|
|
||||||
void ObjectFactory::gpioChecker(ReturnValue_t result, std::string output) {
|
void ObjectFactory::gpioChecker(ReturnValue_t result, std::string output) {
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
class GpioIF;
|
class GpioIF;
|
||||||
class SpiComIF;
|
class SpiComIF;
|
||||||
class PowerSwitchIF;
|
class PowerSwitchIF;
|
||||||
|
class AcsController;
|
||||||
|
|
||||||
namespace ObjectFactory {
|
namespace ObjectFactory {
|
||||||
|
|
||||||
@ -26,6 +27,6 @@ void createScexComponents(std::string uartDev, PowerSwitchIF* pwrSwitcher,
|
|||||||
void gpioChecker(ReturnValue_t result, std::string output);
|
void gpioChecker(ReturnValue_t result, std::string output);
|
||||||
|
|
||||||
void createThermalController();
|
void createThermalController();
|
||||||
void createAcsController();
|
AcsController* createAcsController(bool connectSubsystem);
|
||||||
|
|
||||||
} // namespace ObjectFactory
|
} // namespace ObjectFactory
|
||||||
|
@ -18,9 +18,7 @@
|
|||||||
|
|
||||||
GPSHyperionLinuxController::GPSHyperionLinuxController(object_id_t objectId, object_id_t parentId,
|
GPSHyperionLinuxController::GPSHyperionLinuxController(object_id_t objectId, object_id_t parentId,
|
||||||
bool debugHyperionGps)
|
bool debugHyperionGps)
|
||||||
: ExtendedControllerBase(objectId, objects::NO_OBJECT),
|
: ExtendedControllerBase(objectId), gpsSet(this), debugHyperionGps(debugHyperionGps) {
|
||||||
gpsSet(this),
|
|
||||||
debugHyperionGps(debugHyperionGps) {
|
|
||||||
timeUpdateCd.resetTimer();
|
timeUpdateCd.resetTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 233 translations.
|
* @brief Auto-generated event translation file. Contains 233 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2022-10-27 09:03:07
|
* Generated on: 2022-10-27 09:17:50
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 140 translations.
|
* Contains 142 translations.
|
||||||
* Generated on: 2022-10-27 09:03:07
|
* Generated on: 2022-10-27 09:17:50
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
@ -144,6 +144,8 @@ const char *CFDP_DISTRIBUTOR_STRING = "CFDP_DISTRIBUTOR";
|
|||||||
const char *TM_FUNNEL_STRING = "TM_FUNNEL";
|
const char *TM_FUNNEL_STRING = "TM_FUNNEL";
|
||||||
const char *PUS_TM_FUNNEL_STRING = "PUS_TM_FUNNEL";
|
const char *PUS_TM_FUNNEL_STRING = "PUS_TM_FUNNEL";
|
||||||
const char *CFDP_TM_FUNNEL_STRING = "CFDP_TM_FUNNEL";
|
const char *CFDP_TM_FUNNEL_STRING = "CFDP_TM_FUNNEL";
|
||||||
|
const char *EIVE_SYSTEM_STRING = "EIVE_SYSTEM";
|
||||||
|
const char *ACS_SUBSYSTEM_STRING = "ACS_SUBSYSTEM";
|
||||||
const char *CCSDS_IP_CORE_BRIDGE_STRING = "CCSDS_IP_CORE_BRIDGE";
|
const char *CCSDS_IP_CORE_BRIDGE_STRING = "CCSDS_IP_CORE_BRIDGE";
|
||||||
const char *NO_OBJECT_STRING = "NO_OBJECT";
|
const char *NO_OBJECT_STRING = "NO_OBJECT";
|
||||||
|
|
||||||
@ -425,6 +427,10 @@ const char *translateObject(object_id_t object) {
|
|||||||
return PUS_TM_FUNNEL_STRING;
|
return PUS_TM_FUNNEL_STRING;
|
||||||
case 0x73000102:
|
case 0x73000102:
|
||||||
return CFDP_TM_FUNNEL_STRING;
|
return CFDP_TM_FUNNEL_STRING;
|
||||||
|
case 0x73010000:
|
||||||
|
return EIVE_SYSTEM_STRING;
|
||||||
|
case 0x73010001:
|
||||||
|
return ACS_SUBSYSTEM_STRING;
|
||||||
case 0x73500000:
|
case 0x73500000:
|
||||||
return CCSDS_IP_CORE_BRIDGE_STRING;
|
return CCSDS_IP_CORE_BRIDGE_STRING;
|
||||||
case 0xFFFFFFFF:
|
case 0xFFFFFFFF:
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "mission/devices/torquer.h"
|
#include "mission/devices/torquer.h"
|
||||||
|
|
||||||
AcsController::AcsController(object_id_t objectId)
|
AcsController::AcsController(object_id_t objectId)
|
||||||
: ExtendedControllerBase(objectId, objects::NO_OBJECT), mgmData(this) {}
|
: ExtendedControllerBase(objectId), mgmData(this) {}
|
||||||
|
|
||||||
ReturnValue_t AcsController::handleCommandMessage(CommandMessage *message) {
|
ReturnValue_t AcsController::handleCommandMessage(CommandMessage *message) {
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
#include <mission/devices/devicedefinitions/payloadPcduDefinitions.h>
|
#include <mission/devices/devicedefinitions/payloadPcduDefinitions.h>
|
||||||
#include <objects/systemObjectList.h>
|
#include <objects/systemObjectList.h>
|
||||||
|
|
||||||
ThermalController::ThermalController(object_id_t objectId, object_id_t parentId)
|
ThermalController::ThermalController(object_id_t objectId)
|
||||||
: ExtendedControllerBase(objectId, parentId),
|
: ExtendedControllerBase(objectId),
|
||||||
sensorTemperatures(this),
|
sensorTemperatures(this),
|
||||||
susTemperatures(this),
|
susTemperatures(this),
|
||||||
deviceTemperatures(this),
|
deviceTemperatures(this),
|
||||||
|
@ -12,7 +12,7 @@ class ThermalController : public ExtendedControllerBase {
|
|||||||
public:
|
public:
|
||||||
static const uint16_t INVALID_TEMPERATURE = 999;
|
static const uint16_t INVALID_TEMPERATURE = 999;
|
||||||
|
|
||||||
ThermalController(object_id_t objectId, object_id_t parentId);
|
ThermalController(object_id_t objectId);
|
||||||
|
|
||||||
ReturnValue_t initialize() override;
|
ReturnValue_t initialize() override;
|
||||||
|
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
#ifndef MISSION_CONTROLLER_CONTROLLERDEFINITIONS_ACSCONTROLLERDEFINITIONS_H_
|
||||||
|
#define MISSION_CONTROLLER_CONTROLLERDEFINITIONS_ACSCONTROLLERDEFINITIONS_H_
|
||||||
|
|
||||||
|
#include <fsfw/modes/HasModesIF.h>
|
||||||
|
|
||||||
|
namespace acs {
|
||||||
|
|
||||||
|
enum CtrlModes { OFF = HasModesIF::MODE_OFF, SAFE = 1, DETUMBLE = 2, IDLE = 3, TARGET_PT = 4 };
|
||||||
|
|
||||||
|
static constexpr Submode_t IDLE_CHARGE = 1;
|
||||||
|
|
||||||
|
} // namespace acs
|
||||||
|
|
||||||
|
#endif /* MISSION_CONTROLLER_CONTROLLERDEFINITIONS_ACSCONTROLLERDEFINITIONS_H_ */
|
@ -10,8 +10,8 @@
|
|||||||
#include "fsfw_hal/common/gpio/GpioIF.h"
|
#include "fsfw_hal/common/gpio/GpioIF.h"
|
||||||
#include "mission/devices/devicedefinitions/payloadPcduDefinitions.h"
|
#include "mission/devices/devicedefinitions/payloadPcduDefinitions.h"
|
||||||
#include "mission/memory/SdCardMountedIF.h"
|
#include "mission/memory/SdCardMountedIF.h"
|
||||||
#include "mission/system/DualLanePowerStateMachine.h"
|
#include "mission/system/objects/DualLanePowerStateMachine.h"
|
||||||
#include "mission/system/definitions.h"
|
#include "mission/system/objects/definitions.h"
|
||||||
|
|
||||||
#ifdef FSFW_OSAL_LINUX
|
#ifdef FSFW_OSAL_LINUX
|
||||||
class SpiComIF;
|
class SpiComIF;
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
#include "AcsSubsystem.h"
|
|
||||||
|
|
||||||
AcsSubsystem::AcsSubsystem(object_id_t setObjectId, object_id_t parent,
|
|
||||||
uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables)
|
|
||||||
: Subsystem(setObjectId, parent, maxNumberOfSequences, maxNumberOfTables) {}
|
|
@ -1,15 +1,3 @@
|
|||||||
target_sources(
|
add_subdirectory(objects)
|
||||||
${LIB_EIVE_MISSION}
|
add_subdirectory(tree)
|
||||||
PRIVATE EiveSystem.cpp
|
|
||||||
AcsSubsystem.cpp
|
|
||||||
ComSubsystem.cpp
|
|
||||||
PayloadSubsystem.cpp
|
|
||||||
AcsBoardAssembly.cpp
|
|
||||||
RwAssembly.cpp
|
|
||||||
SusAssembly.cpp
|
|
||||||
DualLanePowerStateMachine.cpp
|
|
||||||
PowerStateMachineBase.cpp
|
|
||||||
DualLaneAssemblyBase.cpp
|
|
||||||
TcsBoardAssembly.cpp)
|
|
||||||
|
|
||||||
add_subdirectory(fdir)
|
add_subdirectory(fdir)
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
#include "ComSubsystem.h"
|
|
||||||
|
|
||||||
ComSubsystem::ComSubsystem(object_id_t setObjectId, object_id_t parent,
|
|
||||||
uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables)
|
|
||||||
: Subsystem(setObjectId, parent, maxNumberOfSequences, maxNumberOfTables) {}
|
|
@ -1,5 +0,0 @@
|
|||||||
#include "EiveSystem.h"
|
|
||||||
|
|
||||||
EiveSystem::EiveSystem(object_id_t setObjectId, object_id_t parent, uint32_t maxNumberOfSequences,
|
|
||||||
uint32_t maxNumberOfTables)
|
|
||||||
: Subsystem(setObjectId, parent, maxNumberOfSequences, maxNumberOfTables) {}
|
|
@ -1,5 +0,0 @@
|
|||||||
#include "PayloadSubsystem.h"
|
|
||||||
|
|
||||||
PayloadSubsystem::PayloadSubsystem(object_id_t setObjectId, object_id_t parent,
|
|
||||||
uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables)
|
|
||||||
: Subsystem(setObjectId, parent, maxNumberOfSequences, maxNumberOfTables) {}
|
|
@ -6,11 +6,10 @@
|
|||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
|
|
||||||
AcsBoardAssembly::AcsBoardAssembly(object_id_t objectId, object_id_t parentId,
|
AcsBoardAssembly::AcsBoardAssembly(object_id_t objectId, PowerSwitchIF* switcher,
|
||||||
PowerSwitchIF* switcher, AcsBoardHelper helper, GpioIF* gpioIF)
|
AcsBoardHelper helper, GpioIF* gpioIF)
|
||||||
: DualLaneAssemblyBase(objectId, parentId, switcher, SWITCH_A, SWITCH_B,
|
: DualLaneAssemblyBase(objectId, switcher, SWITCH_A, SWITCH_B, POWER_STATE_MACHINE_TIMEOUT,
|
||||||
POWER_STATE_MACHINE_TIMEOUT, SIDE_SWITCH_TRANSITION_NOT_ALLOWED,
|
SIDE_SWITCH_TRANSITION_NOT_ALLOWED, TRANSITION_OTHER_SIDE_FAILED),
|
||||||
TRANSITION_OTHER_SIDE_FAILED),
|
|
||||||
helper(helper),
|
helper(helper),
|
||||||
gpioIF(gpioIF) {
|
gpioIF(gpioIF) {
|
||||||
if (switcher == nullptr) {
|
if (switcher == nullptr) {
|
||||||
@ -275,42 +274,4 @@ void AcsBoardAssembly::refreshHelperModes() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t AcsBoardAssembly::initialize() {
|
ReturnValue_t AcsBoardAssembly::initialize() { return AssemblyBase::initialize(); }
|
||||||
ReturnValue_t result = registerChild(helper.gyro0AdisIdSideA);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = registerChild(helper.gyro1L3gIdSideA);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = registerChild(helper.gyro2AdisIdSideB);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = registerChild(helper.gyro3L3gIdSideB);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = registerChild(helper.mgm0Lis3IdSideA);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = registerChild(helper.mgm1Rm3100IdSideA);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = registerChild(helper.mgm2Lis3IdSideB);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = registerChild(helper.mgm3Rm3100IdSideB);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = registerChild(helper.gpsId);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return AssemblyBase::initialize();
|
|
||||||
}
|
|
@ -94,8 +94,8 @@ class AcsBoardAssembly : public DualLaneAssemblyBase {
|
|||||||
|
|
||||||
static constexpr uint8_t NUMBER_DEVICES_MODE_TABLE = 9;
|
static constexpr uint8_t NUMBER_DEVICES_MODE_TABLE = 9;
|
||||||
|
|
||||||
AcsBoardAssembly(object_id_t objectId, object_id_t parentId, PowerSwitchIF* pwrSwitcher,
|
AcsBoardAssembly(object_id_t objectId, PowerSwitchIF* pwrSwitcher, AcsBoardHelper helper,
|
||||||
AcsBoardHelper helper, GpioIF* gpioIF);
|
GpioIF* gpioIF);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* In dual mode, the A side or the B side GPS device can be used, but not both.
|
* In dual mode, the A side or the B side GPS device can be used, but not both.
|
5
mission/system/objects/AcsSubsystem.cpp
Normal file
5
mission/system/objects/AcsSubsystem.cpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#include "AcsSubsystem.h"
|
||||||
|
|
||||||
|
AcsSubsystem::AcsSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences,
|
||||||
|
uint32_t maxNumberOfTables)
|
||||||
|
: Subsystem(setObjectId, maxNumberOfSequences, maxNumberOfTables) {}
|
@ -5,8 +5,7 @@
|
|||||||
|
|
||||||
class AcsSubsystem : public Subsystem {
|
class AcsSubsystem : public Subsystem {
|
||||||
public:
|
public:
|
||||||
AcsSubsystem(object_id_t setObjectId, object_id_t parent, uint32_t maxNumberOfSequences,
|
AcsSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables);
|
||||||
uint32_t maxNumberOfTables);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
};
|
};
|
13
mission/system/objects/CMakeLists.txt
Normal file
13
mission/system/objects/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
target_sources(
|
||||||
|
${LIB_EIVE_MISSION}
|
||||||
|
PRIVATE EiveSystem.cpp
|
||||||
|
AcsSubsystem.cpp
|
||||||
|
ComSubsystem.cpp
|
||||||
|
PayloadSubsystem.cpp
|
||||||
|
AcsBoardAssembly.cpp
|
||||||
|
SusAssembly.cpp
|
||||||
|
RwAssembly.cpp
|
||||||
|
DualLanePowerStateMachine.cpp
|
||||||
|
PowerStateMachineBase.cpp
|
||||||
|
DualLaneAssemblyBase.cpp
|
||||||
|
TcsBoardAssembly.cpp)
|
5
mission/system/objects/ComSubsystem.cpp
Normal file
5
mission/system/objects/ComSubsystem.cpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#include "ComSubsystem.h"
|
||||||
|
|
||||||
|
ComSubsystem::ComSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences,
|
||||||
|
uint32_t maxNumberOfTables)
|
||||||
|
: Subsystem(setObjectId, maxNumberOfSequences, maxNumberOfTables) {}
|
@ -5,8 +5,7 @@
|
|||||||
|
|
||||||
class ComSubsystem : public Subsystem {
|
class ComSubsystem : public Subsystem {
|
||||||
public:
|
public:
|
||||||
ComSubsystem(object_id_t setObjectId, object_id_t parent, uint32_t maxNumberOfSequences,
|
ComSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables);
|
||||||
uint32_t maxNumberOfTables);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
};
|
};
|
@ -4,12 +4,11 @@
|
|||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
|
|
||||||
DualLaneAssemblyBase::DualLaneAssemblyBase(object_id_t objectId, object_id_t parentId,
|
DualLaneAssemblyBase::DualLaneAssemblyBase(object_id_t objectId, PowerSwitchIF* pwrSwitcher,
|
||||||
PowerSwitchIF* pwrSwitcher, pcdu::Switches switch1,
|
pcdu::Switches switch1, pcdu::Switches switch2,
|
||||||
pcdu::Switches switch2, Event pwrTimeoutEvent,
|
Event pwrTimeoutEvent, Event sideSwitchNotAllowedEvent,
|
||||||
Event sideSwitchNotAllowedEvent,
|
|
||||||
Event transitionOtherSideFailedEvent)
|
Event transitionOtherSideFailedEvent)
|
||||||
: AssemblyBase(objectId, parentId, 20),
|
: AssemblyBase(objectId, 20),
|
||||||
pwrStateMachine(switch1, switch2, pwrSwitcher),
|
pwrStateMachine(switch1, switch2, pwrSwitcher),
|
||||||
pwrTimeoutEvent(pwrTimeoutEvent),
|
pwrTimeoutEvent(pwrTimeoutEvent),
|
||||||
sideSwitchNotAllowedEvent(sideSwitchNotAllowedEvent),
|
sideSwitchNotAllowedEvent(sideSwitchNotAllowedEvent),
|
@ -2,7 +2,7 @@
|
|||||||
#define MISSION_SYSTEM_DUALLANEASSEMBLYBASE_H_
|
#define MISSION_SYSTEM_DUALLANEASSEMBLYBASE_H_
|
||||||
|
|
||||||
#include <fsfw/devicehandlers/AssemblyBase.h>
|
#include <fsfw/devicehandlers/AssemblyBase.h>
|
||||||
#include <mission/system/DualLanePowerStateMachine.h>
|
#include <mission/system/objects/DualLanePowerStateMachine.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Encapsulates assemblies which are also responsible for dual lane power switching
|
* @brief Encapsulates assemblies which are also responsible for dual lane power switching
|
||||||
@ -18,8 +18,8 @@ class DualLaneAssemblyBase : public AssemblyBase, public ConfirmsFailuresIF {
|
|||||||
static constexpr UniqueEventId_t POWER_STATE_MACHINE_TIMEOUT_ID = 2;
|
static constexpr UniqueEventId_t POWER_STATE_MACHINE_TIMEOUT_ID = 2;
|
||||||
static constexpr UniqueEventId_t SIDE_SWITCH_TRANSITION_NOT_ALLOWED_ID = 3;
|
static constexpr UniqueEventId_t SIDE_SWITCH_TRANSITION_NOT_ALLOWED_ID = 3;
|
||||||
|
|
||||||
DualLaneAssemblyBase(object_id_t objectId, object_id_t parentId, PowerSwitchIF* pwrSwitcher,
|
DualLaneAssemblyBase(object_id_t objectId, PowerSwitchIF* pwrSwitcher, pcdu::Switches switch1,
|
||||||
pcdu::Switches switch1, pcdu::Switches switch2, Event pwrSwitchTimeoutEvent,
|
pcdu::Switches switch2, Event pwrSwitchTimeoutEvent,
|
||||||
Event sideSwitchNotAllowedEvent, Event transitionOtherSideFailedEvent);
|
Event sideSwitchNotAllowedEvent, Event transitionOtherSideFailedEvent);
|
||||||
|
|
||||||
protected:
|
protected:
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <devices/powerSwitcherList.h>
|
#include <devices/powerSwitcherList.h>
|
||||||
#include <fsfw/modes/HasModesIF.h>
|
#include <fsfw/modes/HasModesIF.h>
|
||||||
#include <mission/system/PowerStateMachineBase.h>
|
#include <mission/system/objects/PowerStateMachineBase.h>
|
||||||
|
|
||||||
#include "definitions.h"
|
#include "definitions.h"
|
||||||
|
|
5
mission/system/objects/EiveSystem.cpp
Normal file
5
mission/system/objects/EiveSystem.cpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#include "EiveSystem.h"
|
||||||
|
|
||||||
|
EiveSystem::EiveSystem(object_id_t setObjectId, uint32_t maxNumberOfSequences,
|
||||||
|
uint32_t maxNumberOfTables)
|
||||||
|
: Subsystem(setObjectId, maxNumberOfSequences, maxNumberOfTables) {}
|
@ -5,8 +5,7 @@
|
|||||||
|
|
||||||
class EiveSystem : public Subsystem {
|
class EiveSystem : public Subsystem {
|
||||||
public:
|
public:
|
||||||
EiveSystem(object_id_t setObjectId, object_id_t parent, uint32_t maxNumberOfSequences,
|
EiveSystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables);
|
||||||
uint32_t maxNumberOfTables);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
};
|
};
|
5
mission/system/objects/PayloadSubsystem.cpp
Normal file
5
mission/system/objects/PayloadSubsystem.cpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#include "PayloadSubsystem.h"
|
||||||
|
|
||||||
|
PayloadSubsystem::PayloadSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences,
|
||||||
|
uint32_t maxNumberOfTables)
|
||||||
|
: Subsystem(setObjectId, maxNumberOfSequences, maxNumberOfTables) {}
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
class PayloadSubsystem : public Subsystem {
|
class PayloadSubsystem : public Subsystem {
|
||||||
public:
|
public:
|
||||||
PayloadSubsystem(object_id_t setObjectId, object_id_t parent, uint32_t maxNumberOfSequences,
|
PayloadSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences,
|
||||||
uint32_t maxNumberOfTables);
|
uint32_t maxNumberOfTables);
|
||||||
|
|
||||||
private:
|
private:
|
@ -1,8 +1,8 @@
|
|||||||
#include "RwAssembly.h"
|
#include "RwAssembly.h"
|
||||||
|
|
||||||
RwAssembly::RwAssembly(object_id_t objectId, object_id_t parentId, PowerSwitchIF* pwrSwitcher,
|
RwAssembly::RwAssembly(object_id_t objectId, PowerSwitchIF* pwrSwitcher, power::Switch_t switcher,
|
||||||
power::Switch_t switcher, RwHelper helper)
|
RwHelper helper)
|
||||||
: AssemblyBase(objectId, parentId), helper(helper), switcher(pwrSwitcher, switcher) {
|
: AssemblyBase(objectId), helper(helper), switcher(pwrSwitcher, switcher) {
|
||||||
ModeListEntry entry;
|
ModeListEntry entry;
|
||||||
for (uint8_t idx = 0; idx < NUMBER_RWS; idx++) {
|
for (uint8_t idx = 0; idx < NUMBER_RWS; idx++) {
|
||||||
entry.setObject(helper.rwIds[idx]);
|
entry.setObject(helper.rwIds[idx]);
|
||||||
@ -167,16 +167,7 @@ bool RwAssembly::isUseable(object_id_t object, Mode_t mode) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t RwAssembly::initialize() {
|
ReturnValue_t RwAssembly::initialize() { return SubsystemBase::initialize(); }
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
for (const auto& obj : helper.rwIds) {
|
|
||||||
result = registerChild(obj);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return SubsystemBase::initialize();
|
|
||||||
}
|
|
||||||
|
|
||||||
void RwAssembly::handleModeTransitionFailed(ReturnValue_t result) {
|
void RwAssembly::handleModeTransitionFailed(ReturnValue_t result) {
|
||||||
if (targetMode == MODE_OFF) {
|
if (targetMode == MODE_OFF) {
|
@ -12,8 +12,8 @@ struct RwHelper {
|
|||||||
|
|
||||||
class RwAssembly : public AssemblyBase {
|
class RwAssembly : public AssemblyBase {
|
||||||
public:
|
public:
|
||||||
RwAssembly(object_id_t objectId, object_id_t parentId, PowerSwitchIF* pwrSwitcher,
|
RwAssembly(object_id_t objectId, PowerSwitchIF* pwrSwitcher, power::Switch_t switcher,
|
||||||
power::Switch_t switcher, RwHelper helper);
|
RwHelper helper);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static constexpr uint8_t NUMBER_RWS = 4;
|
static constexpr uint8_t NUMBER_RWS = 4;
|
@ -4,9 +4,8 @@
|
|||||||
#include <fsfw/power/PowerSwitchIF.h>
|
#include <fsfw/power/PowerSwitchIF.h>
|
||||||
#include <fsfw/serviceinterface.h>
|
#include <fsfw/serviceinterface.h>
|
||||||
|
|
||||||
SusAssembly::SusAssembly(object_id_t objectId, object_id_t parentId, PowerSwitchIF* pwrSwitcher,
|
SusAssembly::SusAssembly(object_id_t objectId, PowerSwitchIF* pwrSwitcher, SusAssHelper helper)
|
||||||
SusAssHelper helper)
|
: DualLaneAssemblyBase(objectId, pwrSwitcher, SWITCH_NOM, SWITCH_RED,
|
||||||
: DualLaneAssemblyBase(objectId, parentId, pwrSwitcher, SWITCH_NOM, SWITCH_RED,
|
|
||||||
POWER_STATE_MACHINE_TIMEOUT, SIDE_SWITCH_TRANSITION_NOT_ALLOWED,
|
POWER_STATE_MACHINE_TIMEOUT, SIDE_SWITCH_TRANSITION_NOT_ALLOWED,
|
||||||
TRANSITION_OTHER_SIDE_FAILED),
|
TRANSITION_OTHER_SIDE_FAILED),
|
||||||
helper(helper),
|
helper(helper),
|
||||||
@ -121,16 +120,7 @@ ReturnValue_t SusAssembly::checkChildrenStateOn(Mode_t wantedMode, Submode_t wan
|
|||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t SusAssembly::initialize() {
|
ReturnValue_t SusAssembly::initialize() { return AssemblyBase::initialize(); }
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
for (const auto& id : helper.susIds) {
|
|
||||||
result = registerChild(id);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return AssemblyBase::initialize();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SusAssembly::isUseable(object_id_t object, Mode_t mode) {
|
bool SusAssembly::isUseable(object_id_t object, Mode_t mode) {
|
||||||
if (healthHelper.healthTable->isFaulty(object)) {
|
if (healthHelper.healthTable->isFaulty(object)) {
|
@ -40,8 +40,7 @@ class SusAssembly : public DualLaneAssemblyBase {
|
|||||||
static constexpr Event SIDE_SWITCH_TRANSITION_NOT_ALLOWED =
|
static constexpr Event SIDE_SWITCH_TRANSITION_NOT_ALLOWED =
|
||||||
event::makeEvent(SUBSYSTEM_ID, 3, severity::LOW);
|
event::makeEvent(SUBSYSTEM_ID, 3, severity::LOW);
|
||||||
|
|
||||||
SusAssembly(object_id_t objectId, object_id_t parentId, PowerSwitchIF* pwrSwitcher,
|
SusAssembly(object_id_t objectId, PowerSwitchIF* pwrSwitcher, SusAssHelper helper);
|
||||||
SusAssHelper helper);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum class States { IDLE, SWITCHING_POWER, MODE_COMMANDING } state = States::IDLE;
|
enum class States { IDLE, SWITCHING_POWER, MODE_COMMANDING } state = States::IDLE;
|
@ -3,10 +3,9 @@
|
|||||||
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
||||||
#include <fsfw/ipc/QueueFactory.h>
|
#include <fsfw/ipc/QueueFactory.h>
|
||||||
|
|
||||||
TcsBoardAssembly::TcsBoardAssembly(object_id_t objectId, object_id_t parentId,
|
TcsBoardAssembly::TcsBoardAssembly(object_id_t objectId, PowerSwitchIF* pwrSwitcher,
|
||||||
PowerSwitchIF* pwrSwitcher, power::Switch_t theSwitch,
|
power::Switch_t theSwitch, TcsBoardHelper helper)
|
||||||
TcsBoardHelper helper)
|
: AssemblyBase(objectId, 24), switcher(pwrSwitcher, theSwitch), helper(helper) {
|
||||||
: AssemblyBase(objectId, parentId, 24), switcher(pwrSwitcher, theSwitch), helper(helper) {
|
|
||||||
eventQueue = QueueFactory::instance()->createMessageQueue(24);
|
eventQueue = QueueFactory::instance()->createMessageQueue(24);
|
||||||
ModeListEntry entry;
|
ModeListEntry entry;
|
||||||
for (uint8_t idx = 0; idx < NUMBER_RTDS; idx++) {
|
for (uint8_t idx = 0; idx < NUMBER_RTDS; idx++) {
|
||||||
@ -90,16 +89,7 @@ ReturnValue_t TcsBoardAssembly::isModeCombinationValid(Mode_t mode, Submode_t su
|
|||||||
return HasModesIF::INVALID_MODE;
|
return HasModesIF::INVALID_MODE;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t TcsBoardAssembly::initialize() {
|
ReturnValue_t TcsBoardAssembly::initialize() { return AssemblyBase::initialize(); }
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
for (const auto& obj : helper.rtdInfos) {
|
|
||||||
result = registerChild(obj.first);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return SubsystemBase::initialize();
|
|
||||||
}
|
|
||||||
|
|
||||||
void TcsBoardAssembly::startTransition(Mode_t mode, Submode_t submode) {
|
void TcsBoardAssembly::startTransition(Mode_t mode, Submode_t submode) {
|
||||||
if (mode != MODE_OFF) {
|
if (mode != MODE_OFF) {
|
@ -20,8 +20,8 @@ class TcsBoardAssembly : public AssemblyBase, public ConfirmsFailuresIF {
|
|||||||
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::TCS_BOARD_ASS;
|
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::TCS_BOARD_ASS;
|
||||||
static constexpr Event CHILDREN_LOST_MODE = event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
|
static constexpr Event CHILDREN_LOST_MODE = event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
|
||||||
|
|
||||||
TcsBoardAssembly(object_id_t objectId, object_id_t parentId, PowerSwitchIF* pwrSwitcher,
|
TcsBoardAssembly(object_id_t objectId, PowerSwitchIF* pwrSwitcher, power::Switch_t switcher,
|
||||||
power::Switch_t switcher, TcsBoardHelper helper);
|
TcsBoardHelper helper);
|
||||||
|
|
||||||
ReturnValue_t initialize() override;
|
ReturnValue_t initialize() override;
|
||||||
|
|
1
mission/system/tree/CMakeLists.txt
Normal file
1
mission/system/tree/CMakeLists.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
target_sources(${LIB_EIVE_MISSION} PRIVATE acsModeTree.cpp)
|
397
mission/system/tree/acsModeTree.cpp
Normal file
397
mission/system/tree/acsModeTree.cpp
Normal file
@ -0,0 +1,397 @@
|
|||||||
|
#include "acsModeTree.h"
|
||||||
|
|
||||||
|
#include <fsfw/container/FixedMap.h>
|
||||||
|
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
||||||
|
#include <fsfw/modes/HasModesIF.h>
|
||||||
|
#include <fsfw/subsystem/Subsystem.h>
|
||||||
|
#include <fsfw/subsystem/modes/ModeDefinitions.h>
|
||||||
|
|
||||||
|
#include "eive/objects.h"
|
||||||
|
#include "mission/controller/controllerdefinitions/AcsControllerDefinitions.h"
|
||||||
|
|
||||||
|
Subsystem satsystem::ACS_SUBSYSTEM(objects::ACS_SUBSYSTEM, 12, 24);
|
||||||
|
|
||||||
|
void checkInsert(ReturnValue_t result, const char* ctx);
|
||||||
|
void buildOffSequence(Subsystem* ss, ModeListEntry& eh);
|
||||||
|
void buildDetumbleSequence(Subsystem* ss, ModeListEntry& entryHelper);
|
||||||
|
void buildSafeSequence(Subsystem* ss, ModeListEntry& entryHelper);
|
||||||
|
void buildIdleSequence(Subsystem* ss, ModeListEntry& entryHelper);
|
||||||
|
void buildIdleChargeSequence(Subsystem* ss, ModeListEntry& entryHelper);
|
||||||
|
void buildTargetPtSequence(Subsystem* ss, ModeListEntry& entryHelper);
|
||||||
|
|
||||||
|
// Alias for checker function
|
||||||
|
const auto check = checkInsert;
|
||||||
|
static const auto OFF = HasModesIF::MODE_OFF;
|
||||||
|
static const auto NML = DeviceHandlerIF::MODE_NORMAL;
|
||||||
|
|
||||||
|
auto ACS_SEQUENCE_OFF =
|
||||||
|
std::make_pair(acs::CtrlModes::OFF << 24, FixedArrayList<ModeListEntry, 2>());
|
||||||
|
auto ACS_TABLE_OFF_TGT =
|
||||||
|
std::make_pair((acs::CtrlModes::OFF << 24) | 1, FixedArrayList<ModeListEntry, 0>());
|
||||||
|
auto ACS_TABLE_OFF_TRANS =
|
||||||
|
std::make_pair((acs::CtrlModes::OFF << 24) | 2, FixedArrayList<ModeListEntry, 6>());
|
||||||
|
|
||||||
|
auto ACS_SEQUENCE_DETUMBLE =
|
||||||
|
std::make_pair(acs::CtrlModes::DETUMBLE << 24, FixedArrayList<ModeListEntry, 3>());
|
||||||
|
auto ACS_TABLE_DETUMBLE_TGT =
|
||||||
|
std::make_pair((acs::CtrlModes::DETUMBLE << 24) | 1, FixedArrayList<ModeListEntry, 4>());
|
||||||
|
auto ACS_TABLE_DETUMBLE_TRANS_0 =
|
||||||
|
std::make_pair((acs::CtrlModes::DETUMBLE << 24) | 2, FixedArrayList<ModeListEntry, 5>());
|
||||||
|
auto ACS_TABLE_DETUMBLE_TRANS_1 =
|
||||||
|
std::make_pair((acs::CtrlModes::DETUMBLE << 24) | 3, FixedArrayList<ModeListEntry, 1>());
|
||||||
|
|
||||||
|
auto ACS_SEQUENCE_SAFE =
|
||||||
|
std::make_pair(acs::CtrlModes::SAFE << 24, FixedArrayList<ModeListEntry, 3>());
|
||||||
|
auto ACS_TABLE_SAFE_TGT =
|
||||||
|
std::make_pair((acs::CtrlModes::SAFE << 24) | 1, FixedArrayList<ModeListEntry, 4>());
|
||||||
|
auto ACS_TABLE_SAFE_TRANS_0 =
|
||||||
|
std::make_pair((acs::CtrlModes::SAFE << 24) | 2, FixedArrayList<ModeListEntry, 5>());
|
||||||
|
auto ACS_TABLE_SAFE_TRANS_1 =
|
||||||
|
std::make_pair((acs::CtrlModes::SAFE << 24) | 3, FixedArrayList<ModeListEntry, 1>());
|
||||||
|
|
||||||
|
auto ACS_SEQUENCE_IDLE =
|
||||||
|
std::make_pair(acs::CtrlModes::IDLE << 24, FixedArrayList<ModeListEntry, 3>());
|
||||||
|
auto ACS_TABLE_IDLE_TGT =
|
||||||
|
std::make_pair((acs::CtrlModes::IDLE << 24) | 1, FixedArrayList<ModeListEntry, 5>());
|
||||||
|
auto ACS_TABLE_IDLE_TRANS_0 =
|
||||||
|
std::make_pair((acs::CtrlModes::IDLE << 24) | 2, FixedArrayList<ModeListEntry, 5>());
|
||||||
|
auto ACS_TABLE_IDLE_TRANS_1 =
|
||||||
|
std::make_pair((acs::CtrlModes::IDLE << 24) | 3, FixedArrayList<ModeListEntry, 1>());
|
||||||
|
|
||||||
|
auto ACS_SEQUENCE_IDLE_CHRG = std::make_pair(acs::CtrlModes::IDLE << 24 | (acs::IDLE_CHARGE << 8),
|
||||||
|
FixedArrayList<ModeListEntry, 3>());
|
||||||
|
auto ACS_TABLE_IDLE_CHRG_TGT = std::make_pair(
|
||||||
|
(acs::CtrlModes::IDLE << 24) | (acs::IDLE_CHARGE << 8) | 1, FixedArrayList<ModeListEntry, 4>());
|
||||||
|
auto ACS_TABLE_IDLE_CHRG_TRANS_0 = std::make_pair(
|
||||||
|
(acs::CtrlModes::IDLE << 24) | (acs::IDLE_CHARGE << 8) | 2, FixedArrayList<ModeListEntry, 5>());
|
||||||
|
auto ACS_TABLE_IDLE_CHRG_TRANS_1 = std::make_pair(
|
||||||
|
(acs::CtrlModes::IDLE << 24) | (acs::IDLE_CHARGE << 8) | 3, FixedArrayList<ModeListEntry, 1>());
|
||||||
|
|
||||||
|
auto ACS_SEQUENCE_TARGET_PT =
|
||||||
|
std::make_pair(acs::CtrlModes::TARGET_PT, FixedArrayList<ModeListEntry, 3>());
|
||||||
|
auto ACS_TABLE_TARGET_PT_TGT =
|
||||||
|
std::make_pair((acs::CtrlModes::TARGET_PT << 24) | 1, FixedArrayList<ModeListEntry, 6>());
|
||||||
|
auto ACS_TABLE_TARGET_PT_TRANS_0 =
|
||||||
|
std::make_pair((acs::CtrlModes::TARGET_PT << 24) | 2, FixedArrayList<ModeListEntry, 5>());
|
||||||
|
auto ACS_TABLE_TARGET_PT_TRANS_1 =
|
||||||
|
std::make_pair((acs::CtrlModes::TARGET_PT << 24) | 3, FixedArrayList<ModeListEntry, 1>());
|
||||||
|
|
||||||
|
void satsystem::initAcsSubsystem(object_id_t satSystemObjId) {
|
||||||
|
ModeListEntry entry;
|
||||||
|
buildOffSequence(&ACS_SUBSYSTEM, entry);
|
||||||
|
buildSafeSequence(&ACS_SUBSYSTEM, entry);
|
||||||
|
buildDetumbleSequence(&ACS_SUBSYSTEM, entry);
|
||||||
|
buildIdleSequence(&ACS_SUBSYSTEM, entry);
|
||||||
|
buildIdleChargeSequence(&ACS_SUBSYSTEM, entry);
|
||||||
|
buildTargetPtSequence(&ACS_SUBSYSTEM, entry);
|
||||||
|
ACS_SUBSYSTEM.setInitialMode(HasModesIF::MODE_OFF);
|
||||||
|
}
|
||||||
|
|
||||||
|
void buildOffSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||||
|
std::string context = "satsystem::buildOffSequence";
|
||||||
|
auto ctxc = context.c_str();
|
||||||
|
// Insert Helper Table
|
||||||
|
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode, ArrayList<ModeListEntry>& table) {
|
||||||
|
eh.setObject(obj);
|
||||||
|
eh.setMode(mode);
|
||||||
|
eh.setSubmode(submode);
|
||||||
|
check(table.insert(eh), ctxc);
|
||||||
|
};
|
||||||
|
// Insert Helper Sequence
|
||||||
|
auto ihs = [&](ArrayList<ModeListEntry>& sequence, Mode_t tableId, uint32_t waitSeconds,
|
||||||
|
bool checkSuccess) {
|
||||||
|
eh.setTableId(tableId);
|
||||||
|
eh.setWaitSeconds(waitSeconds);
|
||||||
|
eh.setCheckSuccess(checkSuccess);
|
||||||
|
check(sequence.insert(eh), ctxc);
|
||||||
|
};
|
||||||
|
|
||||||
|
// OFF Target table is empty
|
||||||
|
check(ss->addTable(&ACS_TABLE_OFF_TGT.second, ACS_TABLE_OFF_TGT.first, false, true), ctxc);
|
||||||
|
|
||||||
|
// Build OFF transition
|
||||||
|
iht(objects::ACS_CONTROLLER, OFF, 0, ACS_TABLE_OFF_TRANS.second);
|
||||||
|
iht(objects::IMTQ_HANDLER, OFF, 0, ACS_TABLE_OFF_TRANS.second);
|
||||||
|
iht(objects::STAR_TRACKER, OFF, 0, ACS_TABLE_OFF_TRANS.second);
|
||||||
|
iht(objects::ACS_BOARD_ASS, OFF, 0, ACS_TABLE_OFF_TRANS.second);
|
||||||
|
iht(objects::SUS_BOARD_ASS, OFF, 0, ACS_TABLE_OFF_TRANS.second);
|
||||||
|
iht(objects::RW_ASS, OFF, 0, ACS_TABLE_OFF_TRANS.second);
|
||||||
|
check(ss->addTable(&ACS_TABLE_OFF_TRANS.second, ACS_TABLE_OFF_TRANS.first, false, true), ctxc);
|
||||||
|
|
||||||
|
// Build OFF sequence
|
||||||
|
ihs(ACS_SEQUENCE_OFF.second, ACS_TABLE_OFF_TGT.first, 0, false);
|
||||||
|
ihs(ACS_SEQUENCE_OFF.second, ACS_TABLE_OFF_TRANS.first, 0, false);
|
||||||
|
check(ss->addSequence(&ACS_SEQUENCE_OFF.second, ACS_SEQUENCE_OFF.first, ACS_SEQUENCE_OFF.first,
|
||||||
|
false, true),
|
||||||
|
ctxc);
|
||||||
|
}
|
||||||
|
|
||||||
|
void buildSafeSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||||
|
std::string context = "satsystem::buildSafeSequence";
|
||||||
|
auto ctxc = context.c_str();
|
||||||
|
// Insert Helper Table
|
||||||
|
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode,
|
||||||
|
ArrayList<ModeListEntry>& sequence) {
|
||||||
|
eh.setObject(obj);
|
||||||
|
eh.setMode(mode);
|
||||||
|
eh.setSubmode(submode);
|
||||||
|
check(sequence.insert(eh), ctxc);
|
||||||
|
};
|
||||||
|
// Insert Helper Sequence
|
||||||
|
auto ihs = [&](ArrayList<ModeListEntry>& sequence, Mode_t tableId, uint32_t waitSeconds,
|
||||||
|
bool checkSuccess) {
|
||||||
|
eh.setTableId(tableId);
|
||||||
|
eh.setWaitSeconds(waitSeconds);
|
||||||
|
eh.setCheckSuccess(checkSuccess);
|
||||||
|
check(sequence.insert(eh), ctxc);
|
||||||
|
};
|
||||||
|
// Build SAFE target
|
||||||
|
iht(objects::ACS_CONTROLLER, acs::CtrlModes::SAFE, 0, ACS_TABLE_SAFE_TGT.second);
|
||||||
|
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_SAFE_TGT.second);
|
||||||
|
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_SAFE_TGT.second);
|
||||||
|
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_SAFE_TGT.second);
|
||||||
|
check(ss->addTable(&ACS_TABLE_SAFE_TGT.second, ACS_TABLE_SAFE_TGT.first, false, true), ctxc);
|
||||||
|
|
||||||
|
// Build SAFE transition 0
|
||||||
|
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_SAFE_TRANS_0.second);
|
||||||
|
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_SAFE_TRANS_0.second);
|
||||||
|
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_SAFE_TRANS_0.second);
|
||||||
|
iht(objects::STAR_TRACKER, OFF, 0, ACS_TABLE_SAFE_TRANS_0.second);
|
||||||
|
iht(objects::RW_ASS, OFF, 0, ACS_TABLE_SAFE_TRANS_0.second);
|
||||||
|
check(ss->addTable(&ACS_TABLE_SAFE_TRANS_0.second, ACS_TABLE_SAFE_TRANS_0.first, false, true),
|
||||||
|
ctxc);
|
||||||
|
|
||||||
|
// Build SAFE transition 1
|
||||||
|
iht(objects::ACS_CONTROLLER, acs::CtrlModes::SAFE, 0, ACS_TABLE_SAFE_TRANS_1.second);
|
||||||
|
check(ss->addTable(&ACS_TABLE_SAFE_TRANS_1.second, ACS_TABLE_SAFE_TRANS_1.first, false, true),
|
||||||
|
ctxc);
|
||||||
|
|
||||||
|
// Build SAFE sequence
|
||||||
|
ihs(ACS_SEQUENCE_SAFE.second, ACS_TABLE_SAFE_TGT.first, 0, true);
|
||||||
|
ihs(ACS_SEQUENCE_SAFE.second, ACS_TABLE_SAFE_TRANS_0.first, 0, false);
|
||||||
|
ihs(ACS_SEQUENCE_SAFE.second, ACS_TABLE_SAFE_TRANS_1.first, 0, false);
|
||||||
|
check(ss->addSequence(&ACS_SEQUENCE_SAFE.second, ACS_SEQUENCE_SAFE.first, ACS_SEQUENCE_SAFE.first,
|
||||||
|
false, true),
|
||||||
|
ctxc);
|
||||||
|
}
|
||||||
|
|
||||||
|
void buildDetumbleSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||||
|
std::string context = "satsystem::buildDetumbleSequence";
|
||||||
|
auto ctxc = context.c_str();
|
||||||
|
// Insert Helper Table
|
||||||
|
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode,
|
||||||
|
ArrayList<ModeListEntry>& sequence) {
|
||||||
|
eh.setObject(obj);
|
||||||
|
eh.setMode(mode);
|
||||||
|
eh.setSubmode(submode);
|
||||||
|
check(sequence.insert(eh), ctxc);
|
||||||
|
};
|
||||||
|
// Insert Helper Sequence
|
||||||
|
auto ihs = [&](ArrayList<ModeListEntry>& sequence, Mode_t tableId, uint32_t waitSeconds,
|
||||||
|
bool checkSuccess) {
|
||||||
|
eh.setTableId(tableId);
|
||||||
|
eh.setWaitSeconds(waitSeconds);
|
||||||
|
eh.setCheckSuccess(checkSuccess);
|
||||||
|
check(sequence.insert(eh), ctxc);
|
||||||
|
};
|
||||||
|
// Build DETUMBLE target
|
||||||
|
iht(objects::ACS_CONTROLLER, acs::CtrlModes::DETUMBLE, 0, ACS_TABLE_DETUMBLE_TGT.second);
|
||||||
|
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_DETUMBLE_TGT.second);
|
||||||
|
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_DETUMBLE_TGT.second);
|
||||||
|
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_DETUMBLE_TGT.second);
|
||||||
|
check(ss->addTable(&ACS_TABLE_DETUMBLE_TGT.second, ACS_TABLE_DETUMBLE_TGT.first, false, true),
|
||||||
|
ctxc);
|
||||||
|
|
||||||
|
// Build DETUMBLE transition 0
|
||||||
|
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
||||||
|
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
||||||
|
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
||||||
|
iht(objects::STAR_TRACKER, OFF, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
||||||
|
iht(objects::RW_ASS, OFF, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
||||||
|
check(ss->addTable(&ACS_TABLE_DETUMBLE_TRANS_0.second, ACS_TABLE_DETUMBLE_TRANS_0.first, false,
|
||||||
|
true),
|
||||||
|
ctxc);
|
||||||
|
|
||||||
|
// Build DETUMBLE transition 1
|
||||||
|
iht(objects::ACS_CONTROLLER, acs::CtrlModes::DETUMBLE, 0, ACS_TABLE_DETUMBLE_TRANS_1.second);
|
||||||
|
check(ss->addTable(&ACS_TABLE_DETUMBLE_TRANS_1.second, ACS_TABLE_DETUMBLE_TRANS_1.first, false,
|
||||||
|
true),
|
||||||
|
ctxc);
|
||||||
|
|
||||||
|
// Build DETUMBLE sequence
|
||||||
|
ihs(ACS_SEQUENCE_DETUMBLE.second, ACS_TABLE_DETUMBLE_TGT.first, 0, true);
|
||||||
|
ihs(ACS_SEQUENCE_DETUMBLE.second, ACS_TABLE_DETUMBLE_TRANS_0.first, 0, false);
|
||||||
|
ihs(ACS_SEQUENCE_DETUMBLE.second, ACS_TABLE_DETUMBLE_TRANS_1.first, 0, false);
|
||||||
|
check(ss->addSequence(&ACS_SEQUENCE_DETUMBLE.second, ACS_SEQUENCE_DETUMBLE.first,
|
||||||
|
ACS_SEQUENCE_SAFE.first, false, true),
|
||||||
|
ctxc);
|
||||||
|
}
|
||||||
|
|
||||||
|
void buildIdleSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||||
|
std::string context = "satsystem::buildIdleSequence";
|
||||||
|
auto ctxc = context.c_str();
|
||||||
|
// Insert Helper Table
|
||||||
|
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode,
|
||||||
|
ArrayList<ModeListEntry>& sequence) {
|
||||||
|
eh.setObject(obj);
|
||||||
|
eh.setMode(mode);
|
||||||
|
eh.setSubmode(submode);
|
||||||
|
check(sequence.insert(eh), ctxc);
|
||||||
|
};
|
||||||
|
// Insert Helper Sequence
|
||||||
|
auto ihs = [&](ArrayList<ModeListEntry>& sequence, Mode_t tableId, uint32_t waitSeconds,
|
||||||
|
bool checkSuccess) {
|
||||||
|
eh.setTableId(tableId);
|
||||||
|
eh.setWaitSeconds(waitSeconds);
|
||||||
|
eh.setCheckSuccess(checkSuccess);
|
||||||
|
check(sequence.insert(eh), ctxc);
|
||||||
|
};
|
||||||
|
// Build IDLE target
|
||||||
|
iht(objects::ACS_CONTROLLER, acs::CtrlModes::IDLE, 0, ACS_TABLE_IDLE_TGT.second);
|
||||||
|
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_IDLE_TGT.second);
|
||||||
|
iht(objects::RW_ASS, NML, 0, ACS_TABLE_IDLE_TGT.second);
|
||||||
|
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_IDLE_TGT.second);
|
||||||
|
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_IDLE_TGT.second);
|
||||||
|
ss->addTable(&ACS_TABLE_IDLE_TGT.second, ACS_TABLE_IDLE_TGT.first, false, true);
|
||||||
|
|
||||||
|
// Build IDLE transition 0
|
||||||
|
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_IDLE_TRANS_0.second);
|
||||||
|
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_IDLE_TRANS_0.second);
|
||||||
|
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_IDLE_TRANS_0.second);
|
||||||
|
iht(objects::RW_ASS, NML, 0, ACS_TABLE_IDLE_TRANS_0.second);
|
||||||
|
iht(objects::STAR_TRACKER, OFF, 0, ACS_TABLE_IDLE_TRANS_0.second);
|
||||||
|
ss->addTable(&ACS_TABLE_IDLE_TRANS_0.second, ACS_TABLE_IDLE_TRANS_0.first, false, true);
|
||||||
|
|
||||||
|
// Build IDLE transition 1
|
||||||
|
iht(objects::ACS_CONTROLLER, acs::CtrlModes::IDLE, 0, ACS_TABLE_IDLE_TRANS_1.second);
|
||||||
|
ss->addTable(&ACS_TABLE_IDLE_TRANS_1.second, ACS_TABLE_IDLE_TRANS_1.first, false, true);
|
||||||
|
|
||||||
|
// Build IDLE sequence
|
||||||
|
ihs(ACS_SEQUENCE_IDLE.second, ACS_TABLE_IDLE_TGT.first, 0, true);
|
||||||
|
ihs(ACS_SEQUENCE_IDLE.second, ACS_TABLE_IDLE_TRANS_0.first, 0, true);
|
||||||
|
ihs(ACS_SEQUENCE_IDLE.second, ACS_TABLE_IDLE_TRANS_1.first, 0, false);
|
||||||
|
ss->addSequence(&ACS_SEQUENCE_IDLE.second, ACS_SEQUENCE_IDLE.first, ACS_SEQUENCE_SAFE.first,
|
||||||
|
false, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void buildIdleChargeSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||||
|
std::string context = "satsystem::buildIdleChargeSequence";
|
||||||
|
auto ctxc = context.c_str();
|
||||||
|
// Insert Helper Table
|
||||||
|
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode,
|
||||||
|
ArrayList<ModeListEntry>& sequence) {
|
||||||
|
eh.setObject(obj);
|
||||||
|
eh.setMode(mode);
|
||||||
|
eh.setSubmode(submode);
|
||||||
|
check(sequence.insert(eh), ctxc);
|
||||||
|
};
|
||||||
|
// Insert Helper Sequence
|
||||||
|
auto ihs = [&](ArrayList<ModeListEntry>& sequence, Mode_t tableId, uint32_t waitSeconds,
|
||||||
|
bool checkSuccess) {
|
||||||
|
eh.setTableId(tableId);
|
||||||
|
eh.setWaitSeconds(waitSeconds);
|
||||||
|
eh.setCheckSuccess(checkSuccess);
|
||||||
|
check(sequence.insert(eh), ctxc);
|
||||||
|
};
|
||||||
|
// Build IDLE target
|
||||||
|
iht(objects::ACS_CONTROLLER, acs::CtrlModes::IDLE, acs::IDLE_CHARGE,
|
||||||
|
ACS_TABLE_IDLE_CHRG_TGT.second);
|
||||||
|
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_IDLE_CHRG_TGT.second);
|
||||||
|
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_IDLE_CHRG_TGT.second);
|
||||||
|
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_IDLE_CHRG_TGT.second);
|
||||||
|
check(ss->addTable(&ACS_TABLE_IDLE_CHRG_TGT.second, ACS_TABLE_IDLE_CHRG_TGT.first, false, true),
|
||||||
|
ctxc);
|
||||||
|
|
||||||
|
// Build IDLE transition 0
|
||||||
|
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_IDLE_CHRG_TRANS_0.second);
|
||||||
|
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_IDLE_CHRG_TRANS_0.second);
|
||||||
|
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_IDLE_CHRG_TRANS_0.second);
|
||||||
|
iht(objects::RW_ASS, OFF, 0, ACS_TABLE_IDLE_CHRG_TRANS_0.second);
|
||||||
|
iht(objects::STAR_TRACKER, OFF, 0, ACS_TABLE_IDLE_CHRG_TRANS_0.second);
|
||||||
|
check(ss->addTable(&ACS_TABLE_IDLE_CHRG_TRANS_0.second, ACS_TABLE_IDLE_CHRG_TRANS_0.first, false,
|
||||||
|
true),
|
||||||
|
ctxc);
|
||||||
|
|
||||||
|
// Build IDLE transition 1
|
||||||
|
iht(objects::ACS_CONTROLLER, acs::CtrlModes::IDLE, acs::IDLE_CHARGE,
|
||||||
|
ACS_TABLE_IDLE_CHRG_TRANS_1.second);
|
||||||
|
check(ss->addTable(&ACS_TABLE_IDLE_CHRG_TRANS_1.second, ACS_TABLE_IDLE_CHRG_TRANS_1.first, false,
|
||||||
|
true),
|
||||||
|
ctxc);
|
||||||
|
|
||||||
|
// Build IDLE sequence
|
||||||
|
ihs(ACS_SEQUENCE_IDLE_CHRG.second, ACS_TABLE_IDLE_CHRG_TGT.first, 0, true);
|
||||||
|
ihs(ACS_SEQUENCE_IDLE_CHRG.second, ACS_TABLE_IDLE_CHRG_TRANS_0.first, 0, true);
|
||||||
|
ihs(ACS_SEQUENCE_IDLE_CHRG.second, ACS_TABLE_IDLE_CHRG_TRANS_1.first, 0, false);
|
||||||
|
check(ss->addSequence(&ACS_SEQUENCE_IDLE_CHRG.second, ACS_SEQUENCE_IDLE_CHRG.first,
|
||||||
|
ACS_SEQUENCE_SAFE.first, false, true),
|
||||||
|
ctxc);
|
||||||
|
}
|
||||||
|
|
||||||
|
void buildTargetPtSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||||
|
std::string context = "satsystem::buildTargetPtSequence";
|
||||||
|
auto ctxc = context.c_str();
|
||||||
|
// Insert Helper Table
|
||||||
|
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode,
|
||||||
|
ArrayList<ModeListEntry>& sequence) {
|
||||||
|
eh.setObject(obj);
|
||||||
|
eh.setMode(mode);
|
||||||
|
eh.setSubmode(submode);
|
||||||
|
check(sequence.insert(eh), ctxc);
|
||||||
|
};
|
||||||
|
// Insert Helper Sequence
|
||||||
|
auto ihs = [&](ArrayList<ModeListEntry>& sequence, Mode_t tableId, uint32_t waitSeconds,
|
||||||
|
bool checkSuccess) {
|
||||||
|
eh.setTableId(tableId);
|
||||||
|
eh.setWaitSeconds(waitSeconds);
|
||||||
|
eh.setCheckSuccess(checkSuccess);
|
||||||
|
check(sequence.insert(eh), ctxc);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Build TARGET PT table
|
||||||
|
iht(objects::ACS_CONTROLLER, acs::CtrlModes::TARGET_PT, 0, ACS_TABLE_TARGET_PT_TGT.second);
|
||||||
|
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_TARGET_PT_TGT.second);
|
||||||
|
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_TARGET_PT_TGT.second);
|
||||||
|
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_TARGET_PT_TGT.second);
|
||||||
|
iht(objects::RW_ASS, NML, 0, ACS_TABLE_TARGET_PT_TGT.second);
|
||||||
|
iht(objects::STAR_TRACKER, NML, 0, ACS_TABLE_TARGET_PT_TGT.second);
|
||||||
|
check(ss->addTable(&ACS_TABLE_TARGET_PT_TGT.second, ACS_TABLE_TARGET_PT_TGT.first, false, true),
|
||||||
|
ctxc);
|
||||||
|
|
||||||
|
// Build TARGET PT transition 0
|
||||||
|
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_TARGET_PT_TRANS_0.second);
|
||||||
|
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_TARGET_PT_TRANS_0.second);
|
||||||
|
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_TARGET_PT_TRANS_0.second);
|
||||||
|
iht(objects::RW_ASS, NML, 0, ACS_TABLE_TARGET_PT_TRANS_0.second);
|
||||||
|
iht(objects::STAR_TRACKER, NML, 0, ACS_TABLE_TARGET_PT_TRANS_0.second);
|
||||||
|
check(ss->addTable(&ACS_TABLE_TARGET_PT_TRANS_0.second, ACS_TABLE_TARGET_PT_TRANS_0.first, false,
|
||||||
|
true),
|
||||||
|
ctxc);
|
||||||
|
|
||||||
|
// Build TARGET PT transition 1
|
||||||
|
iht(objects::ACS_CONTROLLER, acs::CtrlModes::TARGET_PT, 0, ACS_TABLE_TARGET_PT_TRANS_1.second);
|
||||||
|
check(ss->addTable(&ACS_TABLE_TARGET_PT_TRANS_1.second, ACS_TABLE_TARGET_PT_TRANS_1.first, false,
|
||||||
|
true),
|
||||||
|
ctxc);
|
||||||
|
|
||||||
|
// Build IDLE sequence
|
||||||
|
ihs(ACS_SEQUENCE_TARGET_PT.second, ACS_TABLE_TARGET_PT_TGT.first, 0, true);
|
||||||
|
ihs(ACS_SEQUENCE_TARGET_PT.second, ACS_TABLE_TARGET_PT_TRANS_0.first, 0, true);
|
||||||
|
ihs(ACS_SEQUENCE_TARGET_PT.second, ACS_TABLE_TARGET_PT_TRANS_1.first, 0, false);
|
||||||
|
check(ss->addSequence(&ACS_SEQUENCE_TARGET_PT.second, ACS_SEQUENCE_TARGET_PT.first,
|
||||||
|
ACS_SEQUENCE_IDLE.first, false, true),
|
||||||
|
ctxc);
|
||||||
|
}
|
||||||
|
|
||||||
|
void checkInsert(ReturnValue_t result, const char* ctx) {
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
sif::warning << "satsystem::checkInsert: Insertion failed at " << ctx;
|
||||||
|
if (result == mapdefs::KEY_ALREADY_EXISTS) {
|
||||||
|
sif::warning << ": Key already exists" << std::endl;
|
||||||
|
} else if (result == mapdefs::MAP_FULL) {
|
||||||
|
sif::warning << ": Map full" << std::endl;
|
||||||
|
} else {
|
||||||
|
sif::warning << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
11
mission/system/tree/acsModeTree.h
Normal file
11
mission/system/tree/acsModeTree.h
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include <fsfw/subsystem/modes/ModeDefinitions.h>
|
||||||
|
|
||||||
|
class Subsystem;
|
||||||
|
|
||||||
|
namespace satsystem {
|
||||||
|
|
||||||
|
extern Subsystem ACS_SUBSYSTEM;
|
||||||
|
|
||||||
|
void initAcsSubsystem(object_id_t satSystemObjId);
|
||||||
|
|
||||||
|
} // namespace satsystem
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit f99ca2f8d8df6e37f4e50073aa2dbcefff232524
|
Subproject commit f3609b81799790578c095262f33c11add3c0b078
|
@ -17,7 +17,7 @@ TEST_CASE("Thermal Controller", "[ThermalController]") {
|
|||||||
|
|
||||||
// testEnvironment::initialize();
|
// testEnvironment::initialize();
|
||||||
|
|
||||||
ThermalController controller(THERMAL_CONTROLLER_ID, objects::NO_OBJECT);
|
ThermalController controller(THERMAL_CONTROLLER_ID);
|
||||||
ReturnValue_t result = controller.initialize();
|
ReturnValue_t result = controller.initialize();
|
||||||
REQUIRE(result == returnvalue::OK);
|
REQUIRE(result == returnvalue::OK);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user