Merge remote-tracking branch 'origin/develop' into mueller/system-subsystems
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
This commit is contained in:
commit
970b8c33e5
4
automation/Jenkinsfile
vendored
4
automation/Jenkinsfile
vendored
@ -20,7 +20,7 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
dir(BUILDDIR_Q7) {
|
dir(BUILDDIR_Q7) {
|
||||||
sh 'cmake -DTGT_BSP="arm/q7s" -DCMAKE_BUILD_TYPE=Debug ..'
|
sh 'cmake -DTGT_BSP="arm/q7s" -DCMAKE_BUILD_TYPE=Debug ..'
|
||||||
sh 'cmake --build . -j'
|
sh 'cmake --build . -j4'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -28,7 +28,7 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
dir(BUILDDIR_LINUX) {
|
dir(BUILDDIR_LINUX) {
|
||||||
sh 'cmake ..'
|
sh 'cmake ..'
|
||||||
sh 'cmake --build . -t eive-unittest -j'
|
sh 'cmake --build . -t eive-unittest -j4'
|
||||||
sh './eive-unittest'
|
sh './eive-unittest'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,8 +29,13 @@
|
|||||||
#include "linux/boardtest/UartTestClass.h"
|
#include "linux/boardtest/UartTestClass.h"
|
||||||
#include "linux/csp/CspComIF.h"
|
#include "linux/csp/CspComIF.h"
|
||||||
#include "linux/csp/CspCookie.h"
|
#include "linux/csp/CspCookie.h"
|
||||||
|
#include "linux/devices/GPSHyperionLinuxController.h"
|
||||||
|
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
||||||
|
#include "linux/devices/startracker/StarTrackerHandler.h"
|
||||||
|
#include "linux/devices/startracker/StrHelper.h"
|
||||||
#include "tmtc/apid.h"
|
#include "tmtc/apid.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"
|
||||||
#endif
|
#endif
|
||||||
@ -52,13 +57,6 @@
|
|||||||
#include "fsfw_hal/linux/spi/SpiCookie.h"
|
#include "fsfw_hal/linux/spi/SpiCookie.h"
|
||||||
#include "fsfw_hal/linux/uart/UartComIF.h"
|
#include "fsfw_hal/linux/uart/UartComIF.h"
|
||||||
#include "fsfw_hal/linux/uart/UartCookie.h"
|
#include "fsfw_hal/linux/uart/UartCookie.h"
|
||||||
#include "linux/boardtest/SpiTestClass.h"
|
|
||||||
#include "linux/csp/CspComIF.h"
|
|
||||||
#include "linux/csp/CspCookie.h"
|
|
||||||
#include "linux/devices/GPSHyperionLinuxController.h"
|
|
||||||
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
|
||||||
#include "linux/devices/startracker/StarTrackerHandler.h"
|
|
||||||
#include "linux/devices/startracker/StrHelper.h"
|
|
||||||
#include "mission/core/GenericFactory.h"
|
#include "mission/core/GenericFactory.h"
|
||||||
#include "mission/devices/ACUHandler.h"
|
#include "mission/devices/ACUHandler.h"
|
||||||
#include "mission/devices/BpxBatteryHandler.h"
|
#include "mission/devices/BpxBatteryHandler.h"
|
||||||
@ -70,6 +68,7 @@
|
|||||||
#include "mission/devices/PCDUHandler.h"
|
#include "mission/devices/PCDUHandler.h"
|
||||||
#include "mission/devices/PDU1Handler.h"
|
#include "mission/devices/PDU1Handler.h"
|
||||||
#include "mission/devices/PDU2Handler.h"
|
#include "mission/devices/PDU2Handler.h"
|
||||||
|
#include "mission/devices/PayloadPcduHandler.h"
|
||||||
#include "mission/devices/PlocMPSoCHandler.h"
|
#include "mission/devices/PlocMPSoCHandler.h"
|
||||||
#include "mission/devices/RadiationSensorHandler.h"
|
#include "mission/devices/RadiationSensorHandler.h"
|
||||||
#include "mission/devices/RwHandler.h"
|
#include "mission/devices/RwHandler.h"
|
||||||
@ -85,6 +84,7 @@
|
|||||||
#include "mission/devices/devicedefinitions/SusDefinitions.h"
|
#include "mission/devices/devicedefinitions/SusDefinitions.h"
|
||||||
#include "mission/devices/devicedefinitions/SyrlinksDefinitions.h"
|
#include "mission/devices/devicedefinitions/SyrlinksDefinitions.h"
|
||||||
#include "mission/system/AcsBoardAssembly.h"
|
#include "mission/system/AcsBoardAssembly.h"
|
||||||
|
#include "mission/devices/devicedefinitions/payloadPcduDefinitions.h"
|
||||||
#include "mission/tmtc/CCSDSHandler.h"
|
#include "mission/tmtc/CCSDSHandler.h"
|
||||||
#include "mission/tmtc/VirtualChannel.h"
|
#include "mission/tmtc/VirtualChannel.h"
|
||||||
#include "mission/utility/TmFunnel.h"
|
#include "mission/utility/TmFunnel.h"
|
||||||
@ -396,8 +396,7 @@ void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF* gpioComIF, SpiComI
|
|||||||
spiCookie =
|
spiCookie =
|
||||||
new SpiCookie(addresses::SUS_6, gpioIds::CS_SUS_6, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
|
new SpiCookie(addresses::SUS_6, gpioIds::CS_SUS_6, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
|
||||||
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
SusHandler* susHandler6 = new SusHandler(objects::SUS_6, 6, objects::SPI_COM_IF, spiCookie,
|
SusHandler* susHandler6 = new SusHandler(objects::SUS_6, 6, objects::SPI_COM_IF, spiCookie);
|
||||||
gpioComIF, gpioIds::CS_SUS_6);
|
|
||||||
|
|
||||||
spiCookie =
|
spiCookie =
|
||||||
new SpiCookie(addresses::SUS_7, gpioIds::CS_SUS_7, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
|
new SpiCookie(addresses::SUS_7, gpioIds::CS_SUS_7, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
|
||||||
@ -1207,15 +1206,6 @@ void ObjectFactory::createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF*
|
|||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_DRO, consumer, Direction::OUT,
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_DRO, consumer, Direction::OUT,
|
||||||
gpio::Levels::LOW);
|
gpio::Levels::LOW);
|
||||||
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_DRO, gpio);
|
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_DRO, gpio);
|
||||||
consumer = "PLPCDU_ENB_HPA";
|
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_HPA, consumer, Direction::OUT,
|
|
||||||
gpio::Levels::LOW);
|
|
||||||
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_HPA, gpio);
|
|
||||||
consumer = "PLPCDU_ENB_MPA";
|
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_MPA, consumer, Direction::OUT,
|
|
||||||
gpio::Levels::LOW);
|
|
||||||
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_MPA, gpio);
|
|
||||||
|
|
||||||
consumer = "PLPCDU_ENB_X8";
|
consumer = "PLPCDU_ENB_X8";
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_X8, consumer, Direction::OUT,
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_X8, consumer, Direction::OUT,
|
||||||
gpio::Levels::LOW);
|
gpio::Levels::LOW);
|
||||||
@ -1224,6 +1214,14 @@ void ObjectFactory::createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF*
|
|||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_TX, consumer, Direction::OUT,
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_TX, consumer, Direction::OUT,
|
||||||
gpio::Levels::LOW);
|
gpio::Levels::LOW);
|
||||||
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_TX, gpio);
|
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_TX, gpio);
|
||||||
|
consumer = "PLPCDU_ENB_MPA";
|
||||||
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_MPA, consumer, Direction::OUT,
|
||||||
|
gpio::Levels::LOW);
|
||||||
|
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_MPA, gpio);
|
||||||
|
consumer = "PLPCDU_ENB_HPA";
|
||||||
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_HPA, consumer, Direction::OUT,
|
||||||
|
gpio::Levels::LOW);
|
||||||
|
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_HPA, gpio);
|
||||||
|
|
||||||
// Chip select pin is active low
|
// Chip select pin is active low
|
||||||
consumer = "PLPCDU_ADC_CS";
|
consumer = "PLPCDU_ADC_CS";
|
||||||
@ -1231,6 +1229,22 @@ void ObjectFactory::createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF*
|
|||||||
gpio::Levels::HIGH);
|
gpio::Levels::HIGH);
|
||||||
plPcduGpios->addGpio(gpioIds::PLPCDU_ADC_CS, gpio);
|
plPcduGpios->addGpio(gpioIds::PLPCDU_ADC_CS, gpio);
|
||||||
gpioComIF->addGpios(plPcduGpios);
|
gpioComIF->addGpios(plPcduGpios);
|
||||||
|
SpiCookie* spiCookie = new SpiCookie(addresses::PLPCDU_ADC, gpioIds::PLPCDU_ADC_CS,
|
||||||
|
q7s::SPI_DEFAULT_DEV, plpcdu::MAX_ADC_REPLY_SIZE,
|
||||||
|
spi::DEFAULT_MAX_1227_MODE, spi::PL_PCDU_MAX_1227_SPEED);
|
||||||
|
// Create device handler components
|
||||||
|
auto plPcduHandler =
|
||||||
|
new PayloadPcduHandler(objects::PLPCDU_HANDLER, objects::SPI_COM_IF, spiCookie, gpioComIF,
|
||||||
|
SdCardManager::instance(), false);
|
||||||
|
spiCookie->setCallbackMode(PayloadPcduHandler::extConvAsTwoCallback, plPcduHandler);
|
||||||
|
static_cast<void>(plPcduHandler);
|
||||||
|
#if OBSW_TEST_PL_PCDU == 1
|
||||||
|
plPcduHandler->setStartUpImmediately();
|
||||||
|
#if OBSW_DEBUG_PL_PCDU == 1
|
||||||
|
plPcduHandler->setToGoToNormalModeImmediately(true);
|
||||||
|
plPcduHandler->enablePeriodicPrintout(true, 5);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createTestComponents(LinuxLibgpioIF* gpioComIF) {
|
void ObjectFactory::createTestComponents(LinuxLibgpioIF* gpioComIF) {
|
||||||
|
@ -32,6 +32,8 @@ static const uint32_t SUS_MAX1227_SPI_FREQ = 976'000;
|
|||||||
static constexpr uint32_t DEFAULT_MAX_1227_SPEED = 976'000;
|
static constexpr uint32_t DEFAULT_MAX_1227_SPEED = 976'000;
|
||||||
static constexpr spi::SpiModes DEFAULT_MAX_1227_MODE = spi::SpiModes::MODE_3;
|
static constexpr spi::SpiModes DEFAULT_MAX_1227_MODE = spi::SpiModes::MODE_3;
|
||||||
|
|
||||||
|
static constexpr uint32_t PL_PCDU_MAX_1227_SPEED = 976'000;
|
||||||
|
|
||||||
static constexpr uint32_t DEFAULT_ADIS16507_SPEED = 976'000;
|
static constexpr uint32_t DEFAULT_ADIS16507_SPEED = 976'000;
|
||||||
static constexpr spi::SpiModes DEFAULT_ADIS16507_MODE = spi::SpiModes::MODE_3;
|
static constexpr spi::SpiModes DEFAULT_ADIS16507_MODE = spi::SpiModes::MODE_3;
|
||||||
|
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
<envs>
|
<envs>
|
||||||
<env name="PYTHONUNBUFFERED" value="1" />
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
</envs>
|
</envs>
|
||||||
<option name="SDK_HOME" value="C:\Users\jakob\AppData\Local\Programs\Python\Python39\python.exe" />
|
<option name="SDK_HOME" value="" />
|
||||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
<option name="IS_MODULE_SDK" value="false" />
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
@ -1,144 +1,141 @@
|
|||||||
2200;STORE_SEND_WRITE_FAILED;LOW;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2200;0x0898;STORE_SEND_WRITE_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2201;STORE_WRITE_FAILED;LOW;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2201;0x0899;STORE_WRITE_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2202;STORE_SEND_READ_FAILED;LOW;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2202;0x089a;STORE_SEND_READ_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2203;STORE_READ_FAILED;LOW;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2203;0x089b;STORE_READ_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2204;UNEXPECTED_MSG;LOW;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2204;0x089c;UNEXPECTED_MSG;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2205;STORING_FAILED;LOW;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2205;0x089d;STORING_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2206;TM_DUMP_FAILED;LOW;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2206;0x089e;TM_DUMP_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2207;STORE_INIT_FAILED;LOW;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2207;0x089f;STORE_INIT_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2208;STORE_INIT_EMPTY;INFO;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2208;0x08a0;STORE_INIT_EMPTY;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2209;STORE_CONTENT_CORRUPTED;LOW;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2209;0x08a1;STORE_CONTENT_CORRUPTED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2210;STORE_INITIALIZE;INFO;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2210;0x08a2;STORE_INITIALIZE;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2211;INIT_DONE;INFO;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2211;0x08a3;INIT_DONE;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2212;DUMP_FINISHED;INFO;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2212;0x08a4;DUMP_FINISHED;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2213;DELETION_FINISHED;INFO;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2213;0x08a5;DELETION_FINISHED;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2214;DELETION_FAILED;LOW;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2214;0x08a6;DELETION_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2215;AUTO_CATALOGS_SENDING_FAILED;INFO;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2215;0x08a7;AUTO_CATALOGS_SENDING_FAILED;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2600;GET_DATA_FAILED;LOW;;./fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
2600;0x0a28;GET_DATA_FAILED;LOW;;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||||
2601;STORE_DATA_FAILED;LOW;;./fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
2601;0x0a29;STORE_DATA_FAILED;LOW;;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||||
2800;DEVICE_BUILDING_COMMAND_FAILED;LOW;;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2800;0x0af0;DEVICE_BUILDING_COMMAND_FAILED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
2801;DEVICE_SENDING_COMMAND_FAILED;LOW;;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2801;0x0af1;DEVICE_SENDING_COMMAND_FAILED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
2802;DEVICE_REQUESTING_REPLY_FAILED;LOW;;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2802;0x0af2;DEVICE_REQUESTING_REPLY_FAILED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
2803;DEVICE_READING_REPLY_FAILED;LOW;;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2803;0x0af3;DEVICE_READING_REPLY_FAILED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
2804;DEVICE_INTERPRETING_REPLY_FAILED;LOW;;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2804;0x0af4;DEVICE_INTERPRETING_REPLY_FAILED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
2805;DEVICE_MISSED_REPLY;LOW;;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2805;0x0af5;DEVICE_MISSED_REPLY;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
2806;DEVICE_UNKNOWN_REPLY;LOW;;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2806;0x0af6;DEVICE_UNKNOWN_REPLY;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
2807;DEVICE_UNREQUESTED_REPLY;LOW;;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2807;0x0af7;DEVICE_UNREQUESTED_REPLY;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
2808;INVALID_DEVICE_COMMAND;LOW;Indicates a SW bug in child class.;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2808;0x0af8;INVALID_DEVICE_COMMAND;LOW;Indicates a SW bug in child class.;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
2809;MONITORING_LIMIT_EXCEEDED;LOW;;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2809;0x0af9;MONITORING_LIMIT_EXCEEDED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
2810;MONITORING_AMBIGUOUS;HIGH;;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2810;0x0afa;MONITORING_AMBIGUOUS;HIGH;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
2811;DEVICE_WANTS_HARD_REBOOT;HIGH;;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2811;0x0afb;DEVICE_WANTS_HARD_REBOOT;HIGH;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
4201;FUSE_CURRENT_HIGH;LOW;;./fsfw/src/fsfw/power/Fuse.h
|
4201;0x1069;FUSE_CURRENT_HIGH;LOW;;fsfw/src/fsfw/power/Fuse.h
|
||||||
4202;FUSE_WENT_OFF;LOW;;./fsfw/src/fsfw/power/Fuse.h
|
4202;0x106a;FUSE_WENT_OFF;LOW;;fsfw/src/fsfw/power/Fuse.h
|
||||||
4204;POWER_ABOVE_HIGH_LIMIT;LOW;;./fsfw/src/fsfw/power/Fuse.h
|
4204;0x106c;POWER_ABOVE_HIGH_LIMIT;LOW;;fsfw/src/fsfw/power/Fuse.h
|
||||||
4205;POWER_BELOW_LOW_LIMIT;LOW;;./fsfw/src/fsfw/power/Fuse.h
|
4205;0x106d;POWER_BELOW_LOW_LIMIT;LOW;;fsfw/src/fsfw/power/Fuse.h
|
||||||
4300;SWITCH_WENT_OFF;LOW;;./fsfw/src/fsfw/power/PowerSwitchIF.h
|
4300;0x10cc;SWITCH_WENT_OFF;LOW;;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||||
5000;HEATER_ON;INFO;;./fsfw/src/fsfw/thermal/Heater.h
|
5000;0x1388;HEATER_ON;INFO;;fsfw/src/fsfw/thermal/Heater.h
|
||||||
5001;HEATER_OFF;INFO;;./fsfw/src/fsfw/thermal/Heater.h
|
5001;0x1389;HEATER_OFF;INFO;;fsfw/src/fsfw/thermal/Heater.h
|
||||||
5002;HEATER_TIMEOUT;LOW;;./fsfw/src/fsfw/thermal/Heater.h
|
5002;0x138a;HEATER_TIMEOUT;LOW;;fsfw/src/fsfw/thermal/Heater.h
|
||||||
5003;HEATER_STAYED_ON;LOW;;./fsfw/src/fsfw/thermal/Heater.h
|
5003;0x138b;HEATER_STAYED_ON;LOW;;fsfw/src/fsfw/thermal/Heater.h
|
||||||
5004;HEATER_STAYED_OFF;LOW;;./fsfw/src/fsfw/thermal/Heater.h
|
5004;0x138c;HEATER_STAYED_OFF;LOW;;fsfw/src/fsfw/thermal/Heater.h
|
||||||
5200;TEMP_SENSOR_HIGH;LOW;;./fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
|
5200;0x1450;TEMP_SENSOR_HIGH;LOW;;fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
|
||||||
5201;TEMP_SENSOR_LOW;LOW;;./fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
|
5201;0x1451;TEMP_SENSOR_LOW;LOW;;fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
|
||||||
5202;TEMP_SENSOR_GRADIENT;LOW;;./fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
|
5202;0x1452;TEMP_SENSOR_GRADIENT;LOW;;fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
|
||||||
5901;COMPONENT_TEMP_LOW;LOW;;./fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
5901;0x170d;COMPONENT_TEMP_LOW;LOW;;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||||
5902;COMPONENT_TEMP_HIGH;LOW;;./fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
5902;0x170e;COMPONENT_TEMP_HIGH;LOW;;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||||
5903;COMPONENT_TEMP_OOL_LOW;LOW;;./fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
5903;0x170f;COMPONENT_TEMP_OOL_LOW;LOW;;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||||
5904;COMPONENT_TEMP_OOL_HIGH;LOW;;./fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
5904;0x1710;COMPONENT_TEMP_OOL_HIGH;LOW;;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||||
5905;TEMP_NOT_IN_OP_RANGE;LOW;;./fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
5905;0x1711;TEMP_NOT_IN_OP_RANGE;LOW;;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||||
7101;FDIR_CHANGED_STATE;INFO;;./fsfw/src/fsfw/fdir/FailureIsolationBase.h
|
7101;0x1bbd;FDIR_CHANGED_STATE;INFO;;fsfw/src/fsfw/fdir/FailureIsolationBase.h
|
||||||
7102;FDIR_STARTS_RECOVERY;MEDIUM;;./fsfw/src/fsfw/fdir/FailureIsolationBase.h
|
7102;0x1bbe;FDIR_STARTS_RECOVERY;MEDIUM;;fsfw/src/fsfw/fdir/FailureIsolationBase.h
|
||||||
7103;FDIR_TURNS_OFF_DEVICE;MEDIUM;;./fsfw/src/fsfw/fdir/FailureIsolationBase.h
|
7103;0x1bbf;FDIR_TURNS_OFF_DEVICE;MEDIUM;;fsfw/src/fsfw/fdir/FailureIsolationBase.h
|
||||||
7201;MONITOR_CHANGED_STATE;LOW;;./fsfw/src/fsfw/monitoring/MonitoringIF.h
|
7201;0x1c21;MONITOR_CHANGED_STATE;LOW;;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
7202;VALUE_BELOW_LOW_LIMIT;LOW;;./fsfw/src/fsfw/monitoring/MonitoringIF.h
|
7202;0x1c22;VALUE_BELOW_LOW_LIMIT;LOW;;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
7203;VALUE_ABOVE_HIGH_LIMIT;LOW;;./fsfw/src/fsfw/monitoring/MonitoringIF.h
|
7203;0x1c23;VALUE_ABOVE_HIGH_LIMIT;LOW;;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
7204;VALUE_OUT_OF_RANGE;LOW;;./fsfw/src/fsfw/monitoring/MonitoringIF.h
|
7204;0x1c24;VALUE_OUT_OF_RANGE;LOW;;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
7400;CHANGING_MODE;INFO;;./fsfw/src/fsfw/modes/HasModesIF.h
|
7400;0x1ce8;CHANGING_MODE;INFO;;fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
7401;MODE_INFO;INFO;;./fsfw/src/fsfw/modes/HasModesIF.h
|
7401;0x1ce9;MODE_INFO;INFO;;fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
7402;FALLBACK_FAILED;HIGH;;./fsfw/src/fsfw/modes/HasModesIF.h
|
7402;0x1cea;FALLBACK_FAILED;HIGH;;fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
7403;MODE_TRANSITION_FAILED;LOW;;./fsfw/src/fsfw/modes/HasModesIF.h
|
7403;0x1ceb;MODE_TRANSITION_FAILED;LOW;;fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
7404;CANT_KEEP_MODE;HIGH;;./fsfw/src/fsfw/modes/HasModesIF.h
|
7404;0x1cec;CANT_KEEP_MODE;HIGH;;fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
7405;OBJECT_IN_INVALID_MODE;LOW;;./fsfw/src/fsfw/modes/HasModesIF.h
|
7405;0x1ced;OBJECT_IN_INVALID_MODE;LOW;;fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
7406;FORCING_MODE;MEDIUM;;./fsfw/src/fsfw/modes/HasModesIF.h
|
7406;0x1cee;FORCING_MODE;MEDIUM;;fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
7407;MODE_CMD_REJECTED;LOW;;./fsfw/src/fsfw/modes/HasModesIF.h
|
7407;0x1cef;MODE_CMD_REJECTED;LOW;;fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
7506;HEALTH_INFO;INFO;;./fsfw/src/fsfw/health/HasHealthIF.h
|
7506;0x1d52;HEALTH_INFO;INFO;;fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
7507;CHILD_CHANGED_HEALTH;INFO;;./fsfw/src/fsfw/health/HasHealthIF.h
|
7507;0x1d53;CHILD_CHANGED_HEALTH;INFO;;fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
7508;CHILD_PROBLEMS;LOW;;./fsfw/src/fsfw/health/HasHealthIF.h
|
7508;0x1d54;CHILD_PROBLEMS;LOW;;fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
7509;OVERWRITING_HEALTH;LOW;;./fsfw/src/fsfw/health/HasHealthIF.h
|
7509;0x1d55;OVERWRITING_HEALTH;LOW;;fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
7510;TRYING_RECOVERY;MEDIUM;;./fsfw/src/fsfw/health/HasHealthIF.h
|
7510;0x1d56;TRYING_RECOVERY;MEDIUM;;fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
7511;RECOVERY_STEP;MEDIUM;;./fsfw/src/fsfw/health/HasHealthIF.h
|
7511;0x1d57;RECOVERY_STEP;MEDIUM;;fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
7512;RECOVERY_DONE;MEDIUM;;./fsfw/src/fsfw/health/HasHealthIF.h
|
7512;0x1d58;RECOVERY_DONE;MEDIUM;;fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
7900;RF_AVAILABLE;INFO;A RF available signal was detected. P1: raw RFA state, P2: 0;./fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
7900;0x1edc;RF_AVAILABLE;INFO;A RF available signal was detected. P1: raw RFA state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||||
7901;RF_LOST;INFO;A previously found RF available signal was lost. P1: raw RFA state, P2: 0;./fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
7901;0x1edd;RF_LOST;INFO;A previously found RF available signal was lost. P1: raw RFA state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||||
7902;BIT_LOCK;INFO;A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0;./fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
7902;0x1ede;BIT_LOCK;INFO;A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||||
7903;BIT_LOCK_LOST;INFO;A previously found Bit Lock signal was lost. P1: raw BLO state, P2: 0;./fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
7903;0x1edf;BIT_LOCK_LOST;INFO;A previously found Bit Lock signal was lost. P1: raw BLO state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||||
7905;FRAME_PROCESSING_FAILED;LOW;The CCSDS Board could not interpret a TC;./fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
7905;0x1ee1;FRAME_PROCESSING_FAILED;LOW;The CCSDS Board could not interpret a TC;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||||
8900;CLOCK_SET;INFO;;./fsfw/src/fsfw/pus/Service9TimeManagement.h
|
8900;0x22c4;CLOCK_SET;INFO;;fsfw/src/fsfw/pus/Service9TimeManagement.h
|
||||||
8901;CLOCK_SET_FAILURE;LOW;;./fsfw/src/fsfw/pus/Service9TimeManagement.h
|
8901;0x22c5;CLOCK_SET_FAILURE;LOW;;fsfw/src/fsfw/pus/Service9TimeManagement.h
|
||||||
9700;TEST;INFO;;./fsfw/src/fsfw/pus/Service17Test.h
|
9700;0x25e4;TEST;INFO;;fsfw/src/fsfw/pus/Service17Test.h
|
||||||
10600;CHANGE_OF_SETUP_PARAMETER;LOW;;./fsfw/hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h
|
10600;0x2968;CHANGE_OF_SETUP_PARAMETER;LOW;;fsfw/hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h
|
||||||
10800;SWITCH_CMD_SENT;INFO;Indicated that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index;./mission/devices/devicedefinitions/powerDefinitions.h
|
10900;0x2a94;GPIO_PULL_HIGH_FAILED;LOW;;mission/devices/HeaterHandler.h
|
||||||
10801;SWITCH_HAS_CHANGED;INFO;;./mission/devices/devicedefinitions/powerDefinitions.h
|
10901;0x2a95;GPIO_PULL_LOW_FAILED;LOW;;mission/devices/HeaterHandler.h
|
||||||
10802;SWITCHING_Q7S_DENIED;MEDIUM;;./mission/devices/devicedefinitions/powerDefinitions.h
|
10902;0x2a96;SWITCH_ALREADY_ON;LOW;;mission/devices/HeaterHandler.h
|
||||||
10900;GPIO_PULL_HIGH_FAILED;LOW;;./mission/devices/HeaterHandler.h
|
10903;0x2a97;SWITCH_ALREADY_OFF;LOW;;mission/devices/HeaterHandler.h
|
||||||
10901;GPIO_PULL_LOW_FAILED;LOW;;./mission/devices/HeaterHandler.h
|
10904;0x2a98;MAIN_SWITCH_TIMEOUT;LOW;;mission/devices/HeaterHandler.h
|
||||||
10902;SWITCH_ALREADY_ON;LOW;;./mission/devices/HeaterHandler.h
|
11000;0x2af8;MAIN_SWITCH_ON_TIMEOUT;LOW;;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
10903;SWITCH_ALREADY_OFF;LOW;;./mission/devices/HeaterHandler.h
|
11001;0x2af9;MAIN_SWITCH_OFF_TIMEOUT;LOW;;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
10904;MAIN_SWITCH_TIMEOUT;LOW;;./mission/devices/HeaterHandler.h
|
11002;0x2afa;DEPLOYMENT_FAILED;HIGH;;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
11000;MAIN_SWITCH_ON_TIMEOUT;LOW;;./mission/devices/SolarArrayDeploymentHandler.h
|
11003;0x2afb;DEPL_SA1_GPIO_SWTICH_ON_FAILED;HIGH;;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
11001;MAIN_SWITCH_OFF_TIMEOUT;LOW;;./mission/devices/SolarArrayDeploymentHandler.h
|
11004;0x2afc;DEPL_SA2_GPIO_SWTICH_ON_FAILED;HIGH;;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
11002;DEPLOYMENT_FAILED;HIGH;;./mission/devices/SolarArrayDeploymentHandler.h
|
11101;0x2b5d;MEMORY_READ_RPT_CRC_FAILURE;LOW;;mission/devices/PlocMPSoCHandler.h
|
||||||
11003;DEPL_SA1_GPIO_SWTICH_ON_FAILED;HIGH;;./mission/devices/SolarArrayDeploymentHandler.h
|
11102;0x2b5e;ACK_FAILURE;LOW;;mission/devices/PlocMPSoCHandler.h
|
||||||
11004;DEPL_SA2_GPIO_SWTICH_ON_FAILED;HIGH;;./mission/devices/SolarArrayDeploymentHandler.h
|
11103;0x2b5f;EXE_FAILURE;LOW;;mission/devices/PlocMPSoCHandler.h
|
||||||
11101;MEMORY_READ_RPT_CRC_FAILURE;LOW;;./mission/devices/PlocMPSoCHandler.h
|
11104;0x2b60;CRC_FAILURE_EVENT;LOW;;mission/devices/PlocMPSoCHandler.h
|
||||||
11102;ACK_FAILURE;LOW;;./mission/devices/PlocMPSoCHandler.h
|
11201;0x2bc1;SELF_TEST_I2C_FAILURE;LOW;Get self test result returns I2C failure P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/IMTQHandler.h
|
||||||
11103;EXE_FAILURE;LOW;;./mission/devices/PlocMPSoCHandler.h
|
11202;0x2bc2;SELF_TEST_SPI_FAILURE;LOW;Get self test result returns SPI failure. This concerns the MTM connectivity. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/IMTQHandler.h
|
||||||
11104;CRC_FAILURE_EVENT;LOW;;./mission/devices/PlocMPSoCHandler.h
|
11203;0x2bc3;SELF_TEST_ADC_FAILURE;LOW;Get self test result returns failure in measurement of current and temperature. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/IMTQHandler.h
|
||||||
11201;SELF_TEST_I2C_FAILURE;LOW;Get self test result returns I2C failure P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;./mission/devices/IMTQHandler.h
|
11204;0x2bc4;SELF_TEST_PWM_FAILURE;LOW;Get self test result returns PWM failure which concerns the coil actuation. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/IMTQHandler.h
|
||||||
11202;SELF_TEST_SPI_FAILURE;LOW;Get self test result returns SPI failure. This concerns the MTM connectivity. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;./mission/devices/IMTQHandler.h
|
11205;0x2bc5;SELF_TEST_TC_FAILURE;LOW;Get self test result returns TC failure (system failure) P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/IMTQHandler.h
|
||||||
11203;SELF_TEST_ADC_FAILURE;LOW;Get self test result returns failure in measurement of current and temperature. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;./mission/devices/IMTQHandler.h
|
11206;0x2bc6;SELF_TEST_MTM_RANGE_FAILURE;LOW;Get self test result returns failure that MTM values were outside of the expected range. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/IMTQHandler.h
|
||||||
11204;SELF_TEST_PWM_FAILURE;LOW;Get self test result returns PWM failure which concerns the coil actuation. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;./mission/devices/IMTQHandler.h
|
11207;0x2bc7;SELF_TEST_COIL_CURRENT_FAILURE;LOW;Get self test result returns failure indicating that the coil current was outside of the expected range P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/IMTQHandler.h
|
||||||
11205;SELF_TEST_TC_FAILURE;LOW;Get self test result returns TC failure (system failure) P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;./mission/devices/IMTQHandler.h
|
11208;0x2bc8;INVALID_ERROR_BYTE;LOW;Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC.;mission/devices/IMTQHandler.h
|
||||||
11206;SELF_TEST_MTM_RANGE_FAILURE;LOW;Get self test result returns failure that MTM values were outside of the expected range. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;./mission/devices/IMTQHandler.h
|
11301;0x2c25;ERROR_STATE;HIGH;Reaction wheel signals an error state;mission/devices/RwHandler.h
|
||||||
11207;SELF_TEST_COIL_CURRENT_FAILURE;LOW;Get self test result returns failure indicating that the coil current was outside of the expected range P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;./mission/devices/IMTQHandler.h
|
11401;0x2c89;BOOTING_FIRMWARE_FAILED;LOW;Failed to boot firmware;linux/devices/startracker/StarTrackerHandler.h
|
||||||
11208;INVALID_ERROR_BYTE;LOW;Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC.;./mission/devices/IMTQHandler.h
|
11402;0x2c8a;BOOTING_BOOTLOADER_FAILED;LOW;Failed to boot star tracker into bootloader mode;linux/devices/startracker/StarTrackerHandler.h
|
||||||
11301;ERROR_STATE;HIGH;Reaction wheel signals an error state;./mission/devices/RwHandler.h
|
11501;0x2ced;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;bsp_q7s/devices/PlocSupervisorHandler.h
|
||||||
11401;BOOTING_FIRMWARE_FAILED;LOW;Failed to boot firmware;./linux/devices/startracker/StarTrackerHandler.h
|
11502;0x2cee;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;bsp_q7s/devices/PlocSupervisorHandler.h
|
||||||
11402;BOOTING_BOOTLOADER_FAILED;LOW;Failed to boot star tracker into bootloader mode;./linux/devices/startracker/StarTrackerHandler.h
|
11503;0x2cef;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report;bsp_q7s/devices/PlocSupervisorHandler.h
|
||||||
11501;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;./bsp_q7s/devices/PlocSupervisorHandler.h
|
11504;0x2cf0;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;bsp_q7s/devices/PlocSupervisorHandler.h
|
||||||
11502;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;./bsp_q7s/devices/PlocSupervisorHandler.h
|
11600;0x2d50;ALLOC_FAILURE;MEDIUM;;bsp_q7s/core/CoreController.h
|
||||||
11503;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report;./bsp_q7s/devices/PlocSupervisorHandler.h
|
11601;0x2d51;REBOOT_SW;MEDIUM; Software reboot occured. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
||||||
11504;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;./bsp_q7s/devices/PlocSupervisorHandler.h
|
11603;0x2d53;REBOOT_HW;MEDIUM;;bsp_q7s/core/CoreController.h
|
||||||
11600;SANITIZATION_FAILED;LOW;;./bsp_q7s/memory/SdCardManager.h
|
11700;0x2db4;UPDATE_FILE_NOT_EXISTS;LOW;;bsp_q7s/devices/PlocUpdater.h
|
||||||
11601;MOUNTED_SD_CARD;INFO;;./bsp_q7s/memory/SdCardManager.h
|
11701;0x2db5;ACTION_COMMANDING_FAILED;LOW;Failed to send command to supervisor handler P1: Return value of CommandActionHelper::commandAction P2: Action ID of command to send;bsp_q7s/devices/PlocUpdater.h
|
||||||
11603;REBOOT_HW;MEDIUM;;./bsp_q7s/core/CoreController.h
|
11702;0x2db6;UPDATE_AVAILABLE_FAILED;LOW;Supervisor handler replied action message indicating a command execution failure of the update available command;bsp_q7s/devices/PlocUpdater.h
|
||||||
11700;UPDATE_FILE_NOT_EXISTS;LOW;;./bsp_q7s/devices/PlocUpdater.h
|
11703;0x2db7;UPDATE_TRANSFER_FAILED;LOW;Supervisor handler failed to transfer an update space packet. P1: Parameter holds the number of update packets already sent (inclusive the failed packet);bsp_q7s/devices/PlocUpdater.h
|
||||||
11701;ACTION_COMMANDING_FAILED;LOW;Failed to send command to supervisor handler P1: Return value of CommandActionHelper::commandAction P2: Action ID of command to send;./bsp_q7s/devices/PlocUpdater.h
|
11704;0x2db8;UPDATE_VERIFY_FAILED;LOW;Supervisor failed to execute the update verify command.;bsp_q7s/devices/PlocUpdater.h
|
||||||
11702;UPDATE_AVAILABLE_FAILED;LOW;Supervisor handler replied action message indicating a command execution failure of the update available command;./bsp_q7s/devices/PlocUpdater.h
|
11705;0x2db9;UPDATE_FINISHED;INFO;MPSoC update successful completed;bsp_q7s/devices/PlocUpdater.h
|
||||||
11703;UPDATE_TRANSFER_FAILED;LOW;Supervisor handler failed to transfer an update space packet. P1: Parameter holds the number of update packets already sent (inclusive the failed packet);./bsp_q7s/devices/PlocUpdater.h
|
11800;0x2e18;SEND_MRAM_DUMP_FAILED;LOW;Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command;bsp_q7s/devices/PlocMemoryDumper.h
|
||||||
11704;UPDATE_VERIFY_FAILED;LOW;Supervisor failed to execute the update verify command.;./bsp_q7s/devices/PlocUpdater.h
|
11801;0x2e19;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;bsp_q7s/devices/PlocMemoryDumper.h
|
||||||
11705;UPDATE_FINISHED;INFO;MPSoC update successful completed;./bsp_q7s/devices/PlocUpdater.h
|
11802;0x2e1a;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;bsp_q7s/devices/PlocMemoryDumper.h
|
||||||
11800;SEND_MRAM_DUMP_FAILED;LOW;Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command;./bsp_q7s/devices/PlocMemoryDumper.h
|
11901;0x2e7d;INVALID_TC_FRAME;HIGH;;linux/obc/PdecHandler.h
|
||||||
11801;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;./bsp_q7s/devices/PlocMemoryDumper.h
|
11902;0x2e7e;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;linux/obc/PdecHandler.h
|
||||||
11802;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;./bsp_q7s/devices/PlocMemoryDumper.h
|
11903;0x2e7f;CARRIER_LOCK;INFO;Carrier lock detected;linux/obc/PdecHandler.h
|
||||||
11901;INVALID_TC_FRAME;HIGH;;./linux/obc/PdecHandler.h
|
11904;0x2e80;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);linux/obc/PdecHandler.h
|
||||||
11902;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;./linux/obc/PdecHandler.h
|
12000;0x2ee0;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux/devices/startracker/StrHelper.h
|
||||||
11903;CARRIER_LOCK;INFO;Carrier lock detected;./linux/obc/PdecHandler.h
|
12001;0x2ee1;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux/devices/startracker/StrHelper.h
|
||||||
11904;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);./linux/obc/PdecHandler.h
|
12002;0x2ee2;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux/devices/startracker/StrHelper.h
|
||||||
12000;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;./linux/devices/startracker/StrHelper.h
|
12003;0x2ee3;IMAGE_DOWNLOAD_SUCCESSFUL;LOW;Image download was successful;linux/devices/startracker/StrHelper.h
|
||||||
12001;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;./linux/devices/startracker/StrHelper.h
|
12004;0x2ee4;FLASH_WRITE_SUCCESSFUL;LOW;Finished flash write procedure successfully;linux/devices/startracker/StrHelper.h
|
||||||
12002;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;./linux/devices/startracker/StrHelper.h
|
12005;0x2ee5;FLASH_READ_SUCCESSFUL;LOW;Finished flash read procedure successfully;linux/devices/startracker/StrHelper.h
|
||||||
12003;IMAGE_DOWNLOAD_SUCCESSFUL;LOW;Image download was successful;./linux/devices/startracker/StrHelper.h
|
12006;0x2ee6;FLASH_READ_FAILED;LOW;Flash read procedure failed;linux/devices/startracker/StrHelper.h
|
||||||
12004;FLASH_WRITE_SUCCESSFUL;LOW;Finished flash write procedure successfully;./linux/devices/startracker/StrHelper.h
|
12007;0x2ee7;FIRMWARE_UPDATE_SUCCESSFUL;LOW;Firmware update was successful;linux/devices/startracker/StrHelper.h
|
||||||
12005;FLASH_READ_SUCCESSFUL;LOW;Finished flash read procedure successfully;./linux/devices/startracker/StrHelper.h
|
12008;0x2ee8;FIRMWARE_UPDATE_FAILED;LOW;Firmware update failed;linux/devices/startracker/StrHelper.h
|
||||||
12006;FLASH_READ_FAILED;LOW;Flash read procedure failed;./linux/devices/startracker/StrHelper.h
|
12009;0x2ee9;STR_HELPER_READING_REPLY_FAILED;LOW;Failed to read communication interface reply data P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed;linux/devices/startracker/StrHelper.h
|
||||||
12007;FIRMWARE_UPDATE_SUCCESSFUL;LOW;Firmware update was successful;./linux/devices/startracker/StrHelper.h
|
12010;0x2eea;STR_HELPER_COM_ERROR;LOW;Unexpected stop of decoding sequence P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed;linux/devices/startracker/StrHelper.h
|
||||||
12008;FIRMWARE_UPDATE_FAILED;LOW;Firmware update failed;./linux/devices/startracker/StrHelper.h
|
12011;0x2eeb;STR_HELPER_NO_REPLY;LOW;Star tracker did not send replies (maybe device is powered off) P1: Position of upload or download packet for which no reply was sent;linux/devices/startracker/StrHelper.h
|
||||||
12009;STR_HELPER_READING_REPLY_FAILED;LOW;Failed to read communication interface reply data P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed;./linux/devices/startracker/StrHelper.h
|
12012;0x2eec;STR_HELPER_DEC_ERROR;LOW;Error during decoding of received reply occurred P1: Return value of decoding function P2: Position of upload/download packet, or address of flash write/read request;linux/devices/startracker/StrHelper.h
|
||||||
12010;STR_HELPER_COM_ERROR;LOW;Unexpected stop of decoding sequence P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed;./linux/devices/startracker/StrHelper.h
|
12013;0x2eed;POSITION_MISMATCH;LOW;Position mismatch P1: The expected position and thus the position for which the image upload/download failed;linux/devices/startracker/StrHelper.h
|
||||||
12011;STR_HELPER_NO_REPLY;LOW;Star tracker did not send replies (maybe device is powered off) P1: Position of upload or download packet for which no reply was sent;./linux/devices/startracker/StrHelper.h
|
12014;0x2eee;STR_HELPER_FILE_NOT_EXISTS;LOW;Specified file does not exist P1: Internal state of str helper;linux/devices/startracker/StrHelper.h
|
||||||
12012;STR_HELPER_DEC_ERROR;LOW;Error during decoding of received reply occurred P1: Return value of decoding function P2: Position of upload/download packet, or address of flash write/read request;./linux/devices/startracker/StrHelper.h
|
12015;0x2eef;STR_HELPER_SENDING_PACKET_FAILED;LOW;;linux/devices/startracker/StrHelper.h
|
||||||
12013;POSITION_MISMATCH;LOW;Position mismatch P1: The expected position and thus the position for which the image upload/download failed;./linux/devices/startracker/StrHelper.h
|
12016;0x2ef0;STR_HELPER_REQUESTING_MSG_FAILED;LOW;;linux/devices/startracker/StrHelper.h
|
||||||
12014;STR_HELPER_FILE_NOT_EXISTS;LOW;Specified file does not exist P1: Internal state of str helper;./linux/devices/startracker/StrHelper.h
|
|
||||||
12015;STR_HELPER_SENDING_PACKET_FAILED;LOW;;./linux/devices/startracker/StrHelper.h
|
|
||||||
12016;STR_HELPER_REQUESTING_MSG_FAILED;LOW;;./linux/devices/startracker/StrHelper.h
|
|
||||||
|
|
@ -107,7 +107,6 @@
|
|||||||
0x5400CAFE;DUMMY_INTERFACE
|
0x5400CAFE;DUMMY_INTERFACE
|
||||||
0x54123456;LIBGPIOD_TEST
|
0x54123456;LIBGPIOD_TEST
|
||||||
0x54694269;TEST_TASK
|
0x54694269;TEST_TASK
|
||||||
0x73000001;ACS_BOARD_ASS
|
|
||||||
0x73000100;TM_FUNNEL
|
0x73000100;TM_FUNNEL
|
||||||
0x73500000;CCSDS_IP_CORE_BRIDGE
|
0x73500000;CCSDS_IP_CORE_BRIDGE
|
||||||
0xFFFFFFFF;NO_OBJECT
|
0xFFFFFFFF;NO_OBJECT
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,7 @@ from pathlib import Path
|
|||||||
def determine_obsw_root_path() -> str:
|
def determine_obsw_root_path() -> str:
|
||||||
for _ in range(5):
|
for _ in range(5):
|
||||||
if os.path.exists("CMakeLists.txt"):
|
if os.path.exists("CMakeLists.txt"):
|
||||||
return os.curdir
|
return os.path.abspath(os.curdir)
|
||||||
else:
|
else:
|
||||||
os.chdir("..")
|
os.chdir("..")
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ BSP_DIR_NAME = BSP_SELECT.value
|
|||||||
|
|
||||||
# Store this file in the root of the generators folder
|
# Store this file in the root of the generators folder
|
||||||
CSV_FILENAME = f"{ROOT_DIR}/{BSP_SELECT.value}_events.csv"
|
CSV_FILENAME = f"{ROOT_DIR}/{BSP_SELECT.value}_events.csv"
|
||||||
|
CSV_COPY_DEST = f"{OBSW_ROOT_DIR}/tmtc/config/events.csv"
|
||||||
|
|
||||||
if BSP_SELECT == BspType.BSP_Q7S or BSP_SELECT == BspType.BSP_LINUX_BOARD:
|
if BSP_SELECT == BspType.BSP_Q7S or BSP_SELECT == BspType.BSP_LINUX_BOARD:
|
||||||
FSFW_CONFIG_ROOT = f"{OBSW_ROOT_DIR}/linux/fsfwconfig"
|
FSFW_CONFIG_ROOT = f"{OBSW_ROOT_DIR}/linux/fsfwconfig"
|
||||||
@ -81,6 +82,8 @@ def parse_events(
|
|||||||
handle_csv_export(
|
handle_csv_export(
|
||||||
file_name=CSV_FILENAME, event_list=event_list, file_separator=FILE_SEPARATOR
|
file_name=CSV_FILENAME, event_list=event_list, file_separator=FILE_SEPARATOR
|
||||||
)
|
)
|
||||||
|
copy_file(filename=CSV_FILENAME, destination=CSV_COPY_DEST, delete_existing_file=True)
|
||||||
|
|
||||||
if generate_cpp:
|
if generate_cpp:
|
||||||
handle_cpp_export(
|
handle_cpp_export(
|
||||||
event_list=event_list,
|
event_list=event_list,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 144 translations.
|
* @brief Auto-generated event translation file. Contains 141 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2022-03-07 11:27:09
|
* Generated on: 2022-03-04 15:13:02
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -84,9 +84,6 @@ const char *CLOCK_SET_STRING = "CLOCK_SET";
|
|||||||
const char *CLOCK_SET_FAILURE_STRING = "CLOCK_SET_FAILURE";
|
const char *CLOCK_SET_FAILURE_STRING = "CLOCK_SET_FAILURE";
|
||||||
const char *TEST_STRING = "TEST";
|
const char *TEST_STRING = "TEST";
|
||||||
const char *CHANGE_OF_SETUP_PARAMETER_STRING = "CHANGE_OF_SETUP_PARAMETER";
|
const char *CHANGE_OF_SETUP_PARAMETER_STRING = "CHANGE_OF_SETUP_PARAMETER";
|
||||||
const char *SWITCH_CMD_SENT_STRING = "SWITCH_CMD_SENT";
|
|
||||||
const char *SWITCH_HAS_CHANGED_STRING = "SWITCH_HAS_CHANGED";
|
|
||||||
const char *SWITCHING_Q7S_DENIED_STRING = "SWITCHING_Q7S_DENIED";
|
|
||||||
const char *GPIO_PULL_HIGH_FAILED_STRING = "GPIO_PULL_HIGH_FAILED";
|
const char *GPIO_PULL_HIGH_FAILED_STRING = "GPIO_PULL_HIGH_FAILED";
|
||||||
const char *GPIO_PULL_LOW_FAILED_STRING = "GPIO_PULL_LOW_FAILED";
|
const char *GPIO_PULL_LOW_FAILED_STRING = "GPIO_PULL_LOW_FAILED";
|
||||||
const char *SWITCH_ALREADY_ON_STRING = "SWITCH_ALREADY_ON";
|
const char *SWITCH_ALREADY_ON_STRING = "SWITCH_ALREADY_ON";
|
||||||
@ -116,8 +113,8 @@ const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_
|
|||||||
const char *SUPV_ACK_FAILURE_STRING = "SUPV_ACK_FAILURE";
|
const char *SUPV_ACK_FAILURE_STRING = "SUPV_ACK_FAILURE";
|
||||||
const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE";
|
const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE";
|
||||||
const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT";
|
const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT";
|
||||||
const char *SANITIZATION_FAILED_STRING = "SANITIZATION_FAILED";
|
const char *ALLOC_FAILURE_STRING = "ALLOC_FAILURE";
|
||||||
const char *MOUNTED_SD_CARD_STRING = "MOUNTED_SD_CARD";
|
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
||||||
const char *REBOOT_HW_STRING = "REBOOT_HW";
|
const char *REBOOT_HW_STRING = "REBOOT_HW";
|
||||||
const char *UPDATE_FILE_NOT_EXISTS_STRING = "UPDATE_FILE_NOT_EXISTS";
|
const char *UPDATE_FILE_NOT_EXISTS_STRING = "UPDATE_FILE_NOT_EXISTS";
|
||||||
const char *ACTION_COMMANDING_FAILED_STRING = "ACTION_COMMANDING_FAILED";
|
const char *ACTION_COMMANDING_FAILED_STRING = "ACTION_COMMANDING_FAILED";
|
||||||
@ -151,7 +148,7 @@ const char *STR_HELPER_SENDING_PACKET_FAILED_STRING = "STR_HELPER_SENDING_PACKET
|
|||||||
const char *STR_HELPER_REQUESTING_MSG_FAILED_STRING = "STR_HELPER_REQUESTING_MSG_FAILED";
|
const char *STR_HELPER_REQUESTING_MSG_FAILED_STRING = "STR_HELPER_REQUESTING_MSG_FAILED";
|
||||||
|
|
||||||
const char *translateEvents(Event event) {
|
const char *translateEvents(Event event) {
|
||||||
switch((event & 0xFFFF)) {
|
switch ((event & 0xFFFF)) {
|
||||||
case (2200):
|
case (2200):
|
||||||
return STORE_SEND_WRITE_FAILED_STRING;
|
return STORE_SEND_WRITE_FAILED_STRING;
|
||||||
case (2201):
|
case (2201):
|
||||||
@ -310,12 +307,6 @@ const char *translateEvents(Event event) {
|
|||||||
return TEST_STRING;
|
return TEST_STRING;
|
||||||
case (10600):
|
case (10600):
|
||||||
return CHANGE_OF_SETUP_PARAMETER_STRING;
|
return CHANGE_OF_SETUP_PARAMETER_STRING;
|
||||||
case (10800):
|
|
||||||
return SWITCH_CMD_SENT_STRING;
|
|
||||||
case (10801):
|
|
||||||
return SWITCH_HAS_CHANGED_STRING;
|
|
||||||
case (10802):
|
|
||||||
return SWITCHING_Q7S_DENIED_STRING;
|
|
||||||
case (10900):
|
case (10900):
|
||||||
return GPIO_PULL_HIGH_FAILED_STRING;
|
return GPIO_PULL_HIGH_FAILED_STRING;
|
||||||
case (10901):
|
case (10901):
|
||||||
@ -375,9 +366,9 @@ const char *translateEvents(Event event) {
|
|||||||
case (11504):
|
case (11504):
|
||||||
return SUPV_CRC_FAILURE_EVENT_STRING;
|
return SUPV_CRC_FAILURE_EVENT_STRING;
|
||||||
case (11600):
|
case (11600):
|
||||||
return SANITIZATION_FAILED_STRING;
|
return ALLOC_FAILURE_STRING;
|
||||||
case (11601):
|
case (11601):
|
||||||
return MOUNTED_SD_CARD_STRING;
|
return REBOOT_SW_STRING;
|
||||||
case (11603):
|
case (11603):
|
||||||
return REBOOT_HW_STRING;
|
return REBOOT_HW_STRING;
|
||||||
case (11700):
|
case (11700):
|
||||||
|
@ -42,6 +42,7 @@ CPP_COPY_DESTINATION = f"{FSFW_CONFIG_ROOT}/objects/"
|
|||||||
CPP_FILENAME = f"{os.path.dirname(os.path.realpath(__file__))}//translateObjects.cpp"
|
CPP_FILENAME = f"{os.path.dirname(os.path.realpath(__file__))}//translateObjects.cpp"
|
||||||
CPP_H_FILENAME = f"{os.path.dirname(os.path.realpath(__file__))}//translateObjects.h"
|
CPP_H_FILENAME = f"{os.path.dirname(os.path.realpath(__file__))}//translateObjects.h"
|
||||||
CSV_OBJECT_FILENAME = f"{ROOT_DIR}/{BSP_SELECT.value}_objects.csv"
|
CSV_OBJECT_FILENAME = f"{ROOT_DIR}/{BSP_SELECT.value}_objects.csv"
|
||||||
|
CSV_COPY_DEST = f"{OBSW_ROOT_DIR}/tmtc/config/objects.csv"
|
||||||
FILE_SEPARATOR = ";"
|
FILE_SEPARATOR = ";"
|
||||||
|
|
||||||
|
|
||||||
@ -114,3 +115,8 @@ def handle_file_export(list_items):
|
|||||||
object_list=list_items,
|
object_list=list_items,
|
||||||
file_separator=FILE_SEPARATOR,
|
file_separator=FILE_SEPARATOR,
|
||||||
)
|
)
|
||||||
|
copy_file(
|
||||||
|
filename=CSV_OBJECT_FILENAME,
|
||||||
|
destination=CSV_COPY_DEST,
|
||||||
|
delete_existing_file=True
|
||||||
|
)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 113 translations.
|
* Contains 112 translations.
|
||||||
* Generated on: 2022-03-07 11:07:18
|
* Generated on: 2022-03-04 15:13:13
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
@ -115,7 +115,6 @@ const char *DUMMY_HANDLER_STRING = "DUMMY_HANDLER";
|
|||||||
const char *DUMMY_INTERFACE_STRING = "DUMMY_INTERFACE";
|
const char *DUMMY_INTERFACE_STRING = "DUMMY_INTERFACE";
|
||||||
const char *LIBGPIOD_TEST_STRING = "LIBGPIOD_TEST";
|
const char *LIBGPIOD_TEST_STRING = "LIBGPIOD_TEST";
|
||||||
const char *TEST_TASK_STRING = "TEST_TASK";
|
const char *TEST_TASK_STRING = "TEST_TASK";
|
||||||
const char *ACS_BOARD_ASS_STRING = "ACS_BOARD_ASS";
|
|
||||||
const char *TM_FUNNEL_STRING = "TM_FUNNEL";
|
const char *TM_FUNNEL_STRING = "TM_FUNNEL";
|
||||||
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";
|
||||||
@ -340,8 +339,6 @@ const char *translateObject(object_id_t object) {
|
|||||||
return LIBGPIOD_TEST_STRING;
|
return LIBGPIOD_TEST_STRING;
|
||||||
case 0x54694269:
|
case 0x54694269:
|
||||||
return TEST_TASK_STRING;
|
return TEST_TASK_STRING;
|
||||||
case 0x73000001:
|
|
||||||
return ACS_BOARD_ASS_STRING;
|
|
||||||
case 0x73000100:
|
case 0x73000100:
|
||||||
return TM_FUNNEL_STRING;
|
return TM_FUNNEL_STRING;
|
||||||
case 0x73500000:
|
case 0x73500000:
|
||||||
|
@ -5,11 +5,13 @@
|
|||||||
:brief: Part of the MOD export tools for the SOURCE project by KSat.
|
:brief: Part of the MOD export tools for the SOURCE project by KSat.
|
||||||
TODO: Integrate into Parser Structure instead of calling this file (no cpp file generated yet)
|
TODO: Integrate into Parser Structure instead of calling this file (no cpp file generated yet)
|
||||||
:details:
|
:details:
|
||||||
Returnvalue exporter.
|
Return Value exporter.
|
||||||
To use MySQLdb, run pip install mysqlclient or install in IDE. On Windows, Build Tools installation might be necessary.
|
To use MySQLdb, run pip install mysqlclient or install in IDE. On Windows, Build Tools
|
||||||
|
installation might be necessary.
|
||||||
:data: 21.11.2019
|
:data: 21.11.2019
|
||||||
"""
|
"""
|
||||||
from fsfwgen.core import get_console_logger
|
from fsfwgen.core import get_console_logger
|
||||||
|
from fsfwgen.utility.file_management import copy_file
|
||||||
from fsfwgen.parserbase.file_list_parser import FileListParser
|
from fsfwgen.parserbase.file_list_parser import FileListParser
|
||||||
from fsfwgen.returnvalues.returnvalues_parser import InterfaceParser, ReturnValueParser
|
from fsfwgen.returnvalues.returnvalues_parser import InterfaceParser, ReturnValueParser
|
||||||
from fsfwgen.utility.sql_writer import SqlWriter
|
from fsfwgen.utility.sql_writer import SqlWriter
|
||||||
@ -19,7 +21,7 @@ from definitions import BspType, DATABASE_NAME, ROOT_DIR, OBSW_ROOT_DIR
|
|||||||
|
|
||||||
LOGGER = get_console_logger()
|
LOGGER = get_console_logger()
|
||||||
EXPORT_TO_FILE = True
|
EXPORT_TO_FILE = True
|
||||||
MOVE_CSV_FILE = True
|
COPY_CSV_FILE = True
|
||||||
EXPORT_TO_SQL = True
|
EXPORT_TO_SQL = True
|
||||||
PRINT_TABLES = True
|
PRINT_TABLES = True
|
||||||
|
|
||||||
@ -30,6 +32,7 @@ MAX_STRING_LENGTH = 32
|
|||||||
BSP_SELECT = BspType.BSP_Q7S
|
BSP_SELECT = BspType.BSP_Q7S
|
||||||
BSP_DIR_NAME = BSP_SELECT.value
|
BSP_DIR_NAME = BSP_SELECT.value
|
||||||
CSV_RETVAL_FILENAME = f"{ROOT_DIR}/{BSP_SELECT.value}_returnvalues.csv"
|
CSV_RETVAL_FILENAME = f"{ROOT_DIR}/{BSP_SELECT.value}_returnvalues.csv"
|
||||||
|
CSV_COPY_DEST = f"{OBSW_ROOT_DIR}/tmtc/config/returnvalues.csv"
|
||||||
ADD_LINUX_FOLDER = False
|
ADD_LINUX_FOLDER = False
|
||||||
|
|
||||||
if BSP_SELECT == BspType.BSP_Q7S or BSP_SELECT == BspType.BSP_LINUX_BOARD:
|
if BSP_SELECT == BspType.BSP_Q7S or BSP_SELECT == BspType.BSP_LINUX_BOARD:
|
||||||
@ -80,8 +83,12 @@ def parse_returnvalues():
|
|||||||
ReturnValueParser.export_to_file(
|
ReturnValueParser.export_to_file(
|
||||||
CSV_RETVAL_FILENAME, returnvalue_table, FILE_SEPARATOR
|
CSV_RETVAL_FILENAME, returnvalue_table, FILE_SEPARATOR
|
||||||
)
|
)
|
||||||
# if MOVE_CSV_FILE:
|
if COPY_CSV_FILE:
|
||||||
# move_file(file_name=CSV_RETVAL_FILENAME, destination=CSV_MOVE_DESTINATION)
|
copy_file(
|
||||||
|
filename=CSV_RETVAL_FILENAME,
|
||||||
|
destination=CSV_COPY_DEST,
|
||||||
|
delete_existing_file=True
|
||||||
|
)
|
||||||
if EXPORT_TO_SQL:
|
if EXPORT_TO_SQL:
|
||||||
LOGGER.info("ReturnvalueParser: Exporting to SQL")
|
LOGGER.info("ReturnvalueParser: Exporting to SQL")
|
||||||
sql_retval_exporter(
|
sql_retval_exporter(
|
||||||
@ -98,6 +105,7 @@ def generate_returnvalue_table():
|
|||||||
header_parser = FileListParser(RETURNVALUE_SOURCES)
|
header_parser = FileListParser(RETURNVALUE_SOURCES)
|
||||||
header_list = header_parser.parse_header_files(True, "Parsing header file list: ")
|
header_list = header_parser.parse_header_files(True, "Parsing header file list: ")
|
||||||
returnvalue_parser = ReturnValueParser(interfaces, header_list, PRINT_TABLES)
|
returnvalue_parser = ReturnValueParser(interfaces, header_list, PRINT_TABLES)
|
||||||
|
returnvalue_parser.obsw_root_path = OBSW_ROOT_DIR
|
||||||
returnvalue_parser.set_moving_window_mode(moving_window_size=7)
|
returnvalue_parser.set_moving_window_mode(moving_window_size=7)
|
||||||
returnvalue_table = returnvalue_parser.parse_files(True)
|
returnvalue_table = returnvalue_parser.parse_files(True)
|
||||||
LOGGER.info(f"ReturnvalueParser: Found {len(returnvalue_table)} returnvalues")
|
LOGGER.info(f"ReturnvalueParser: Found {len(returnvalue_table)} returnvalues")
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 144 translations.
|
* @brief Auto-generated event translation file. Contains 141 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2022-03-07 11:27:09
|
* Generated on: 2022-03-04 15:13:02
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -84,9 +84,6 @@ const char *CLOCK_SET_STRING = "CLOCK_SET";
|
|||||||
const char *CLOCK_SET_FAILURE_STRING = "CLOCK_SET_FAILURE";
|
const char *CLOCK_SET_FAILURE_STRING = "CLOCK_SET_FAILURE";
|
||||||
const char *TEST_STRING = "TEST";
|
const char *TEST_STRING = "TEST";
|
||||||
const char *CHANGE_OF_SETUP_PARAMETER_STRING = "CHANGE_OF_SETUP_PARAMETER";
|
const char *CHANGE_OF_SETUP_PARAMETER_STRING = "CHANGE_OF_SETUP_PARAMETER";
|
||||||
const char *SWITCH_CMD_SENT_STRING = "SWITCH_CMD_SENT";
|
|
||||||
const char *SWITCH_HAS_CHANGED_STRING = "SWITCH_HAS_CHANGED";
|
|
||||||
const char *SWITCHING_Q7S_DENIED_STRING = "SWITCHING_Q7S_DENIED";
|
|
||||||
const char *GPIO_PULL_HIGH_FAILED_STRING = "GPIO_PULL_HIGH_FAILED";
|
const char *GPIO_PULL_HIGH_FAILED_STRING = "GPIO_PULL_HIGH_FAILED";
|
||||||
const char *GPIO_PULL_LOW_FAILED_STRING = "GPIO_PULL_LOW_FAILED";
|
const char *GPIO_PULL_LOW_FAILED_STRING = "GPIO_PULL_LOW_FAILED";
|
||||||
const char *SWITCH_ALREADY_ON_STRING = "SWITCH_ALREADY_ON";
|
const char *SWITCH_ALREADY_ON_STRING = "SWITCH_ALREADY_ON";
|
||||||
@ -116,8 +113,8 @@ const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_
|
|||||||
const char *SUPV_ACK_FAILURE_STRING = "SUPV_ACK_FAILURE";
|
const char *SUPV_ACK_FAILURE_STRING = "SUPV_ACK_FAILURE";
|
||||||
const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE";
|
const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE";
|
||||||
const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT";
|
const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT";
|
||||||
const char *SANITIZATION_FAILED_STRING = "SANITIZATION_FAILED";
|
const char *ALLOC_FAILURE_STRING = "ALLOC_FAILURE";
|
||||||
const char *MOUNTED_SD_CARD_STRING = "MOUNTED_SD_CARD";
|
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
||||||
const char *REBOOT_HW_STRING = "REBOOT_HW";
|
const char *REBOOT_HW_STRING = "REBOOT_HW";
|
||||||
const char *UPDATE_FILE_NOT_EXISTS_STRING = "UPDATE_FILE_NOT_EXISTS";
|
const char *UPDATE_FILE_NOT_EXISTS_STRING = "UPDATE_FILE_NOT_EXISTS";
|
||||||
const char *ACTION_COMMANDING_FAILED_STRING = "ACTION_COMMANDING_FAILED";
|
const char *ACTION_COMMANDING_FAILED_STRING = "ACTION_COMMANDING_FAILED";
|
||||||
@ -151,7 +148,7 @@ const char *STR_HELPER_SENDING_PACKET_FAILED_STRING = "STR_HELPER_SENDING_PACKET
|
|||||||
const char *STR_HELPER_REQUESTING_MSG_FAILED_STRING = "STR_HELPER_REQUESTING_MSG_FAILED";
|
const char *STR_HELPER_REQUESTING_MSG_FAILED_STRING = "STR_HELPER_REQUESTING_MSG_FAILED";
|
||||||
|
|
||||||
const char *translateEvents(Event event) {
|
const char *translateEvents(Event event) {
|
||||||
switch((event & 0xFFFF)) {
|
switch ((event & 0xFFFF)) {
|
||||||
case (2200):
|
case (2200):
|
||||||
return STORE_SEND_WRITE_FAILED_STRING;
|
return STORE_SEND_WRITE_FAILED_STRING;
|
||||||
case (2201):
|
case (2201):
|
||||||
@ -310,12 +307,6 @@ const char *translateEvents(Event event) {
|
|||||||
return TEST_STRING;
|
return TEST_STRING;
|
||||||
case (10600):
|
case (10600):
|
||||||
return CHANGE_OF_SETUP_PARAMETER_STRING;
|
return CHANGE_OF_SETUP_PARAMETER_STRING;
|
||||||
case (10800):
|
|
||||||
return SWITCH_CMD_SENT_STRING;
|
|
||||||
case (10801):
|
|
||||||
return SWITCH_HAS_CHANGED_STRING;
|
|
||||||
case (10802):
|
|
||||||
return SWITCHING_Q7S_DENIED_STRING;
|
|
||||||
case (10900):
|
case (10900):
|
||||||
return GPIO_PULL_HIGH_FAILED_STRING;
|
return GPIO_PULL_HIGH_FAILED_STRING;
|
||||||
case (10901):
|
case (10901):
|
||||||
@ -375,9 +366,9 @@ const char *translateEvents(Event event) {
|
|||||||
case (11504):
|
case (11504):
|
||||||
return SUPV_CRC_FAILURE_EVENT_STRING;
|
return SUPV_CRC_FAILURE_EVENT_STRING;
|
||||||
case (11600):
|
case (11600):
|
||||||
return SANITIZATION_FAILED_STRING;
|
return ALLOC_FAILURE_STRING;
|
||||||
case (11601):
|
case (11601):
|
||||||
return MOUNTED_SD_CARD_STRING;
|
return REBOOT_SW_STRING;
|
||||||
case (11603):
|
case (11603):
|
||||||
return REBOOT_HW_STRING;
|
return REBOOT_HW_STRING;
|
||||||
case (11700):
|
case (11700):
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 113 translations.
|
* Contains 112 translations.
|
||||||
* Generated on: 2022-03-07 11:07:18
|
* Generated on: 2022-03-04 15:13:13
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
@ -115,7 +115,6 @@ const char *DUMMY_HANDLER_STRING = "DUMMY_HANDLER";
|
|||||||
const char *DUMMY_INTERFACE_STRING = "DUMMY_INTERFACE";
|
const char *DUMMY_INTERFACE_STRING = "DUMMY_INTERFACE";
|
||||||
const char *LIBGPIOD_TEST_STRING = "LIBGPIOD_TEST";
|
const char *LIBGPIOD_TEST_STRING = "LIBGPIOD_TEST";
|
||||||
const char *TEST_TASK_STRING = "TEST_TASK";
|
const char *TEST_TASK_STRING = "TEST_TASK";
|
||||||
const char *ACS_BOARD_ASS_STRING = "ACS_BOARD_ASS";
|
|
||||||
const char *TM_FUNNEL_STRING = "TM_FUNNEL";
|
const char *TM_FUNNEL_STRING = "TM_FUNNEL";
|
||||||
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";
|
||||||
@ -340,8 +339,6 @@ const char *translateObject(object_id_t object) {
|
|||||||
return LIBGPIOD_TEST_STRING;
|
return LIBGPIOD_TEST_STRING;
|
||||||
case 0x54694269:
|
case 0x54694269:
|
||||||
return TEST_TASK_STRING;
|
return TEST_TASK_STRING;
|
||||||
case 0x73000001:
|
|
||||||
return ACS_BOARD_ASS_STRING;
|
|
||||||
case 0x73000100:
|
case 0x73000100:
|
||||||
return TM_FUNNEL_STRING;
|
return TM_FUNNEL_STRING;
|
||||||
case 0x73500000:
|
case 0x73500000:
|
||||||
|
@ -17,5 +17,6 @@ target_sources(${LIB_EIVE_MISSION} PRIVATE
|
|||||||
RwHandler.cpp
|
RwHandler.cpp
|
||||||
max1227.cpp
|
max1227.cpp
|
||||||
SusHandler.cpp
|
SusHandler.cpp
|
||||||
|
PayloadPcduHandler.cpp
|
||||||
SolarArrayDeploymentHandler.cpp
|
SolarArrayDeploymentHandler.cpp
|
||||||
)
|
)
|
||||||
|
808
mission/devices/PayloadPcduHandler.cpp
Normal file
808
mission/devices/PayloadPcduHandler.cpp
Normal file
@ -0,0 +1,808 @@
|
|||||||
|
#include "PayloadPcduHandler.h"
|
||||||
|
|
||||||
|
#include <fsfw/src/fsfw/datapool/PoolReadGuard.h>
|
||||||
|
|
||||||
|
#ifdef FSFW_OSAL_LINUX
|
||||||
|
#include <fsfw_hal/linux/UnixFileGuard.h>
|
||||||
|
#include <fsfw_hal/linux/spi/SpiComIF.h>
|
||||||
|
#include <fsfw_hal/linux/spi/SpiCookie.h>
|
||||||
|
#include <fsfw_hal/linux/utility.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "devices/gpioIds.h"
|
||||||
|
|
||||||
|
PayloadPcduHandler::PayloadPcduHandler(object_id_t objectId, object_id_t comIF, CookieIF* cookie,
|
||||||
|
GpioIF* gpioIF, SdCardMountedIF* sdcMan,
|
||||||
|
bool periodicPrintout)
|
||||||
|
: DeviceHandlerBase(objectId, comIF, cookie),
|
||||||
|
adcSet(this),
|
||||||
|
periodicPrintout(periodicPrintout),
|
||||||
|
gpioIF(gpioIF),
|
||||||
|
sdcMan(sdcMan) {}
|
||||||
|
|
||||||
|
void PayloadPcduHandler::doStartUp() {
|
||||||
|
if ((state != States::PCDU_OFF) and (state != States::ON_TRANS_SSR)) {
|
||||||
|
// Config error
|
||||||
|
sif::error << "PayloadPcduHandler::doStartUp: Invalid state" << std::endl;
|
||||||
|
}
|
||||||
|
if (state == States::PCDU_OFF) {
|
||||||
|
// Switch on relays here
|
||||||
|
gpioIF->pullHigh(gpioIds::PLPCDU_ENB_VBAT0);
|
||||||
|
gpioIF->pullHigh(gpioIds::PLPCDU_ENB_VBAT1);
|
||||||
|
state = States::ON_TRANS_SSR;
|
||||||
|
transitionOk = true;
|
||||||
|
}
|
||||||
|
if (state == States::ON_TRANS_SSR) {
|
||||||
|
// If necessary, check whether a certain amount of time has elapsed
|
||||||
|
if (transitionOk) {
|
||||||
|
transitionOk = false;
|
||||||
|
state = States::ON_TRANS_ADC_CLOSE_ZERO;
|
||||||
|
// We are now in ON mode
|
||||||
|
startTransition(MODE_NORMAL, 0);
|
||||||
|
adcCountdown.setTimeout(50);
|
||||||
|
adcCountdown.resetTimer();
|
||||||
|
adcState = AdcStates::BOOT_DELAY;
|
||||||
|
// The ADC can now be read. If the values are not close to zero, we should not allow
|
||||||
|
// transition
|
||||||
|
monMode = MonitoringMode::CLOSE_TO_ZERO;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void PayloadPcduHandler::stateMachineToNormal() {
|
||||||
|
using namespace plpcdu;
|
||||||
|
if (adcState == AdcStates::BOOT_DELAY) {
|
||||||
|
if (adcCountdown.hasTimedOut()) {
|
||||||
|
adcState = AdcStates::SEND_SETUP;
|
||||||
|
adcCmdExecuted = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (adcState == AdcStates::SEND_SETUP) {
|
||||||
|
if (adcCmdExecuted) {
|
||||||
|
adcState = AdcStates::NORMAL;
|
||||||
|
setMode(MODE_NORMAL, NORMAL_ADC_ONLY);
|
||||||
|
adcCountdown.setTimeout(100);
|
||||||
|
adcCountdown.resetTimer();
|
||||||
|
adcCmdExecuted = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (submode == plpcdu::NORMAL_ALL_ON) {
|
||||||
|
if (state == States::ON_TRANS_ADC_CLOSE_ZERO) {
|
||||||
|
if (not commandExecuted) {
|
||||||
|
float waitTime = DFT_SSR_TO_DRO_WAIT_TIME;
|
||||||
|
params.getValue(PARAM_KEY_MAP[SSR_TO_DRO_WAIT_TIME], waitTime);
|
||||||
|
countdown.setTimeout(std::round(waitTime * 1000));
|
||||||
|
countdown.resetTimer();
|
||||||
|
commandExecuted = true;
|
||||||
|
// TODO: For now, skip ADC check
|
||||||
|
transitionOk = true;
|
||||||
|
}
|
||||||
|
// ADC values are ok, 5 seconds have elapsed
|
||||||
|
if (transitionOk and countdown.hasTimedOut()) {
|
||||||
|
state = States::ON_TRANS_DRO;
|
||||||
|
// Now start monitoring for negative voltages instead
|
||||||
|
monMode = MonitoringMode::NEGATIVE;
|
||||||
|
commandExecuted = false;
|
||||||
|
transitionOk = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (state == States::ON_TRANS_DRO) {
|
||||||
|
if (not commandExecuted) {
|
||||||
|
float waitTime = DFT_DRO_TO_X8_WAIT_TIME;
|
||||||
|
params.getValue(PARAM_KEY_MAP[DRO_TO_X8_WAIT_TIME], waitTime);
|
||||||
|
countdown.setTimeout(std::round(waitTime * 1000));
|
||||||
|
countdown.resetTimer();
|
||||||
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
|
sif::info << "Enabling PL PCDU DRO module" << std::endl;
|
||||||
|
#endif
|
||||||
|
// Switch on DRO and start monitoring for negative voltages
|
||||||
|
gpioIF->pullHigh(gpioIds::PLPCDU_ENB_DRO);
|
||||||
|
adcCountdown.setTimeout(100);
|
||||||
|
adcCountdown.resetTimer();
|
||||||
|
commandExecuted = true;
|
||||||
|
}
|
||||||
|
// ADC values are ok, 5 seconds have elapsed
|
||||||
|
if (transitionOk and countdown.hasTimedOut()) {
|
||||||
|
state = States::ON_TRANS_X8;
|
||||||
|
commandExecuted = false;
|
||||||
|
transitionOk = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (state == States::ON_TRANS_X8) {
|
||||||
|
if (not commandExecuted) {
|
||||||
|
float waitTime = DFT_X8_TO_TX_WAIT_TIME;
|
||||||
|
params.getValue(PARAM_KEY_MAP[X8_TO_TX_WAIT_TIME], waitTime);
|
||||||
|
countdown.setTimeout(std::round(waitTime * 1000));
|
||||||
|
countdown.resetTimer();
|
||||||
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
|
sif::info << "Enabling PL PCDU X8 module" << std::endl;
|
||||||
|
#endif
|
||||||
|
// Switch on X8
|
||||||
|
gpioIF->pullHigh(gpioIds::PLPCDU_ENB_X8);
|
||||||
|
adcCountdown.setTimeout(100);
|
||||||
|
adcCountdown.resetTimer();
|
||||||
|
commandExecuted = true;
|
||||||
|
}
|
||||||
|
// ADC values are ok, 5 seconds have elapsed
|
||||||
|
if (transitionOk and countdown.hasTimedOut()) {
|
||||||
|
state = States::ON_TRANS_TX;
|
||||||
|
commandExecuted = false;
|
||||||
|
transitionOk = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (state == States::ON_TRANS_TX) {
|
||||||
|
if (not commandExecuted) {
|
||||||
|
float waitTime = DFT_TX_TO_MPA_WAIT_TIME;
|
||||||
|
params.getValue(PARAM_KEY_MAP[TX_TO_MPA_WAIT_TIME], waitTime);
|
||||||
|
countdown.setTimeout(std::round(waitTime * 1000));
|
||||||
|
countdown.resetTimer();
|
||||||
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
|
sif::info << "Enabling PL PCDU TX module" << std::endl;
|
||||||
|
#endif
|
||||||
|
// Switch on TX
|
||||||
|
gpioIF->pullHigh(gpioIds::PLPCDU_ENB_TX);
|
||||||
|
// Wait for 100 ms before checking ADC values
|
||||||
|
adcCountdown.setTimeout(100);
|
||||||
|
adcCountdown.resetTimer();
|
||||||
|
commandExecuted = true;
|
||||||
|
}
|
||||||
|
// ADC values are ok, 5 seconds have elapsed
|
||||||
|
if (transitionOk and countdown.hasTimedOut()) {
|
||||||
|
state = States::ON_TRANS_MPA;
|
||||||
|
commandExecuted = false;
|
||||||
|
transitionOk = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (state == States::ON_TRANS_MPA) {
|
||||||
|
if (not commandExecuted) {
|
||||||
|
float waitTime = DFT_MPA_TO_HPA_WAIT_TIME;
|
||||||
|
params.getValue(PARAM_KEY_MAP[MPA_TO_HPA_WAIT_TIME], waitTime);
|
||||||
|
countdown.setTimeout(std::round(waitTime * 1000));
|
||||||
|
countdown.resetTimer();
|
||||||
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
|
sif::info << "Enabling PL PCDU MPA module" << std::endl;
|
||||||
|
#endif
|
||||||
|
// Switch on MPA
|
||||||
|
gpioIF->pullHigh(gpioIds::PLPCDU_ENB_MPA);
|
||||||
|
// Wait for 100 ms before checking ADC values
|
||||||
|
adcCountdown.setTimeout(100);
|
||||||
|
adcCountdown.resetTimer();
|
||||||
|
commandExecuted = true;
|
||||||
|
}
|
||||||
|
// ADC values are ok, 5 seconds have elapsed
|
||||||
|
if (transitionOk and countdown.hasTimedOut()) {
|
||||||
|
state = States::ON_TRANS_HPA;
|
||||||
|
commandExecuted = false;
|
||||||
|
transitionOk = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (state == States::ON_TRANS_HPA) {
|
||||||
|
if (not commandExecuted) {
|
||||||
|
// Switch on HPA
|
||||||
|
gpioIF->pullHigh(gpioIds::PLPCDU_ENB_HPA);
|
||||||
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
|
sif::info << "Enabling PL PCDU HPA module" << std::endl;
|
||||||
|
#endif
|
||||||
|
commandExecuted = true;
|
||||||
|
}
|
||||||
|
// ADC values are ok, 5 seconds have elapsed
|
||||||
|
if (transitionOk and countdown.hasTimedOut()) {
|
||||||
|
state = States::PCDU_ON;
|
||||||
|
setMode(MODE_NORMAL, plpcdu::NORMAL_ALL_ON);
|
||||||
|
countdown.resetTimer();
|
||||||
|
commandExecuted = false;
|
||||||
|
transitionOk = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void PayloadPcduHandler::doTransition(Mode_t modeFrom, Submode_t subModeFrom) {
|
||||||
|
if (mode == _MODE_TO_NORMAL) {
|
||||||
|
stateMachineToNormal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void PayloadPcduHandler::doShutDown() { transitionBackToOff(false); }
|
||||||
|
|
||||||
|
ReturnValue_t PayloadPcduHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
|
||||||
|
switch (adcState) {
|
||||||
|
case (AdcStates::SEND_SETUP): {
|
||||||
|
*id = plpcdu::SETUP_CMD;
|
||||||
|
return buildCommandFromCommand(*id, nullptr, 0);
|
||||||
|
}
|
||||||
|
case (AdcStates::NORMAL): {
|
||||||
|
*id = plpcdu::READ_WITH_TEMP_EXT;
|
||||||
|
return buildCommandFromCommand(*id, nullptr, 0);
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NOTHING_TO_SEND;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PayloadPcduHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) {
|
||||||
|
if (adcState == AdcStates::SEND_SETUP) {
|
||||||
|
*id = plpcdu::SETUP_CMD;
|
||||||
|
return buildCommandFromCommand(*id, nullptr, 0);
|
||||||
|
}
|
||||||
|
if (mode == _MODE_TO_NORMAL) {
|
||||||
|
return buildNormalDeviceCommand(id);
|
||||||
|
}
|
||||||
|
return NOTHING_TO_SEND;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PayloadPcduHandler::fillCommandAndReplyMap() {
|
||||||
|
insertInCommandAndReplyMap(plpcdu::READ_CMD, 2, &adcSet);
|
||||||
|
insertInCommandAndReplyMap(plpcdu::READ_TEMP_EXT, 1, &adcSet);
|
||||||
|
insertInCommandAndReplyMap(plpcdu::READ_WITH_TEMP_EXT, 1, &adcSet);
|
||||||
|
insertInCommandAndReplyMap(plpcdu::SETUP_CMD, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PayloadPcduHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
|
const uint8_t* commandData,
|
||||||
|
size_t commandDataLen) {
|
||||||
|
switch (deviceCommand) {
|
||||||
|
case (plpcdu::SETUP_CMD): {
|
||||||
|
cmdBuf[0] = plpcdu::SETUP_BYTE;
|
||||||
|
rawPacket = cmdBuf.data();
|
||||||
|
rawPacketLen = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (plpcdu::READ_CMD): {
|
||||||
|
max1227::prepareExternallyClockedRead0ToN(cmdBuf.data(), plpcdu::CHANNEL_N, rawPacketLen);
|
||||||
|
rawPacket = cmdBuf.data();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (plpcdu::READ_TEMP_EXT): {
|
||||||
|
max1227::prepareExternallyClockedTemperatureRead(cmdBuf.data(), rawPacketLen);
|
||||||
|
rawPacket = cmdBuf.data();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (plpcdu::READ_WITH_TEMP_EXT): {
|
||||||
|
size_t sz = 0;
|
||||||
|
max1227::prepareExternallyClockedRead0ToN(cmdBuf.data(), plpcdu::CHANNEL_N, sz);
|
||||||
|
max1227::prepareExternallyClockedTemperatureRead(cmdBuf.data() + sz, sz);
|
||||||
|
rawPacketLen = sz;
|
||||||
|
rawPacket = cmdBuf.data();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return RETURN_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PayloadPcduHandler::scanForReply(const uint8_t* start, size_t remainingSize,
|
||||||
|
DeviceCommandId_t* foundId, size_t* foundLen) {
|
||||||
|
// SPI is full duplex
|
||||||
|
*foundId = getPendingCommand();
|
||||||
|
*foundLen = remainingSize;
|
||||||
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PayloadPcduHandler::interpretDeviceReply(DeviceCommandId_t id,
|
||||||
|
const uint8_t* packet) {
|
||||||
|
using namespace plpcdu;
|
||||||
|
switch (id) {
|
||||||
|
case (SETUP_CMD): {
|
||||||
|
if (mode == _MODE_TO_NORMAL) {
|
||||||
|
adcCmdExecuted = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (READ_TEMP_EXT): {
|
||||||
|
uint8_t tempStartIdx = TEMP_REPLY_SIZE - 2;
|
||||||
|
adcSet.tempC.value =
|
||||||
|
max1227::getTemperature(packet[tempStartIdx] << 8 | packet[tempStartIdx + 1]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (READ_CMD): {
|
||||||
|
PoolReadGuard pg(&adcSet);
|
||||||
|
if (pg.getReadResult() != HasReturnvaluesIF::RETURN_OK) {
|
||||||
|
return pg.getReadResult();
|
||||||
|
}
|
||||||
|
handleExtConvRead(packet);
|
||||||
|
checkAdcValues();
|
||||||
|
adcSet.setValidity(true, true);
|
||||||
|
handlePrintout();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (READ_WITH_TEMP_EXT): {
|
||||||
|
PoolReadGuard pg(&adcSet);
|
||||||
|
if (pg.getReadResult() != HasReturnvaluesIF::RETURN_OK) {
|
||||||
|
return pg.getReadResult();
|
||||||
|
}
|
||||||
|
handleExtConvRead(packet);
|
||||||
|
uint8_t tempStartIdx = ADC_REPLY_SIZE + TEMP_REPLY_SIZE - 2;
|
||||||
|
adcSet.tempC.value =
|
||||||
|
max1227::getTemperature(packet[tempStartIdx] << 8 | packet[tempStartIdx + 1]);
|
||||||
|
checkAdcValues();
|
||||||
|
adcSet.setValidity(true, true);
|
||||||
|
handlePrintout();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t PayloadPcduHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) {
|
||||||
|
// 20 minutes transition delay is allowed
|
||||||
|
return 20 * 60 * 60;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PayloadPcduHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||||
|
LocalDataPoolManager& poolManager) {
|
||||||
|
localDataPoolMap.emplace(plpcdu::PlPcduPoolIds::CHANNEL_VEC, &channelValues);
|
||||||
|
localDataPoolMap.emplace(plpcdu::PlPcduPoolIds::PROCESSED_VEC, &processedValues);
|
||||||
|
localDataPoolMap.emplace(plpcdu::PlPcduPoolIds::TEMP, &tempC);
|
||||||
|
poolManager.subscribeForPeriodicPacket(adcSet.getSid(), false, 0.1, true);
|
||||||
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PayloadPcduHandler::setToGoToNormalModeImmediately(bool enable) {
|
||||||
|
this->goToNormalMode = enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PayloadPcduHandler::handleExtConvRead(const uint8_t* bufStart) {
|
||||||
|
for (uint8_t idx = 0; idx < 12; idx++) {
|
||||||
|
adcSet.channels[idx] = bufStart[idx * 2 + 1] << 8 | bufStart[idx * 2 + 2];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void PayloadPcduHandler::handlePrintout() {
|
||||||
|
using namespace plpcdu;
|
||||||
|
if (periodicPrintout) {
|
||||||
|
if (opDivider.checkAndIncrement()) {
|
||||||
|
sif::info << "PL PCDU ADC hex [" << std::setfill('0') << std::hex;
|
||||||
|
for (uint8_t idx = 0; idx < 12; idx++) {
|
||||||
|
sif::info << std::setw(3) << adcSet.channels[idx];
|
||||||
|
if (idx < 11) {
|
||||||
|
sif::info << ",";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sif::info << "] | T[C] " << std::dec << adcSet.tempC.value << std::endl;
|
||||||
|
sif::info << "Neg V: " << adcSet.processed[U_NEG_V_FB] << std::endl;
|
||||||
|
sif::info << "I HPA [mA]: " << adcSet.processed[I_HPA] << std::endl;
|
||||||
|
sif::info << "U HPA [V]: " << adcSet.processed[U_HPA_DIV_6] << std::endl;
|
||||||
|
sif::info << "I MPA [mA]: " << adcSet.processed[I_MPA] << std::endl;
|
||||||
|
sif::info << "U MPA [V]: " << adcSet.processed[U_MPA_DIV_6] << std::endl;
|
||||||
|
sif::info << "I TX [mA]: " << adcSet.processed[I_TX] << std::endl;
|
||||||
|
sif::info << "U TX [V]: " << adcSet.processed[U_TX_DIV_6] << std::endl;
|
||||||
|
sif::info << "I X8 [mA]: " << adcSet.processed[I_X8] << std::endl;
|
||||||
|
sif::info << "U X8 [V]: " << adcSet.processed[U_X8_DIV_6] << std::endl;
|
||||||
|
sif::info << "I DRO [mA]: " << adcSet.processed[I_DRO] << std::endl;
|
||||||
|
sif::info << "U DRO [V]: " << adcSet.processed[U_DRO_DIV_6] << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void PayloadPcduHandler::enablePeriodicPrintout(bool enable, uint8_t divider) {
|
||||||
|
this->periodicPrintout = enable;
|
||||||
|
opDivider.setDivider(divider);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PayloadPcduHandler::transitionBackToOff(bool notifyFdir) {
|
||||||
|
States currentState = state;
|
||||||
|
gpioIF->pullLow(gpioIds::PLPCDU_ENB_HPA);
|
||||||
|
gpioIF->pullLow(gpioIds::PLPCDU_ENB_MPA);
|
||||||
|
gpioIF->pullLow(gpioIds::PLPCDU_ENB_TX);
|
||||||
|
gpioIF->pullLow(gpioIds::PLPCDU_ENB_X8);
|
||||||
|
gpioIF->pullLow(gpioIds::PLPCDU_ENB_DRO);
|
||||||
|
gpioIF->pullLow(gpioIds::PLPCDU_ENB_TX);
|
||||||
|
gpioIF->pullLow(gpioIds::PLPCDU_ENB_VBAT0);
|
||||||
|
gpioIF->pullLow(gpioIds::PLPCDU_ENB_VBAT1);
|
||||||
|
state = States::PCDU_OFF;
|
||||||
|
adcState = AdcStates::OFF;
|
||||||
|
setMode(MODE_OFF);
|
||||||
|
if (notifyFdir) {
|
||||||
|
triggerEvent(TRANSITION_BACK_TO_OFF, static_cast<uint32_t>(currentState));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void PayloadPcduHandler::checkAdcValues() {
|
||||||
|
using namespace plpcdu;
|
||||||
|
checkJsonFileInit();
|
||||||
|
adcSet.processed[U_BAT_DIV_6] =
|
||||||
|
static_cast<float>(adcSet.channels[0]) * VOLTAGE_DIV / MAX122X_BIT * MAX122X_VREF;
|
||||||
|
adcSet.processed[U_NEG_V_FB] =
|
||||||
|
V_POS - VOLTAGE_DIV_U_NEG *
|
||||||
|
(V_POS - static_cast<float>(adcSet.channels[1]) / MAX122X_BIT * MAX122X_VREF);
|
||||||
|
adcSet.processed[I_HPA] = static_cast<float>(adcSet.channels[2]) * SCALE_CURRENT_HPA * 1000.0;
|
||||||
|
adcSet.processed[U_HPA_DIV_6] = static_cast<float>(adcSet.channels[3]) * SCALE_VOLTAGE;
|
||||||
|
adcSet.processed[I_MPA] = static_cast<float>(adcSet.channels[4]) * SCALE_CURRENT_MPA * 1000.0;
|
||||||
|
adcSet.processed[U_MPA_DIV_6] = static_cast<float>(adcSet.channels[5]) * SCALE_VOLTAGE;
|
||||||
|
adcSet.processed[I_TX] = static_cast<float>(adcSet.channels[6]) * SCALE_CURRENT_TX * 1000.0;
|
||||||
|
adcSet.processed[U_TX_DIV_6] = static_cast<float>(adcSet.channels[7]) * SCALE_VOLTAGE;
|
||||||
|
adcSet.processed[I_X8] = static_cast<float>(adcSet.channels[8]) * SCALE_CURRENT_X8 * 1000.0;
|
||||||
|
adcSet.processed[U_X8_DIV_6] = static_cast<float>(adcSet.channels[9]) * SCALE_VOLTAGE;
|
||||||
|
adcSet.processed[I_DRO] = static_cast<float>(adcSet.channels[10]) * SCALE_CURRENT_DRO * 1000.0;
|
||||||
|
adcSet.processed[U_DRO_DIV_6] = static_cast<float>(adcSet.channels[11]) * SCALE_VOLTAGE;
|
||||||
|
float lowerBound = 0.0;
|
||||||
|
float upperBound = 0.0;
|
||||||
|
bool adcTransition = false;
|
||||||
|
adcTransition = state == States::ON_TRANS_DRO and adcCountdown.isBusy();
|
||||||
|
// Now check against voltage and current limits, depending on state
|
||||||
|
if (state >= States::ON_TRANS_DRO and not adcTransition) {
|
||||||
|
if (ssrToDroInjectionRequested) {
|
||||||
|
handleFailureInjection("SSR to DRO", NEG_V_OUT_OF_BOUNDS);
|
||||||
|
ssrToDroInjectionRequested = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
params.getValue(PARAM_KEY_MAP[NEG_V_LOWER_BOUND], lowerBound);
|
||||||
|
params.getValue(PARAM_KEY_MAP[NEG_V_UPPER_BOUND], upperBound);
|
||||||
|
if (not checkVoltage(adcSet.processed[U_NEG_V_FB], lowerBound, upperBound,
|
||||||
|
NEG_V_OUT_OF_BOUNDS)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
params.getValue(PARAM_KEY_MAP[DRO_U_LOWER_BOUND], lowerBound);
|
||||||
|
params.getValue(PARAM_KEY_MAP[DRO_U_UPPER_BOUND], upperBound);
|
||||||
|
if (not checkVoltage(adcSet.processed[U_DRO_DIV_6], lowerBound, upperBound,
|
||||||
|
U_DRO_OUT_OF_BOUNDS)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
params.getValue(PARAM_KEY_MAP[DRO_I_UPPER_BOUND], upperBound);
|
||||||
|
if (not checkCurrent(adcSet.processed[I_DRO], upperBound, I_DRO_OUT_OF_BOUNDS)) {
|
||||||
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
|
sif::warning << "Detected out of bounds current for DRO: " << adcSet.processed[I_DRO]
|
||||||
|
<< ", Raw: " << adcSet.channels[I_DRO] << std::endl;
|
||||||
|
#endif
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
adcTransition = state == States::ON_TRANS_X8 and adcCountdown.isBusy();
|
||||||
|
if (state >= States::ON_TRANS_X8 and not adcTransition) {
|
||||||
|
if (droToX8InjectionRequested) {
|
||||||
|
handleFailureInjection("X8 to TX", U_X8_OUT_OF_BOUNDS);
|
||||||
|
droToX8InjectionRequested = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
params.getValue(PARAM_KEY_MAP[X8_U_LOWER_BOUND], lowerBound);
|
||||||
|
params.getValue(PARAM_KEY_MAP[X8_U_UPPER_BOUND], upperBound);
|
||||||
|
if (not checkVoltage(adcSet.processed[U_X8_DIV_6], lowerBound, upperBound,
|
||||||
|
U_X8_OUT_OF_BOUNDS)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
params.getValue(PARAM_KEY_MAP[X8_I_UPPER_BOUND], upperBound);
|
||||||
|
if (not checkCurrent(adcSet.processed[I_X8], upperBound, I_X8_OUT_OF_BOUNDS)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
adcTransition = state == States::ON_TRANS_TX and adcCountdown.isBusy();
|
||||||
|
if (state >= States::ON_TRANS_TX and not adcTransition) {
|
||||||
|
if (txToMpaInjectionRequested) {
|
||||||
|
handleFailureInjection("TX to MPA", U_TX_OUT_OF_BOUNDS);
|
||||||
|
txToMpaInjectionRequested = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
params.getValue(PARAM_KEY_MAP[TX_U_LOWER_BOUND], lowerBound);
|
||||||
|
params.getValue(PARAM_KEY_MAP[TX_U_UPPER_BOUND], upperBound);
|
||||||
|
if (not checkVoltage(adcSet.processed[U_TX_DIV_6], lowerBound, upperBound,
|
||||||
|
U_TX_OUT_OF_BOUNDS)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
params.getValue(PARAM_KEY_MAP[TX_I_UPPER_BOUND], upperBound);
|
||||||
|
if (not checkCurrent(adcSet.processed[I_TX], upperBound, I_TX_OUT_OF_BOUNDS)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
adcTransition = state == States::ON_TRANS_MPA and adcCountdown.isBusy();
|
||||||
|
if (state >= States::ON_TRANS_MPA and not adcTransition) {
|
||||||
|
if (mpaToHpaInjectionRequested) {
|
||||||
|
handleFailureInjection("MPA to HPA", U_HPA_OUT_OF_BOUNDS);
|
||||||
|
mpaToHpaInjectionRequested = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
params.getValue(PARAM_KEY_MAP[MPA_U_LOWER_BOUND], lowerBound);
|
||||||
|
params.getValue(PARAM_KEY_MAP[MPA_U_UPPER_BOUND], upperBound);
|
||||||
|
if (not checkVoltage(adcSet.processed[U_MPA_DIV_6], lowerBound, upperBound,
|
||||||
|
U_MPA_OUT_OF_BOUNDS)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
params.getValue(PARAM_KEY_MAP[MPA_I_UPPER_BOUND], upperBound);
|
||||||
|
if (not checkCurrent(adcSet.processed[I_MPA], upperBound, I_MPA_OUT_OF_BOUNDS)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
adcTransition = state == States::ON_TRANS_HPA and adcCountdown.isBusy();
|
||||||
|
if (state >= States::ON_TRANS_HPA and not adcTransition) {
|
||||||
|
if (allOnInjectRequested) {
|
||||||
|
handleFailureInjection("All On", U_HPA_OUT_OF_BOUNDS);
|
||||||
|
allOnInjectRequested = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
params.getValue(PARAM_KEY_MAP[HPA_U_LOWER_BOUND], lowerBound);
|
||||||
|
params.getValue(PARAM_KEY_MAP[HPA_U_UPPER_BOUND], upperBound);
|
||||||
|
if (not checkVoltage(adcSet.processed[U_HPA_DIV_6], lowerBound, upperBound,
|
||||||
|
U_HPA_OUT_OF_BOUNDS)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
params.getValue(PARAM_KEY_MAP[HPA_I_UPPER_BOUND], upperBound);
|
||||||
|
if (not checkCurrent(adcSet.processed[I_HPA], upperBound, I_HPA_OUT_OF_BOUNDS)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
transitionOk = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PayloadPcduHandler::checkJsonFileInit() {
|
||||||
|
if (not jsonFileInitComplete) {
|
||||||
|
sd::SdCard prefSd;
|
||||||
|
sdcMan->getPreferredSdCard(prefSd);
|
||||||
|
if (sdcMan->isSdCardMounted(prefSd)) {
|
||||||
|
params.initialize(sdcMan->getCurrentMountPrefix(prefSd));
|
||||||
|
jsonFileInitComplete = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PayloadPcduHandler::checkVoltage(float val, float lowerBound, float upperBound, Event event) {
|
||||||
|
bool tooLarge = false;
|
||||||
|
if (val < lowerBound or val > upperBound) {
|
||||||
|
if (val > upperBound) {
|
||||||
|
tooLarge = true;
|
||||||
|
} else {
|
||||||
|
tooLarge = false;
|
||||||
|
}
|
||||||
|
uint32_t p2 = 0;
|
||||||
|
serializeFloat(p2, val);
|
||||||
|
triggerEvent(event, tooLarge, p2);
|
||||||
|
transitionOk = false;
|
||||||
|
transitionBackToOff(true);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PayloadPcduHandler::checkCurrent(float val, float upperBound, Event event) {
|
||||||
|
if (val > upperBound) {
|
||||||
|
uint32_t p2 = 0;
|
||||||
|
serializeFloat(p2, val);
|
||||||
|
triggerEvent(event, true, p2);
|
||||||
|
transitionOk = false;
|
||||||
|
transitionBackToOff(true);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PayloadPcduHandler::isModeCombinationValid(Mode_t mode, Submode_t submode) {
|
||||||
|
if (mode == MODE_NORMAL and submode <= 1) {
|
||||||
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
}
|
||||||
|
return DeviceHandlerBase::isModeCombinationValid(mode, submode);
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PayloadPcduHandler::serializeFloat(uint32_t& param, float val) {
|
||||||
|
size_t dummy = 0;
|
||||||
|
return SerializeAdapter::serialize(&val, reinterpret_cast<uint8_t*>(¶m), &dummy, 4,
|
||||||
|
SerializeIF::Endianness::NETWORK);
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PayloadPcduHandler::getParameter(uint8_t domainId, uint8_t uniqueId,
|
||||||
|
ParameterWrapper* parameterWrapper,
|
||||||
|
const ParameterWrapper* newValues,
|
||||||
|
uint16_t startAtIndex) {
|
||||||
|
using namespace plpcdu;
|
||||||
|
switch (uniqueId) {
|
||||||
|
case (PlPcduParamIds::NEG_V_LOWER_BOUND):
|
||||||
|
case (PlPcduParamIds::NEG_V_UPPER_BOUND):
|
||||||
|
case (PlPcduParamIds::DRO_U_LOWER_BOUND):
|
||||||
|
case (PlPcduParamIds::DRO_U_UPPER_BOUND):
|
||||||
|
case (PlPcduParamIds::DRO_I_UPPER_BOUND):
|
||||||
|
case (PlPcduParamIds::X8_U_LOWER_BOUND):
|
||||||
|
case (PlPcduParamIds::X8_U_UPPER_BOUND):
|
||||||
|
case (PlPcduParamIds::X8_I_UPPER_BOUND):
|
||||||
|
case (PlPcduParamIds::TX_U_LOWER_BOUND):
|
||||||
|
case (PlPcduParamIds::TX_U_UPPER_BOUND):
|
||||||
|
case (PlPcduParamIds::TX_I_UPPER_BOUND):
|
||||||
|
case (PlPcduParamIds::MPA_U_LOWER_BOUND):
|
||||||
|
case (PlPcduParamIds::MPA_U_UPPER_BOUND):
|
||||||
|
case (PlPcduParamIds::MPA_I_UPPER_BOUND):
|
||||||
|
case (PlPcduParamIds::HPA_U_LOWER_BOUND):
|
||||||
|
case (PlPcduParamIds::HPA_U_UPPER_BOUND):
|
||||||
|
case (PlPcduParamIds::HPA_I_UPPER_BOUND):
|
||||||
|
case (PlPcduParamIds::SSR_TO_DRO_WAIT_TIME):
|
||||||
|
case (PlPcduParamIds::DRO_TO_X8_WAIT_TIME):
|
||||||
|
case (PlPcduParamIds::X8_TO_TX_WAIT_TIME):
|
||||||
|
case (PlPcduParamIds::TX_TO_MPA_WAIT_TIME):
|
||||||
|
case (PlPcduParamIds::MPA_TO_HPA_WAIT_TIME): {
|
||||||
|
handleDoubleParamUpdate(PARAM_KEY_MAP[static_cast<PlPcduParamIds>(uniqueId)],
|
||||||
|
parameterWrapper, newValues);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (PlPcduParamIds::INJECT_SSR_TO_DRO_FAILURE): {
|
||||||
|
ssrToDroInjectionRequested = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (PlPcduParamIds::INJECT_DRO_TO_X8_FAILURE): {
|
||||||
|
droToX8InjectionRequested = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (PlPcduParamIds::INJECT_X8_TO_TX_FAILURE): {
|
||||||
|
x8ToTxInjectionRequested = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (PlPcduParamIds::INJECT_TX_TO_MPA_FAILURE): {
|
||||||
|
txToMpaInjectionRequested = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (PlPcduParamIds::INJECT_MPA_TO_HPA_FAILURE): {
|
||||||
|
mpaToHpaInjectionRequested = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (PlPcduParamIds::INJECT_ALL_ON_FAILURE): {
|
||||||
|
allOnInjectRequested = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
return DeviceHandlerBase::getParameter(domainId, uniqueId, parameterWrapper, newValues,
|
||||||
|
startAtIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PayloadPcduHandler::handleFailureInjection(std::string output, Event event) {
|
||||||
|
sif::info << "PayloadPcduHandler::checkAdcValues: " << output
|
||||||
|
<< " failure injection. "
|
||||||
|
"Transitioning back to off"
|
||||||
|
<< std::endl;
|
||||||
|
triggerEvent(event, 0, 0);
|
||||||
|
transitionOk = false;
|
||||||
|
transitionBackToOff(true);
|
||||||
|
droToX8InjectionRequested = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PayloadPcduHandler::handleDoubleParamUpdate(std::string key,
|
||||||
|
ParameterWrapper* parameterWrapper,
|
||||||
|
const ParameterWrapper* newValues) {
|
||||||
|
double newValue = 0.0;
|
||||||
|
ReturnValue_t result = newValues->getElement<double>(&newValue, 0, 0);
|
||||||
|
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
params.setValue(key, newValue);
|
||||||
|
// Do this so the dumping and loading with the framework works as well
|
||||||
|
doubleDummy = newValue;
|
||||||
|
parameterWrapper->set(doubleDummy);
|
||||||
|
return params.writeJsonFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef FSFW_OSAL_LINUX
|
||||||
|
ReturnValue_t PayloadPcduHandler::extConvAsTwoCallback(SpiComIF* comIf, SpiCookie* cookie,
|
||||||
|
const uint8_t* sendData, size_t sendLen,
|
||||||
|
void* args) {
|
||||||
|
auto handler = reinterpret_cast<PayloadPcduHandler*>(args);
|
||||||
|
if (handler == nullptr) {
|
||||||
|
sif::error << "GyroADIS16507Handler::spiSendCallback: Passed handler pointer is invalid!"
|
||||||
|
<< std::endl;
|
||||||
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
|
}
|
||||||
|
DeviceCommandId_t currentCommand = handler->getPendingCommand();
|
||||||
|
switch (currentCommand) {
|
||||||
|
case (plpcdu::READ_WITH_TEMP_EXT): {
|
||||||
|
return transferAsTwo(comIf, cookie, sendData, sendLen, false);
|
||||||
|
}
|
||||||
|
case (plpcdu::READ_TEMP_EXT): {
|
||||||
|
return transferAsTwo(comIf, cookie, sendData, sendLen, true);
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
return comIf->performRegularSendOperation(cookie, sendData, sendLen);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PayloadPcduHandler::transferAsTwo(SpiComIF* comIf, SpiCookie* cookie,
|
||||||
|
const uint8_t* sendData, size_t sendLen,
|
||||||
|
bool tempOnly) {
|
||||||
|
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
||||||
|
int retval = 0;
|
||||||
|
// Prepare transfer
|
||||||
|
int fileDescriptor = 0;
|
||||||
|
std::string device = cookie->getSpiDevice();
|
||||||
|
UnixFileGuard fileHelper(device, &fileDescriptor, O_RDWR, "SpiComIF::sendMessage");
|
||||||
|
if (fileHelper.getOpenResult() != HasReturnvaluesIF::RETURN_OK) {
|
||||||
|
return SpiComIF::OPENING_FILE_FAILED;
|
||||||
|
}
|
||||||
|
spi::SpiModes spiMode = spi::SpiModes::MODE_0;
|
||||||
|
uint32_t spiSpeed = 0;
|
||||||
|
cookie->getSpiParameters(spiMode, spiSpeed, nullptr);
|
||||||
|
comIf->setSpiSpeedAndMode(fileDescriptor, spiMode, spiSpeed);
|
||||||
|
cookie->assignWriteBuffer(sendData);
|
||||||
|
size_t transferLen = plpcdu::TEMP_REPLY_SIZE;
|
||||||
|
if (not tempOnly) {
|
||||||
|
transferLen += plpcdu::ADC_REPLY_SIZE;
|
||||||
|
}
|
||||||
|
cookie->setTransferSize(transferLen);
|
||||||
|
|
||||||
|
gpioId_t gpioId = cookie->getChipSelectPin();
|
||||||
|
GpioIF* gpioIF = comIf->getGpioInterface();
|
||||||
|
MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING;
|
||||||
|
uint32_t timeoutMs = 0;
|
||||||
|
MutexIF* mutex = comIf->getMutex(&timeoutType, &timeoutMs);
|
||||||
|
if (mutex == nullptr or gpioIF == nullptr) {
|
||||||
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
|
sif::warning << "GyroADIS16507Handler::spiSendCallback: "
|
||||||
|
"Mutex or GPIO interface invalid"
|
||||||
|
<< std::endl;
|
||||||
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gpioId != gpio::NO_GPIO) {
|
||||||
|
result = mutex->lockMutex(timeoutType, timeoutMs);
|
||||||
|
if (result != RETURN_OK) {
|
||||||
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
|
sif::error << "SpiComIF::sendMessage: Failed to lock mutex" << std::endl;
|
||||||
|
#endif
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
spi_ioc_transfer* transferStruct = cookie->getTransferStructHandle();
|
||||||
|
uint64_t origTx = transferStruct->tx_buf;
|
||||||
|
uint64_t origRx = transferStruct->rx_buf;
|
||||||
|
if (tempOnly) {
|
||||||
|
transferLen = 1;
|
||||||
|
} else {
|
||||||
|
transferLen = plpcdu::ADC_REPLY_SIZE + 1;
|
||||||
|
}
|
||||||
|
transferStruct->len = transferLen;
|
||||||
|
// Pull SPI CS low. For now, no support for active high given
|
||||||
|
if (gpioId != gpio::NO_GPIO) {
|
||||||
|
gpioIF->pullLow(gpioId);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute transfer
|
||||||
|
// Initiate a full duplex SPI transfer.
|
||||||
|
retval = ioctl(fileDescriptor, SPI_IOC_MESSAGE(1), cookie->getTransferStructHandle());
|
||||||
|
if (retval < 0) {
|
||||||
|
utility::handleIoctlError("SpiComIF::sendMessage: ioctl error.");
|
||||||
|
result = SpiComIF::FULL_DUPLEX_TRANSFER_FAILED;
|
||||||
|
}
|
||||||
|
#if FSFW_HAL_SPI_WIRETAPPING == 1
|
||||||
|
comIf->performSpiWiretapping(cookie);
|
||||||
|
#endif /* FSFW_LINUX_SPI_WIRETAPPING == 1 */
|
||||||
|
|
||||||
|
if (gpioId != gpio::NO_GPIO) {
|
||||||
|
gpioIF->pullHigh(gpioId);
|
||||||
|
}
|
||||||
|
|
||||||
|
transferStruct->tx_buf += transferLen;
|
||||||
|
transferStruct->rx_buf += transferLen;
|
||||||
|
transferStruct->len = plpcdu::TEMP_REPLY_SIZE - 1;
|
||||||
|
if (gpioId != gpio::NO_GPIO) {
|
||||||
|
gpioIF->pullLow(gpioId);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute transfer
|
||||||
|
// Initiate a full duplex SPI transfer.
|
||||||
|
retval = ioctl(fileDescriptor, SPI_IOC_MESSAGE(1), cookie->getTransferStructHandle());
|
||||||
|
if (retval < 0) {
|
||||||
|
utility::handleIoctlError("SpiComIF::sendMessage: ioctl error.");
|
||||||
|
result = SpiComIF::FULL_DUPLEX_TRANSFER_FAILED;
|
||||||
|
}
|
||||||
|
#if FSFW_HAL_SPI_WIRETAPPING == 1
|
||||||
|
comIf->performSpiWiretapping(cookie);
|
||||||
|
#endif /* FSFW_LINUX_SPI_WIRETAPPING == 1 */
|
||||||
|
|
||||||
|
if (gpioId != gpio::NO_GPIO) {
|
||||||
|
gpioIF->pullHigh(gpioId);
|
||||||
|
}
|
||||||
|
|
||||||
|
transferStruct->tx_buf = origTx;
|
||||||
|
transferStruct->rx_buf = origRx;
|
||||||
|
if (gpioId != gpio::NO_GPIO) {
|
||||||
|
mutex->unlockMutex();
|
||||||
|
}
|
||||||
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
170
mission/devices/PayloadPcduHandler.h
Normal file
170
mission/devices/PayloadPcduHandler.h
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
#ifndef LINUX_DEVICES_PLPCDUHANDLER_H_
|
||||||
|
#define LINUX_DEVICES_PLPCDUHANDLER_H_
|
||||||
|
|
||||||
|
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||||
|
#include <fsfw/globalfunctions/PeriodicOperationDivider.h>
|
||||||
|
#include <fsfw/timemanager/Countdown.h>
|
||||||
|
|
||||||
|
#include "events/subsystemIdRanges.h"
|
||||||
|
#include "fsfw/FSFW.h"
|
||||||
|
#include "fsfw_hal/common/gpio/GpioIF.h"
|
||||||
|
#include "mission/devices/devicedefinitions/payloadPcduDefinitions.h"
|
||||||
|
#include "mission/memory/SdCardMountedIF.h"
|
||||||
|
|
||||||
|
#ifdef FSFW_OSAL_LINUX
|
||||||
|
class SpiComIF;
|
||||||
|
class SpiCookie;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Device handler for the EIVE Payload PCDU
|
||||||
|
* @details
|
||||||
|
* Documentation:
|
||||||
|
* https://egit.irs.uni-stuttgart.de/eive/eive_dokumente/src/branch/master/400_Raumsegment/412_PayloaPCDUDocumentation/release/EIVE-D-421-001_PLPCDU_Documentation.pdf
|
||||||
|
*
|
||||||
|
* Important components:
|
||||||
|
* - SSR - Solid State Relay: Decouples voltages from battery
|
||||||
|
* - DRO - Dielectric Resonsant Oscillator: Generates modulation signal
|
||||||
|
* - X8: Frequency X8 Multiplicator
|
||||||
|
* - TX: Transmitter/Sender module. Modulates data onto carrier signal
|
||||||
|
* - MPA - Medium Power Amplifier
|
||||||
|
* - HPA - High Power Amplifier
|
||||||
|
*/
|
||||||
|
class PayloadPcduHandler : public DeviceHandlerBase {
|
||||||
|
public:
|
||||||
|
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PL_PCDU_HANDLER;
|
||||||
|
//! [EXPORT] : [COMMENT] Could not transition properly and went back to ALL OFF
|
||||||
|
static constexpr Event TRANSITION_BACK_TO_OFF =
|
||||||
|
event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
|
||||||
|
//! [EXPORT] : [COMMENT] P1: 0 -> too low, 1 -> too high P2: Float value
|
||||||
|
static constexpr Event NEG_V_OUT_OF_BOUNDS = event::makeEvent(SUBSYSTEM_ID, 1, severity::MEDIUM);
|
||||||
|
//! [EXPORT] : [COMMENT] P1: 0 -> too low, 1 -> too high P2: Float value
|
||||||
|
static constexpr Event U_DRO_OUT_OF_BOUNDS = event::makeEvent(SUBSYSTEM_ID, 2, severity::MEDIUM);
|
||||||
|
//! [EXPORT] : [COMMENT] P1: 0 -> too low, 1 -> too high P2: Float value
|
||||||
|
static constexpr Event I_DRO_OUT_OF_BOUNDS = event::makeEvent(SUBSYSTEM_ID, 3, severity::MEDIUM);
|
||||||
|
//! [EXPORT] : [COMMENT] P1: 0 -> too low, 1 -> too high P2: Float value
|
||||||
|
static constexpr Event U_X8_OUT_OF_BOUNDS = event::makeEvent(SUBSYSTEM_ID, 4, severity::MEDIUM);
|
||||||
|
//! [EXPORT] : [COMMENT] P1: 0 -> too low, 1 -> too high P2: Float value
|
||||||
|
static constexpr Event I_X8_OUT_OF_BOUNDS = event::makeEvent(SUBSYSTEM_ID, 5, severity::MEDIUM);
|
||||||
|
//! [EXPORT] : [COMMENT] P1: 0 -> too low, 1 -> too high P2: Float value
|
||||||
|
static constexpr Event U_TX_OUT_OF_BOUNDS = event::makeEvent(SUBSYSTEM_ID, 6, severity::MEDIUM);
|
||||||
|
//! [EXPORT] : [COMMENT] P1: 0 -> too low, 1 -> too high P2: Float value
|
||||||
|
static constexpr Event I_TX_OUT_OF_BOUNDS = event::makeEvent(SUBSYSTEM_ID, 7, severity::MEDIUM);
|
||||||
|
//! [EXPORT] : [COMMENT] P1: 0 -> too low, 1 -> too high P2: Float value
|
||||||
|
static constexpr Event U_MPA_OUT_OF_BOUNDS = event::makeEvent(SUBSYSTEM_ID, 8, severity::MEDIUM);
|
||||||
|
//! [EXPORT] : [COMMENT] P1: 0 -> too low, 1 -> too high P2: Float value
|
||||||
|
static constexpr Event I_MPA_OUT_OF_BOUNDS = event::makeEvent(SUBSYSTEM_ID, 9, severity::MEDIUM);
|
||||||
|
//! [EXPORT] : [COMMENT] P1: 0 -> too low, 1 -> too high P2: Float value
|
||||||
|
static constexpr Event U_HPA_OUT_OF_BOUNDS = event::makeEvent(SUBSYSTEM_ID, 10, severity::MEDIUM);
|
||||||
|
//! [EXPORT] : [COMMENT] P1: 0 -> too low, 1 -> too high P2: Float value
|
||||||
|
static constexpr Event I_HPA_OUT_OF_BOUNDS = event::makeEvent(SUBSYSTEM_ID, 11, severity::MEDIUM);
|
||||||
|
|
||||||
|
PayloadPcduHandler(object_id_t objectId, object_id_t comIF, CookieIF* cookie, GpioIF* gpioIF,
|
||||||
|
SdCardMountedIF* sdcMan, bool periodicPrintout);
|
||||||
|
|
||||||
|
void setToGoToNormalModeImmediately(bool enable);
|
||||||
|
void enablePeriodicPrintout(bool enable, uint8_t divider);
|
||||||
|
|
||||||
|
static ReturnValue_t extConvAsTwoCallback(SpiComIF* comIf, SpiCookie* cookie,
|
||||||
|
const uint8_t* sendData, size_t sendLen, void* args);
|
||||||
|
|
||||||
|
#ifdef FSFW_OSAL_LINUX
|
||||||
|
static ReturnValue_t transferAsTwo(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sendData,
|
||||||
|
size_t sendLen, bool tempOnly);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
private:
|
||||||
|
enum class States : uint8_t {
|
||||||
|
PCDU_OFF,
|
||||||
|
// Solid State Relay, enable battery voltages VBAT0 and VBAT1. This will also switch on
|
||||||
|
// the ADC
|
||||||
|
ON_TRANS_SSR,
|
||||||
|
ON_TRANS_ADC_CLOSE_ZERO,
|
||||||
|
// Enable Dielectric Resonant Oscillator and start monitoring voltages as
|
||||||
|
// soon as DRO voltage reaches 6V
|
||||||
|
ON_TRANS_DRO,
|
||||||
|
// Switch on X8 compoennt and monitor voltages for 5 seconds
|
||||||
|
ON_TRANS_X8,
|
||||||
|
// Switch on TX component and monitor voltages for 5 seconds
|
||||||
|
ON_TRANS_TX,
|
||||||
|
// Switch on MPA component and monitor voltages for 5 seconds
|
||||||
|
ON_TRANS_MPA,
|
||||||
|
// Switch on HPA component and monitor voltages for 5 seconds
|
||||||
|
ON_TRANS_HPA,
|
||||||
|
// All components of the experiment are on
|
||||||
|
PCDU_ON,
|
||||||
|
} state = States::PCDU_OFF;
|
||||||
|
|
||||||
|
enum class AdcMode { EXT_CONV, INT_CONV } adcMode = AdcMode::INT_CONV;
|
||||||
|
|
||||||
|
enum class MonitoringMode { NONE, CLOSE_TO_ZERO, NEGATIVE } monMode = MonitoringMode::NONE;
|
||||||
|
|
||||||
|
enum class AdcStates { OFF, BOOT_DELAY, SEND_SETUP, NORMAL } adcState = AdcStates::OFF;
|
||||||
|
|
||||||
|
bool goToNormalMode = false;
|
||||||
|
plpcdu::PlPcduAdcSet adcSet;
|
||||||
|
std::array<uint8_t, plpcdu::MAX_ADC_REPLY_SIZE> cmdBuf = {};
|
||||||
|
// This variable is tied to DRO +6 V voltage. Voltages, currents are monitored and the experiment
|
||||||
|
// is shut down immediately if there is a negative voltage.
|
||||||
|
bool transitionOk = false;
|
||||||
|
bool commandExecuted = false;
|
||||||
|
bool adcCmdExecuted = false;
|
||||||
|
bool periodicPrintout = false;
|
||||||
|
bool jsonFileInitComplete = false;
|
||||||
|
double doubleDummy = 0.0;
|
||||||
|
|
||||||
|
bool ssrToDroInjectionRequested = false;
|
||||||
|
bool droToX8InjectionRequested = false;
|
||||||
|
bool x8ToTxInjectionRequested = false;
|
||||||
|
bool txToMpaInjectionRequested = false;
|
||||||
|
bool mpaToHpaInjectionRequested = false;
|
||||||
|
bool allOnInjectRequested = false;
|
||||||
|
|
||||||
|
PeriodicOperationDivider opDivider = PeriodicOperationDivider(5);
|
||||||
|
uint8_t tempReadDivisor = 1;
|
||||||
|
Countdown countdown = Countdown(5000);
|
||||||
|
Countdown adcCountdown = Countdown(50);
|
||||||
|
GpioIF* gpioIF;
|
||||||
|
SdCardMountedIF* sdcMan;
|
||||||
|
plpcdu::PlPcduParameter params;
|
||||||
|
|
||||||
|
PoolEntry<uint16_t> channelValues = PoolEntry<uint16_t>({0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0});
|
||||||
|
PoolEntry<float> processedValues =
|
||||||
|
PoolEntry<float>({0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0});
|
||||||
|
PoolEntry<float> tempC = PoolEntry<float>({0.0});
|
||||||
|
|
||||||
|
void doTransition(Mode_t modeFrom, Submode_t subModeFrom) override;
|
||||||
|
void doStartUp() override;
|
||||||
|
void doShutDown() override;
|
||||||
|
// Main FDIR function which goes from any PL PCDU state back to all off
|
||||||
|
void transitionBackToOff(bool notifyFdir);
|
||||||
|
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t* id) override;
|
||||||
|
ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t* id) override;
|
||||||
|
void fillCommandAndReplyMap() override;
|
||||||
|
ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t* commandData,
|
||||||
|
size_t commandDataLen) override;
|
||||||
|
ReturnValue_t scanForReply(const uint8_t* start, size_t remainingSize, DeviceCommandId_t* foundId,
|
||||||
|
size_t* foundLen) override;
|
||||||
|
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) override;
|
||||||
|
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
||||||
|
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||||
|
LocalDataPoolManager& poolManager) override;
|
||||||
|
ReturnValue_t isModeCombinationValid(Mode_t mode, Submode_t submode) override;
|
||||||
|
ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId, ParameterWrapper* parameterWrapper,
|
||||||
|
const ParameterWrapper* newValues, uint16_t startAtIndex) override;
|
||||||
|
|
||||||
|
void handleExtConvRead(const uint8_t* bufStart);
|
||||||
|
void handlePrintout();
|
||||||
|
void checkAdcValues();
|
||||||
|
void handleOutOfBoundsPrintout();
|
||||||
|
void checkJsonFileInit();
|
||||||
|
void stateMachineToNormal();
|
||||||
|
bool checkVoltage(float val, float lowerBound, float upperBound, Event event);
|
||||||
|
bool checkCurrent(float val, float upperBound, Event event);
|
||||||
|
void handleFailureInjection(std::string output, Event event);
|
||||||
|
ReturnValue_t serializeFloat(uint32_t& param, float val);
|
||||||
|
ReturnValue_t handleDoubleParamUpdate(std::string key, ParameterWrapper* parameterWrapper,
|
||||||
|
const ParameterWrapper* newValues);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* LINUX_DEVICES_PLPCDUHANDLER_H_ */
|
231
mission/devices/devicedefinitions/payloadPcduDefinitions.h
Normal file
231
mission/devices/devicedefinitions/payloadPcduDefinitions.h
Normal file
@ -0,0 +1,231 @@
|
|||||||
|
#ifndef LINUX_DEVICES_DEVICEDEFINITIONS_PAYLOADPCDUDEFINITIONS_H_
|
||||||
|
#define LINUX_DEVICES_DEVICEDEFINITIONS_PAYLOADPCDUDEFINITIONS_H_
|
||||||
|
|
||||||
|
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
|
||||||
|
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
#include <filesystem>
|
||||||
|
#include <nlohmann/json.hpp>
|
||||||
|
|
||||||
|
#include "OBSWConfig.h"
|
||||||
|
#include "mission/devices/max1227.h"
|
||||||
|
#include "mission/memory/NVMParameterBase.h"
|
||||||
|
|
||||||
|
namespace plpcdu {
|
||||||
|
|
||||||
|
using namespace max1227;
|
||||||
|
|
||||||
|
enum PlPcduAdcChannels : uint8_t {
|
||||||
|
U_BAT_DIV_6 = 0,
|
||||||
|
// According to schematic, will be 2.2158V for Vneg = +0V and 0.2446V for Vneg = -6V
|
||||||
|
// Full Forumula: V_neg = V_post - (R1 + R2) / R1 * (V_pos - V_out) with R1 being 27.4k
|
||||||
|
// and R2 being 49.9k. FB = Feedback
|
||||||
|
U_NEG_V_FB = 1,
|
||||||
|
I_HPA = 2,
|
||||||
|
U_HPA_DIV_6 = 3,
|
||||||
|
I_MPA = 4,
|
||||||
|
U_MPA_DIV_6 = 5,
|
||||||
|
I_TX = 6,
|
||||||
|
U_TX_DIV_6 = 7,
|
||||||
|
I_X8 = 8,
|
||||||
|
U_X8_DIV_6 = 9,
|
||||||
|
I_DRO = 10,
|
||||||
|
U_DRO_DIV_6 = 11,
|
||||||
|
NUM_CHANNELS = 12
|
||||||
|
};
|
||||||
|
|
||||||
|
enum PlPcduParamIds : uint8_t {
|
||||||
|
NEG_V_LOWER_BOUND = 0,
|
||||||
|
NEG_V_UPPER_BOUND = 1,
|
||||||
|
DRO_U_LOWER_BOUND = 2,
|
||||||
|
DRO_U_UPPER_BOUND = 3,
|
||||||
|
DRO_I_UPPER_BOUND = 4,
|
||||||
|
X8_U_LOWER_BOUND = 5,
|
||||||
|
X8_U_UPPER_BOUND = 6,
|
||||||
|
X8_I_UPPER_BOUND = 7,
|
||||||
|
TX_U_LOWER_BOUND = 8,
|
||||||
|
TX_U_UPPER_BOUND = 9,
|
||||||
|
TX_I_UPPER_BOUND = 10,
|
||||||
|
MPA_U_LOWER_BOUND = 11,
|
||||||
|
MPA_U_UPPER_BOUND = 12,
|
||||||
|
MPA_I_UPPER_BOUND = 13,
|
||||||
|
HPA_U_LOWER_BOUND = 14,
|
||||||
|
HPA_U_UPPER_BOUND = 15,
|
||||||
|
HPA_I_UPPER_BOUND = 16,
|
||||||
|
|
||||||
|
SSR_TO_DRO_WAIT_TIME = 17,
|
||||||
|
DRO_TO_X8_WAIT_TIME = 18,
|
||||||
|
X8_TO_TX_WAIT_TIME = 19,
|
||||||
|
TX_TO_MPA_WAIT_TIME = 20,
|
||||||
|
MPA_TO_HPA_WAIT_TIME = 21,
|
||||||
|
|
||||||
|
INJECT_SSR_TO_DRO_FAILURE = 30,
|
||||||
|
INJECT_DRO_TO_X8_FAILURE = 31,
|
||||||
|
INJECT_X8_TO_TX_FAILURE = 32,
|
||||||
|
INJECT_TX_TO_MPA_FAILURE = 33,
|
||||||
|
INJECT_MPA_TO_HPA_FAILURE = 34,
|
||||||
|
INJECT_ALL_ON_FAILURE = 35
|
||||||
|
};
|
||||||
|
|
||||||
|
static std::map<PlPcduParamIds, std::string> PARAM_KEY_MAP = {
|
||||||
|
{NEG_V_LOWER_BOUND, "negVoltLowerBound"}, {NEG_V_UPPER_BOUND, "negVoltUpperBound"},
|
||||||
|
{DRO_U_LOWER_BOUND, "droVoltLowerBound"}, {DRO_U_UPPER_BOUND, "droVoltUpperBound"},
|
||||||
|
{DRO_I_UPPER_BOUND, "droCurrUpperBound"}, {X8_U_LOWER_BOUND, "x8VoltLowerBound"},
|
||||||
|
{X8_U_UPPER_BOUND, "x8VoltUpperBound"}, {X8_I_UPPER_BOUND, "x8CurrUpperBound"},
|
||||||
|
{TX_U_LOWER_BOUND, "txVoltLowerBound"}, {TX_U_UPPER_BOUND, "txVoltUpperBound"},
|
||||||
|
{TX_I_UPPER_BOUND, "txCurrUpperBound"}, {MPA_U_LOWER_BOUND, "mpaVoltLowerBound"},
|
||||||
|
{MPA_U_UPPER_BOUND, "mpaVoltUpperBound"}, {MPA_I_UPPER_BOUND, "mpaCurrUpperBound"},
|
||||||
|
{HPA_U_LOWER_BOUND, "hpaVoltLowerBound"}, {HPA_U_UPPER_BOUND, "hpaVoltUpperBound"},
|
||||||
|
{HPA_I_UPPER_BOUND, "hpaCurrUpperBound"}, {SSR_TO_DRO_WAIT_TIME, "ssrToDroWait"},
|
||||||
|
{DRO_TO_X8_WAIT_TIME, "droToX8Wait"}, {X8_TO_TX_WAIT_TIME, "x8ToTxWait"},
|
||||||
|
{TX_TO_MPA_WAIT_TIME, "txToMpaWait"}, {MPA_TO_HPA_WAIT_TIME, "mpaToHpaWait"},
|
||||||
|
};
|
||||||
|
|
||||||
|
enum PlPcduPoolIds : uint32_t { CHANNEL_VEC = 0, PROCESSED_VEC = 1, TEMP = 2 };
|
||||||
|
|
||||||
|
static constexpr size_t MAX_ADC_REPLY_SIZE = 64;
|
||||||
|
|
||||||
|
static constexpr DeviceCommandId_t READ_CMD = 0;
|
||||||
|
static constexpr DeviceCommandId_t SETUP_CMD = 1;
|
||||||
|
static constexpr DeviceCommandId_t READ_TEMP_EXT = 2;
|
||||||
|
static constexpr DeviceCommandId_t READ_WITH_TEMP_EXT = 3;
|
||||||
|
|
||||||
|
static constexpr Submode_t NORMAL_ADC_ONLY = 0;
|
||||||
|
static constexpr Submode_t NORMAL_ALL_ON = 1;
|
||||||
|
|
||||||
|
// 12 ADC values * 2 + trailing zero
|
||||||
|
static constexpr size_t ADC_REPLY_SIZE = 25;
|
||||||
|
// Conversion byte + 24 * zero
|
||||||
|
static constexpr size_t TEMP_REPLY_SIZE = 25;
|
||||||
|
|
||||||
|
static constexpr uint8_t SETUP_BYTE =
|
||||||
|
max1227::buildSetupByte(ClkSel::EXT_CONV_EXT_TIMED, RefSel::INT_REF_NO_WAKEUP, DiffSel::NONE_0);
|
||||||
|
|
||||||
|
static constexpr uint32_t ADC_SET_ID = READ_CMD;
|
||||||
|
static constexpr uint8_t CHANNELS_NUM = 12;
|
||||||
|
static constexpr uint8_t CHANNEL_N = CHANNELS_NUM - 1;
|
||||||
|
// Store temperature as well
|
||||||
|
static constexpr size_t DATASET_ENTRIES = CHANNELS_NUM + 1;
|
||||||
|
|
||||||
|
static constexpr uint8_t VOLTAGE_DIV = 6;
|
||||||
|
// 12-bit ADC: 2 to the power of 12 minus 1
|
||||||
|
static constexpr uint16_t MAX122X_BIT = 4095;
|
||||||
|
static constexpr float MAX122X_VREF = 2.5;
|
||||||
|
static constexpr float GAIN_INA169 = 100.0;
|
||||||
|
static constexpr float R_SHUNT_HPA = 0.008;
|
||||||
|
static constexpr float R_SHUNT_MPA = 0.015;
|
||||||
|
static constexpr float R_SHUNT_TX = 0.05;
|
||||||
|
static constexpr float R_SHUNT_X8 = 0.015;
|
||||||
|
static constexpr float R_SHUNT_DRO = 0.22;
|
||||||
|
static constexpr float V_POS = 3.3;
|
||||||
|
static constexpr float VOLTAGE_DIV_U_NEG = (49.9 + 27.4) / 27.4;
|
||||||
|
static constexpr float MAX122X_SCALE = MAX122X_VREF / MAX122X_BIT;
|
||||||
|
static constexpr float SCALE_VOLTAGE = MAX122X_SCALE * VOLTAGE_DIV;
|
||||||
|
static constexpr float SCALE_CURRENT_HPA = MAX122X_SCALE / (GAIN_INA169 * R_SHUNT_HPA);
|
||||||
|
static constexpr float SCALE_CURRENT_MPA = MAX122X_SCALE / (GAIN_INA169 * R_SHUNT_MPA);
|
||||||
|
static constexpr float SCALE_CURRENT_TX = MAX122X_SCALE / (GAIN_INA169 * R_SHUNT_TX);
|
||||||
|
static constexpr float SCALE_CURRENT_X8 = MAX122X_SCALE / (GAIN_INA169 * R_SHUNT_X8);
|
||||||
|
static constexpr float SCALE_CURRENT_DRO = MAX122X_SCALE / (GAIN_INA169 * R_SHUNT_DRO);
|
||||||
|
|
||||||
|
// TODO: Make these configurable parameters using a JSON file
|
||||||
|
// Upper bound of currents in milliamperes [mA]
|
||||||
|
static constexpr double DFT_NEG_V_LOWER_BOUND = -6.5;
|
||||||
|
static constexpr double DFT_NEG_V_UPPER_BOUND = -2.7;
|
||||||
|
|
||||||
|
static constexpr double DFT_DRO_U_LOWER_BOUND = 5.0;
|
||||||
|
static constexpr double DFT_DRO_U_UPPER_BOUND = 7.0;
|
||||||
|
// Max Current DRO + Max Current Neg V | 40 + 15
|
||||||
|
static constexpr double DFT_DRO_I_UPPER_BOUND = 55.0;
|
||||||
|
|
||||||
|
static constexpr double DFT_X8_U_LOWER_BOUND = 2.6;
|
||||||
|
static constexpr double DFT_X8_U_UPPER_BOUND = 4.0;
|
||||||
|
static constexpr double DFT_X8_I_UPPER_BOUND = 100.0;
|
||||||
|
|
||||||
|
static constexpr double DFT_TX_U_LOWER_BOUND = 2.6;
|
||||||
|
static constexpr double DFT_TX_U_UPPER_BOUND = 4.0;
|
||||||
|
static constexpr double DFT_TX_I_UPPER_BOUND = 250.0;
|
||||||
|
|
||||||
|
static constexpr double DFT_MPA_U_LOWER_BOUND = 2.6;
|
||||||
|
static constexpr double DFT_MPA_U_UPPER_BOUND = 4.0;
|
||||||
|
static constexpr double DFT_MPA_I_UPPER_BOUND = 650.0;
|
||||||
|
|
||||||
|
static constexpr double DFT_HPA_U_LOWER_BOUND = 9.4;
|
||||||
|
static constexpr double DFT_HPA_U_UPPER_BOUND = 11.0;
|
||||||
|
static constexpr double DFT_HPA_I_UPPER_BOUND = 3000.0;
|
||||||
|
|
||||||
|
// Wait time in floating point seconds
|
||||||
|
static constexpr double DFT_SSR_TO_DRO_WAIT_TIME = 5.0;
|
||||||
|
static constexpr double DFT_DRO_TO_X8_WAIT_TIME = 905.0;
|
||||||
|
static constexpr double DFT_X8_TO_TX_WAIT_TIME = 5.0;
|
||||||
|
static constexpr double DFT_TX_TO_MPA_WAIT_TIME = 5.0;
|
||||||
|
static constexpr double DFT_MPA_TO_HPA_WAIT_TIME = 5.0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The current of the processed values is calculated and stored as a milliamperes [mA].
|
||||||
|
* The voltages are stored as Volt values.
|
||||||
|
*/
|
||||||
|
class PlPcduAdcSet : public StaticLocalDataSet<DATASET_ENTRIES> {
|
||||||
|
public:
|
||||||
|
PlPcduAdcSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, ADC_SET_ID) {}
|
||||||
|
|
||||||
|
PlPcduAdcSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, ADC_SET_ID)) {}
|
||||||
|
|
||||||
|
lp_vec_t<uint16_t, 12> channels = lp_vec_t<uint16_t, 12>(sid.objectId, CHANNEL_VEC, this);
|
||||||
|
lp_vec_t<float, 12> processed = lp_vec_t<float, 12>(sid.objectId, PROCESSED_VEC, this);
|
||||||
|
lp_var_t<float> tempC = lp_var_t<float>(sid.objectId, TEMP, this);
|
||||||
|
};
|
||||||
|
|
||||||
|
class PlPcduParameter : public NVMParameterBase {
|
||||||
|
public:
|
||||||
|
PlPcduParameter() : NVMParameterBase(""), mountPrefix("") {
|
||||||
|
using namespace plpcdu;
|
||||||
|
// Initialize with default values
|
||||||
|
resetValues();
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t initialize(std::string mountPrefix) {
|
||||||
|
setFullName(mountPrefix + "/conf/plpcdu.json");
|
||||||
|
ReturnValue_t result = readJsonFile();
|
||||||
|
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
|
// File does not exist or reading JSON failed for various reason. Rewrite the JSON file
|
||||||
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
|
sif::info << "Creating PL PCDU JSON file at " << getFullName() << std::endl;
|
||||||
|
#endif
|
||||||
|
resetValues();
|
||||||
|
writeJsonFile();
|
||||||
|
}
|
||||||
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
}
|
||||||
|
void resetValues() {
|
||||||
|
insertValue(PARAM_KEY_MAP[SSR_TO_DRO_WAIT_TIME], DFT_SSR_TO_DRO_WAIT_TIME);
|
||||||
|
insertValue(PARAM_KEY_MAP[DRO_TO_X8_WAIT_TIME], DFT_DRO_TO_X8_WAIT_TIME);
|
||||||
|
insertValue(PARAM_KEY_MAP[X8_TO_TX_WAIT_TIME], DFT_X8_TO_TX_WAIT_TIME);
|
||||||
|
insertValue(PARAM_KEY_MAP[TX_TO_MPA_WAIT_TIME], DFT_TX_TO_MPA_WAIT_TIME);
|
||||||
|
insertValue(PARAM_KEY_MAP[MPA_TO_HPA_WAIT_TIME], DFT_MPA_TO_HPA_WAIT_TIME);
|
||||||
|
insertValue(PARAM_KEY_MAP[NEG_V_LOWER_BOUND], DFT_NEG_V_LOWER_BOUND);
|
||||||
|
insertValue(PARAM_KEY_MAP[NEG_V_UPPER_BOUND], DFT_NEG_V_UPPER_BOUND);
|
||||||
|
insertValue(PARAM_KEY_MAP[DRO_U_LOWER_BOUND], DFT_DRO_U_LOWER_BOUND);
|
||||||
|
insertValue(PARAM_KEY_MAP[DRO_U_UPPER_BOUND], DFT_DRO_U_UPPER_BOUND);
|
||||||
|
insertValue(PARAM_KEY_MAP[DRO_I_UPPER_BOUND], DFT_DRO_I_UPPER_BOUND);
|
||||||
|
insertValue(PARAM_KEY_MAP[X8_U_LOWER_BOUND], DFT_X8_U_LOWER_BOUND);
|
||||||
|
insertValue(PARAM_KEY_MAP[X8_U_UPPER_BOUND], DFT_X8_U_UPPER_BOUND);
|
||||||
|
insertValue(PARAM_KEY_MAP[X8_I_UPPER_BOUND], DFT_X8_I_UPPER_BOUND);
|
||||||
|
insertValue(PARAM_KEY_MAP[TX_U_LOWER_BOUND], DFT_TX_U_LOWER_BOUND);
|
||||||
|
insertValue(PARAM_KEY_MAP[TX_U_UPPER_BOUND], DFT_TX_U_UPPER_BOUND);
|
||||||
|
insertValue(PARAM_KEY_MAP[TX_I_UPPER_BOUND], DFT_TX_I_UPPER_BOUND);
|
||||||
|
insertValue(PARAM_KEY_MAP[MPA_U_LOWER_BOUND], DFT_MPA_U_LOWER_BOUND);
|
||||||
|
insertValue(PARAM_KEY_MAP[MPA_U_UPPER_BOUND], DFT_MPA_U_UPPER_BOUND);
|
||||||
|
insertValue(PARAM_KEY_MAP[MPA_I_UPPER_BOUND], DFT_MPA_I_UPPER_BOUND);
|
||||||
|
insertValue(PARAM_KEY_MAP[HPA_U_LOWER_BOUND], DFT_HPA_U_LOWER_BOUND);
|
||||||
|
insertValue(PARAM_KEY_MAP[HPA_U_UPPER_BOUND], DFT_HPA_U_UPPER_BOUND);
|
||||||
|
insertValue(PARAM_KEY_MAP[HPA_I_UPPER_BOUND], DFT_HPA_I_UPPER_BOUND);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string mountPrefix;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace plpcdu
|
||||||
|
|
||||||
|
#endif /* LINUX_DEVICES_DEVICEDEFINITIONS_PAYLOADPCDUDEFINITIONS_H_ */
|
Loading…
x
Reference in New Issue
Block a user