This commit is contained in:
Markus Koller 2021-12-02 09:34:47 +01:00
commit 5c1c0dc515
61 changed files with 2108 additions and 343 deletions

9
Justfile Normal file
View File

@ -0,0 +1,9 @@
python_script := './cmake/scripts/cmake-build-cfg.py'
default: q7s-debug-make
q7s-debug-make:
{{python_script}} -o linux -g make -b debug -t "arm/q7s" -l build-Debug-Q7S
q7s-debug-ninja:
{{python_script}} -o linux -g ninja -b debug -t "arm/q7s" -l build-Debug-Q7S

View File

@ -16,6 +16,10 @@ static constexpr char UART_STAR_TRACKER_DEV[] = "/dev/ttyUL8";
static constexpr char UART_GNSS_0_DEV[] = "/dev/ttyUL0"; static constexpr char UART_GNSS_0_DEV[] = "/dev/ttyUL0";
static constexpr char UART_GNSS_1_DEV[] = "/dev/ttyUL2"; static constexpr char UART_GNSS_1_DEV[] = "/dev/ttyUL2";
static constexpr char UIO_PDEC_REGISTERS[] = "/dev/uio0";
static constexpr char UIO_PDEC_CONFIG_MEMORY[] = "/dev/uio2";
static constexpr char UIO_PDEC_RAM[] = "/dev/uio3";
namespace gpioNames { namespace gpioNames {
static constexpr char GYRO_0_ADIS_CS[] = "gyro_0_adis_chip_select"; static constexpr char GYRO_0_ADIS_CS[] = "gyro_0_adis_chip_select";
static constexpr char GYRO_1_L3G_CS[] = "gyro_1_l3g_chip_select"; static constexpr char GYRO_1_L3G_CS[] = "gyro_1_l3g_chip_select";
@ -62,6 +66,10 @@ namespace gpioNames {
static constexpr char PAPB_EMPTY_SIGNAL_VC3[] = "papb_empty_signal_vc3"; static constexpr char PAPB_EMPTY_SIGNAL_VC3[] = "papb_empty_signal_vc3";
static constexpr char RS485_EN_TX_CLOCK[] = "tx_clock_enable_ltc2872"; static constexpr char RS485_EN_TX_CLOCK[] = "tx_clock_enable_ltc2872";
static constexpr char RS485_EN_TX_DATA[] = "tx_data_enable_ltc2872"; static constexpr char RS485_EN_TX_DATA[] = "tx_data_enable_ltc2872";
static constexpr char RS485_EN_RX_CLOCK[] = "rx_clock_enable_ltc2872";
static constexpr char RS485_EN_RX_DATA[] = "rx_data_enable_ltc2872";
static constexpr char PDEC_RESET[] = "pdec_reset";
static constexpr char BIT_RATE_SEL[] = "bit_rate_sel";
} }
} }

View File

@ -26,8 +26,8 @@ ReturnValue_t Q7STestTask::performOneShotAction() {
//testJsonLibDirect(); //testJsonLibDirect();
//testDummyParams(); //testDummyParams();
//testProtHandler(); //testProtHandler();
//FsOpCodes opCode = FsOpCodes::ATTEMPT_DIR_REMOVAL_NON_EMPTY; FsOpCodes opCode = FsOpCodes::APPEND_TO_FILE;
//testFileSystemHandlerDirect(opCode); testFileSystemHandlerDirect(opCode);
return TestTask::performOneShotAction(); return TestTask::performOneShotAction();
} }
@ -227,7 +227,7 @@ void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
// Lambda for common code // Lambda for common code
auto createNonEmptyTmpDir = [&]() { auto createNonEmptyTmpDir = [&]() {
if(not std::filesystem::exists("/tmp/test")) { if(not std::filesystem::exists("/tmp/test")) {
result = fsHandler->createDirectory("/tmp/test", &cfg); result = fsHandler->createDirectory("/tmp", "test", false, &cfg);
if(result != HasReturnvaluesIF::RETURN_OK) { if(result != HasReturnvaluesIF::RETURN_OK) {
return result; return result;
} }
@ -252,7 +252,7 @@ void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
cfg.useMountPrefix = false; cfg.useMountPrefix = false;
sif::info << "Creating empty file in /tmp folder" << std::endl; sif::info << "Creating empty file in /tmp folder" << std::endl;
// Do not delete file, user can check existence in shell // Do not delete file, user can check existence in shell
fsHandler->createFile("/tmp", "test.txt", nullptr, 0, &cfg); fsHandler->createFile("/tmp/", "test.txt", nullptr, 0, &cfg);
break; break;
} }
case(FsOpCodes::REMOVE_TMP_FILE): { case(FsOpCodes::REMOVE_TMP_FILE): {
@ -262,7 +262,7 @@ void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
if(not std::filesystem::exists("/tmp/test.txt")) { if(not std::filesystem::exists("/tmp/test.txt")) {
// Creating sample file // Creating sample file
sif::info << "Creating sample file /tmp/test.txt to delete" << std::endl; sif::info << "Creating sample file /tmp/test.txt to delete" << std::endl;
fsHandler->createFile("/tmp", "test.txt", nullptr, 0, &cfg); fsHandler->createFile("/tmp/", "test.txt", nullptr, 0, &cfg);
} }
result = fsHandler->removeFile("/tmp", "test.txt", &cfg); result = fsHandler->removeFile("/tmp", "test.txt", &cfg);
if(result == HasReturnvaluesIF::RETURN_OK) { if(result == HasReturnvaluesIF::RETURN_OK) {
@ -278,7 +278,7 @@ void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
cfg.useMountPrefix = false; cfg.useMountPrefix = false;
sif::info << "Creating empty file in /tmp folder" << std::endl; sif::info << "Creating empty file in /tmp folder" << std::endl;
// Do not delete file, user can check existence in shell // Do not delete file, user can check existence in shell
ReturnValue_t result = fsHandler->createDirectory("/tmp/test", &cfg); ReturnValue_t result = fsHandler->createDirectory("/tmp/", "test", false, &cfg);
if(result == HasReturnvaluesIF::RETURN_OK) { if(result == HasReturnvaluesIF::RETURN_OK) {
sif::info << "Directory created successfully" << std::endl; sif::info << "Directory created successfully" << std::endl;
} }
@ -291,13 +291,13 @@ void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
// No mount prefix, cause file is created in tmp // No mount prefix, cause file is created in tmp
cfg.useMountPrefix = false; cfg.useMountPrefix = false;
if(not std::filesystem::exists("/tmp/test")) { if(not std::filesystem::exists("/tmp/test")) {
result = fsHandler->createDirectory("/tmp/test", &cfg); result = fsHandler->createDirectory("/tmp", "test", false, &cfg);
} }
else { else {
// Delete any leftover files to regular dir removal works // Delete any leftover files to regular dir removal works
std::remove("/tmp/test/*"); std::remove("/tmp/test/*");
} }
result = fsHandler->removeDirectory("/tmp/test", false, &cfg); result = fsHandler->removeDirectory("/tmp/", "test", false, &cfg);
if(result == HasReturnvaluesIF::RETURN_OK) { if(result == HasReturnvaluesIF::RETURN_OK) {
sif::info << "Directory removed successfully" << std::endl; sif::info << "Directory removed successfully" << std::endl;
} }
@ -311,7 +311,7 @@ void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
if(result != HasReturnvaluesIF::RETURN_OK) { if(result != HasReturnvaluesIF::RETURN_OK) {
return; return;
} }
result = fsHandler->removeDirectory("/tmp/test", true, &cfg); result = fsHandler->removeDirectory("/tmp/", "test", true, &cfg);
if(result == HasReturnvaluesIF::RETURN_OK) { if(result == HasReturnvaluesIF::RETURN_OK) {
sif::info << "Directory removed recursively successfully" << std::endl; sif::info << "Directory removed recursively successfully" << std::endl;
} }
@ -325,13 +325,42 @@ void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
if(result != HasReturnvaluesIF::RETURN_OK) { if(result != HasReturnvaluesIF::RETURN_OK) {
return; return;
} }
result = fsHandler->removeDirectory("/tmp/test", false, &cfg); result = fsHandler->removeDirectory("/tmp/", "test", false, &cfg);
if(result != HasReturnvaluesIF::RETURN_OK) { if(result != HasReturnvaluesIF::RETURN_OK) {
sif::info << "Directory removal attempt failed as expected" << std::endl; sif::info << "Directory removal attempt failed as expected" << std::endl;
} }
else { else {
sif::warning << "Directory removal worked when it should not have!" << std::endl; sif::warning << "Directory removal worked when it should not have!" << std::endl;
} }
break;
}
case(FsOpCodes::RENAME_FILE): {
// No mount prefix, cause file is created in tmp
cfg.useMountPrefix = false;
if(std::filesystem::exists("/tmp/test.txt")) {
fsHandler->removeDirectory("/tmp/", "test", false, &cfg);
}
sif::info << "Creating empty file /tmp/test.txt and rename to /tmp/test2.txt" << std::endl;
// Do not delete file, user can check existence in shell
fsHandler->createFile("/tmp/", "test.txt", nullptr, 0, &cfg);
fsHandler->renameFile("/tmp/", "test.txt", "test2.txt", &cfg);
break;
}
case(FsOpCodes::APPEND_TO_FILE): {
// No mount prefix, cause file is created in tmp
cfg.useMountPrefix = false;
if(std::filesystem::exists("/tmp/test.txt")) {
fsHandler->removeDirectory("/tmp/", "test", false, &cfg);
}
if(std::filesystem::exists("/tmp/test.txt")) {
fsHandler->removeDirectory("/tmp/", "test", false, &cfg);
}
sif::info << "Creating empty file /tmp/test.txt and adding content" << std::endl;
std::string content = "Hello World\n";
// Do not delete file, user can check existence in shell
fsHandler->createFile("/tmp/", "test.txt", nullptr, 0, &cfg);
fsHandler->appendToFile("/tmp/", "test.txt", reinterpret_cast<const uint8_t*>(
content.data()), content.size(), 0, &cfg);
} }
} }
} }

View File

@ -27,6 +27,8 @@ private:
REMOVE_EMPTY_DIR_IN_TMP, REMOVE_EMPTY_DIR_IN_TMP,
ATTEMPT_DIR_REMOVAL_NON_EMPTY, ATTEMPT_DIR_REMOVAL_NON_EMPTY,
REMOVE_FILLED_DIR_IN_TMP, REMOVE_FILLED_DIR_IN_TMP,
RENAME_FILE,
APPEND_TO_FILE,
}; };
void testFileSystemHandlerDirect(FsOpCodes opCode); void testFileSystemHandlerDirect(FsOpCodes opCode);
}; };

View File

@ -23,6 +23,16 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie *cookie, const uint8_t *sen
uint8_t writeBuffer[2]; uint8_t writeBuffer[2];
uint8_t writeSize = 0; uint8_t writeSize = 0;
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) {
sif::debug << "rwSpiCallback::spiCallback: Mutex or GPIO interface invalid" << std::endl;
return HasReturnvaluesIF::RETURN_FAILED;
}
int fileDescriptor = 0; int fileDescriptor = 0;
std::string device = cookie->getSpiDevice(); std::string device = cookie->getSpiDevice();
UnixFileGuard fileHelper(device, &fileDescriptor, O_RDWR, "rwSpiCallback::spiCallback"); UnixFileGuard fileHelper(device, &fileDescriptor, O_RDWR, "rwSpiCallback::spiCallback");
@ -35,16 +45,6 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie *cookie, const uint8_t *sen
cookie->getSpiParameters(spiMode, spiSpeed, nullptr); cookie->getSpiParameters(spiMode, spiSpeed, nullptr);
comIf->setSpiSpeedAndMode(fileDescriptor, spiMode, spiSpeed); comIf->setSpiSpeedAndMode(fileDescriptor, spiMode, spiSpeed);
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) {
sif::debug << "rwSpiCallback::spiCallback: Mutex or GPIO interface invalid" << std::endl;
return HasReturnvaluesIF::RETURN_FAILED;
}
result = mutex->lockMutex(timeoutType, timeoutMs); result = mutex->lockMutex(timeoutType, timeoutMs);
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != HasReturnvaluesIF::RETURN_OK) {
sif::debug << "rwSpiCallback::spiCallback: Failed to lock mutex" << std::endl; sif::debug << "rwSpiCallback::spiCallback: Failed to lock mutex" << std::endl;
@ -119,7 +119,7 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie *cookie, const uint8_t *sen
size_t replyBufferSize = cookie->getMaxBufferSize(); size_t replyBufferSize = cookie->getMaxBufferSize();
/** There must be a delay of 20 ms after sending the command */ /** There must be a delay of at least 20 ms after sending the command */
usleep(RwDefinitions::SPI_REPLY_DELAY); usleep(RwDefinitions::SPI_REPLY_DELAY);
/** /**

View File

@ -100,11 +100,21 @@ void initmission::initTasks() {
#if OBSW_USE_CCSDS_IP_CORE == 1 #if OBSW_USE_CCSDS_IP_CORE == 1
PeriodicTaskIF* ccsdsHandlerTask = factory->createPeriodicTask( PeriodicTaskIF* ccsdsHandlerTask = factory->createPeriodicTask(
"UDP_POLLING", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc); "CCSDS_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
result = ccsdsHandlerTask->addComponent(objects::CCSDS_HANDLER); result = ccsdsHandlerTask->addComponent(objects::CCSDS_HANDLER);
if(result != HasReturnvaluesIF::RETURN_OK) { if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("CCSDS Handler", objects::CCSDS_HANDLER); initmission::printAddObjectError("CCSDS Handler", objects::CCSDS_HANDLER);
} }
// Minimal distance between two received TCs amounts to 0.6 seconds
// If a command has not been read before the next one arrives, the old command will be
// overwritten by the PDEC.
PeriodicTaskIF* pdecHandlerTask = factory->createPeriodicTask(
"PDEC_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
result = pdecHandlerTask->addComponent(objects::PDEC_HANDLER);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PDEC Handler", objects::PDEC_HANDLER);
}
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */ #endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
# if BOARD_TE0720 == 0 # if BOARD_TE0720 == 0
@ -158,6 +168,7 @@ void initmission::initTasks() {
#if OBSW_USE_CCSDS_IP_CORE == 1 #if OBSW_USE_CCSDS_IP_CORE == 1
ccsdsHandlerTask->startTask(); ccsdsHandlerTask->startTask();
pdecHandlerTask->startTask();
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */ #endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
#if BOARD_TE0720 == 0 #if BOARD_TE0720 == 0

View File

@ -76,8 +76,11 @@
#endif #endif
#include <linux/obc/Ptme.h> #include <linux/obc/Ptme.h>
#include <linux/obc/PdecHandler.h>
#include <linux/obc/PapbVcInterface.h> #include <linux/obc/PapbVcInterface.h>
#include <linux/obc/PtmeConfig.h> #include <linux/obc/PtmeConfig.h>
#include <linux/obc/PtmeRateSetter.h>
#include <linux/obc/TxRateSetterIF.h>
ResetArgs resetArgsGnss0; ResetArgs resetArgsGnss0;
ResetArgs resetArgsGnss1; ResetArgs resetArgsGnss1;
@ -171,7 +174,7 @@ void ObjectFactory::produce(void* args) {
new StarTrackerHandler(objects::START_TRACKER, objects::UART_COM_IF, starTrackerCookie); new StarTrackerHandler(objects::START_TRACKER, objects::UART_COM_IF, starTrackerCookie);
#endif /* OBSW_ADD_STAR_TRACKER == 1 */ #endif /* OBSW_ADD_STAR_TRACKER == 1 */
#endif /* TE7020 != 0 */ #endif /* TE7020 == 0 */
#if OBSW_USE_CCSDS_IP_CORE == 1 #if OBSW_USE_CCSDS_IP_CORE == 1
createCcsdsComponents(gpioComIF); createCcsdsComponents(gpioComIF);
@ -935,7 +938,20 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF *gpioComIF) {
ptme->addVcInterface(ccsds::VC2, vc2); ptme->addVcInterface(ccsds::VC2, vc2);
ptme->addVcInterface(ccsds::VC3, vc3); ptme->addVcInterface(ccsds::VC3, vc3);
CCSDSHandler* ccsdsHandler = new CCSDSHandler(objects::CCSDS_HANDLER, objects::PTME); GpioCookie* gpioCookieRateSetter = new GpioCookie;
consumer.str("");
consumer << "ptme rate setter";
// Init to low -> default bit rate is low bit rate (200 kbps in downlink with syrlinks)
gpio = new GpiodRegularByLineName(q7s::gpioNames::BIT_RATE_SEL, consumer.str(), gpio::OUT,
gpio::LOW);
gpioCookieRateSetter->addGpio(gpioIds::BIT_RATE_SEL, gpio);
gpioComIF->addGpios(gpioCookieRateSetter);
TxRateSetterIF* txRateSetterIF = new PtmeRateSetter(gpioIds::BIT_RATE_SEL, gpioComIF);
CCSDSHandler* ccsdsHandler = new CCSDSHandler(objects::CCSDS_HANDLER, objects::PTME,
objects::CCSDS_PACKET_DISTRIBUTOR, txRateSetterIF, gpioComIF,
gpioIds::RS485_EN_TX_CLOCK, gpioIds::RS485_EN_TX_DATA);
VirtualChannel* vc = nullptr; VirtualChannel* vc = nullptr;
vc = new VirtualChannel(ccsds::VC0, common::VC0_QUEUE_SIZE); vc = new VirtualChannel(ccsds::VC0, common::VC0_QUEUE_SIZE);
@ -947,15 +963,39 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF *gpioComIF) {
vc = new VirtualChannel(ccsds::VC3, common::VC3_QUEUE_SIZE); vc = new VirtualChannel(ccsds::VC3, common::VC3_QUEUE_SIZE);
ccsdsHandler->addVirtualChannel(ccsds::VC3, vc); ccsdsHandler->addVirtualChannel(ccsds::VC3, vc);
GpioCookie* gpioCookiePdec = new GpioCookie;
consumer.str("");
consumer << "0x" << std::hex << objects::PDEC_HANDLER;
// GPIO also low after linux boot (specified by device-tree)
gpio = new GpiodRegularByLineName(q7s::gpioNames::PDEC_RESET, consumer.str(), gpio::OUT,
gpio::LOW);
gpioCookiePdec->addGpio(gpioIds::PDEC_RESET, gpio);
gpioComIF->addGpios(gpioCookiePdec);
new PdecHandler(objects::PDEC_HANDLER, objects::CCSDS_HANDLER, gpioComIF, gpioIds::PDEC_RESET,
std::string(q7s::UIO_PDEC_CONFIG_MEMORY), std::string(q7s::UIO_PDEC_RAM),
std::string(q7s::UIO_PDEC_REGISTERS));
#if BOARD_TE0720 == 0
GpioCookie* gpioRS485Chip = new GpioCookie; GpioCookie* gpioRS485Chip = new GpioCookie;
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_TX_CLOCK, "RS485 Transceiver", gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_TX_CLOCK, "RS485 Transceiver",
gpio::Direction::OUT, gpio::HIGH); gpio::Direction::OUT, gpio::LOW);
gpioRS485Chip->addGpio(gpioIds::RS485_EN_TX_CLOCK, gpio); gpioRS485Chip->addGpio(gpioIds::RS485_EN_TX_CLOCK, gpio);
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_TX_DATA, "RS485 Transceiver", gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_TX_DATA, "RS485 Transceiver",
gpio::Direction::OUT, gpio::HIGH); gpio::Direction::OUT, gpio::LOW);
gpioRS485Chip->addGpio(gpioIds::RS485_EN_TX_DATA, gpio); gpioRS485Chip->addGpio(gpioIds::RS485_EN_TX_DATA, gpio);
// Default configuration enables RX channels (RXEN = LOW)
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_RX_CLOCK, "RS485 Transceiver",
gpio::Direction::OUT, gpio::LOW);
gpioRS485Chip->addGpio(gpioIds::RS485_EN_RX_CLOCK, gpio);
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_RX_DATA, "RS485 Transceiver",
gpio::Direction::OUT, gpio::LOW);
gpioRS485Chip->addGpio(gpioIds::RS485_EN_RX_DATA, gpio);
gpioComIF->addGpios(gpioRS485Chip); gpioComIF->addGpios(gpioRS485Chip);
#endif /* BOARD_TE0720 == 0 */
} }
void ObjectFactory::createTestComponents(LinuxLibgpioIF* gpioComIF) { void ObjectFactory::createTestComponents(LinuxLibgpioIF* gpioComIF) {

View File

@ -27,14 +27,25 @@ void initSpiCsDecoder(GpioIF* gpioComIF) {
GpiodRegularByLineName* spiMuxBit = nullptr; GpiodRegularByLineName* spiMuxBit = nullptr;
/** Setting mux bit 1 to low will disable IC21 on the interface board */ /** Setting mux bit 1 to low will disable IC21 on the interface board */
spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_1_PIN, "SPI Mux Bit 1", spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_1_PIN, "SPI Mux Bit 1",
gpio::OUT, gpio::LOW); gpio::OUT, gpio::HIGH);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_1, spiMuxBit); spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_1, spiMuxBit);
/** Setting mux bit 2 to low disables IC1 on the TCS board */ /** Setting mux bit 2 to low disables IC1 on the TCS board */
spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_2_PIN, "SPI Mux Bit 2", gpio::OUT, gpio::LOW); spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_2_PIN, "SPI Mux Bit 2", gpio::OUT, gpio::HIGH);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_2, spiMuxBit); spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_2, spiMuxBit);
/** Setting mux bit 3 to low disables IC2 on the TCS board and IC22 on the interface board */ /** Setting mux bit 3 to low disables IC2 on the TCS board and IC22 on the interface board */
spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_3_PIN, "SPI Mux Bit 3", gpio::OUT, gpio::LOW); spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_3_PIN, "SPI Mux Bit 3", gpio::OUT, gpio::LOW);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_3, spiMuxBit); spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_3, spiMuxBit);
// spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_1_PIN, "SPI Mux Bit 1",
// gpio::OUT, gpio::LOW);
// spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_1, spiMuxBit);
// /** Setting mux bit 2 to low disables IC1 on the TCS board */
// spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_2_PIN, "SPI Mux Bit 2", gpio::OUT, gpio::HIGH);
// spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_2, spiMuxBit);
// /** Setting mux bit 3 to low disables IC2 on the TCS board and IC22 on the interface board */
// spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_3_PIN, "SPI Mux Bit 3", gpio::OUT, gpio::LOW);
// spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_3, spiMuxBit);
/** The following gpios can take arbitrary initial values */ /** The following gpios can take arbitrary initial values */
spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_4_PIN, "SPI Mux Bit 4", gpio::OUT, gpio::LOW); spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_4_PIN, "SPI Mux Bit 4", gpio::OUT, gpio::LOW);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_4, spiMuxBit); spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_4, spiMuxBit);
@ -68,173 +79,308 @@ void spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gpioOp, gpio::Lev
} }
if (value == gpio::HIGH) { if (value == gpio::HIGH) {
disableAllDecoder(); switch (gpioId) {
case(gpioIds::RTD_IC_3): {
disableDecoderTcsIc1();
break;
}
case(gpioIds::RTD_IC_4): {
disableDecoderTcsIc1();
break;
}
case(gpioIds::RTD_IC_5): {
disableDecoderTcsIc1();
break;
}
case(gpioIds::RTD_IC_6): {
disableDecoderTcsIc1();
break;
}
case(gpioIds::RTD_IC_7): {
disableDecoderTcsIc1();
break;
}
case(gpioIds::RTD_IC_8): {
disableDecoderTcsIc1();
break;
}
case(gpioIds::RTD_IC_9): {
disableDecoderTcsIc1();
break;
}
case(gpioIds::RTD_IC_10): {
disableDecoderTcsIc1();
break;
}
case(gpioIds::RTD_IC_11): {
disableDecoderTcsIc2();
break;
}
case(gpioIds::RTD_IC_12): {
disableDecoderTcsIc2();
break;
}
case(gpioIds::RTD_IC_13): {
disableDecoderTcsIc2();
break;
}
case(gpioIds::RTD_IC_14): {
disableDecoderTcsIc2();
break;
}
case(gpioIds::RTD_IC_15): {
disableDecoderTcsIc2();
break;
}
case(gpioIds::RTD_IC_16): {
disableDecoderTcsIc2();
break;
}
case(gpioIds::RTD_IC_17): {
disableDecoderTcsIc2();
break;
}
case(gpioIds::RTD_IC_18): {
disableDecoderTcsIc2();
break;
}
case(gpioIds::CS_SUS_1): {
disableDecoderInterfaceBoardIc1();
break;
}
case(gpioIds::CS_SUS_2): {
disableDecoderInterfaceBoardIc1();
break;
}
case(gpioIds::CS_SUS_3): {
disableDecoderInterfaceBoardIc2();
break;
}
case(gpioIds::CS_SUS_4): {
disableDecoderInterfaceBoardIc2();
break;
}
case(gpioIds::CS_SUS_5): {
disableDecoderInterfaceBoardIc2();
break;
}
case(gpioIds::CS_SUS_6): {
disableDecoderInterfaceBoardIc1();
break;
}
case(gpioIds::CS_SUS_7): {
disableDecoderInterfaceBoardIc1();
break;
}
case(gpioIds::CS_SUS_8): {
disableDecoderInterfaceBoardIc2();
break;
}
case(gpioIds::CS_SUS_9): {
disableDecoderInterfaceBoardIc1();
break;
}
case(gpioIds::CS_SUS_10): {
disableDecoderInterfaceBoardIc1();
break;
}
case(gpioIds::CS_SUS_11): {
disableDecoderInterfaceBoardIc2();
break;
}
case(gpioIds::CS_SUS_12): {
disableDecoderInterfaceBoardIc2();
break;
}
case(gpioIds::CS_SUS_13): {
disableDecoderInterfaceBoardIc1();
break;
}
case(gpioIds::CS_RW1): {
disableRwDecoder();
break;
}
case(gpioIds::CS_RW2): {
disableRwDecoder();
break;
}
case(gpioIds::CS_RW3): {
disableRwDecoder();
break;
}
case(gpioIds::CS_RW4): {
disableRwDecoder();
break;
}
default:
sif::debug << "spiCsDecoderCallback: Invalid gpio id " << gpioId << std::endl;
}
} }
else if (value == gpio::LOW) { else if (value == gpio::LOW) {
switch (gpioId) { switch (gpioId) {
case(gpioIds::RTD_IC_3): { case(gpioIds::RTD_IC_3): {
selectY7();
enableDecoderTcsIc1(); enableDecoderTcsIc1();
selectY7();
break; break;
} }
case(gpioIds::RTD_IC_4): { case(gpioIds::RTD_IC_4): {
selectY6();
enableDecoderTcsIc1(); enableDecoderTcsIc1();
selectY6();
break; break;
} }
case(gpioIds::RTD_IC_5): { case(gpioIds::RTD_IC_5): {
selectY5();
enableDecoderTcsIc1(); enableDecoderTcsIc1();
selectY5();
break; break;
} }
case(gpioIds::RTD_IC_6): { case(gpioIds::RTD_IC_6): {
selectY4();
enableDecoderTcsIc1(); enableDecoderTcsIc1();
selectY4();
break; break;
} }
case(gpioIds::RTD_IC_7): { case(gpioIds::RTD_IC_7): {
selectY3();
enableDecoderTcsIc1(); enableDecoderTcsIc1();
selectY3();
break; break;
} }
case(gpioIds::RTD_IC_8): { case(gpioIds::RTD_IC_8): {
selectY2();
enableDecoderTcsIc1(); enableDecoderTcsIc1();
selectY2();
break; break;
} }
case(gpioIds::RTD_IC_9): { case(gpioIds::RTD_IC_9): {
selectY1();
enableDecoderTcsIc1(); enableDecoderTcsIc1();
selectY1();
break; break;
} }
case(gpioIds::RTD_IC_10): { case(gpioIds::RTD_IC_10): {
selectY0();
enableDecoderTcsIc1(); enableDecoderTcsIc1();
selectY0();
break; break;
} }
case(gpioIds::RTD_IC_11): { case(gpioIds::RTD_IC_11): {
selectY7();
enableDecoderTcsIc2(); enableDecoderTcsIc2();
selectY7();
break; break;
} }
case(gpioIds::RTD_IC_12): { case(gpioIds::RTD_IC_12): {
selectY6();
enableDecoderTcsIc2(); enableDecoderTcsIc2();
selectY6();
break; break;
} }
case(gpioIds::RTD_IC_13): { case(gpioIds::RTD_IC_13): {
selectY5();
enableDecoderTcsIc2(); enableDecoderTcsIc2();
selectY5();
break; break;
} }
case(gpioIds::RTD_IC_14): { case(gpioIds::RTD_IC_14): {
selectY4();
enableDecoderTcsIc2(); enableDecoderTcsIc2();
selectY4();
break; break;
} }
case(gpioIds::RTD_IC_15): { case(gpioIds::RTD_IC_15): {
selectY3();
enableDecoderTcsIc2(); enableDecoderTcsIc2();
selectY3();
break; break;
} }
case(gpioIds::RTD_IC_16): { case(gpioIds::RTD_IC_16): {
selectY2();
enableDecoderTcsIc2(); enableDecoderTcsIc2();
selectY2();
break; break;
} }
case(gpioIds::RTD_IC_17): { case(gpioIds::RTD_IC_17): {
selectY1();
enableDecoderTcsIc2(); enableDecoderTcsIc2();
selectY1();
break; break;
} }
case(gpioIds::RTD_IC_18): { case(gpioIds::RTD_IC_18): {
selectY0();
enableDecoderTcsIc2(); enableDecoderTcsIc2();
selectY0();
break; break;
} }
case(gpioIds::CS_SUS_1): { case(gpioIds::CS_SUS_1): {
selectY0();
enableDecoderInterfaceBoardIc1(); enableDecoderInterfaceBoardIc1();
selectY0();
break; break;
} }
case(gpioIds::CS_SUS_2): { case(gpioIds::CS_SUS_2): {
selectY1();
enableDecoderInterfaceBoardIc1(); enableDecoderInterfaceBoardIc1();
selectY1();
break; break;
} }
case(gpioIds::CS_SUS_3): { case(gpioIds::CS_SUS_3): {
selectY0();
enableDecoderInterfaceBoardIc2(); enableDecoderInterfaceBoardIc2();
selectY0();
break; break;
} }
case(gpioIds::CS_SUS_4): { case(gpioIds::CS_SUS_4): {
selectY1();
enableDecoderInterfaceBoardIc2(); enableDecoderInterfaceBoardIc2();
selectY1();
break; break;
} }
case(gpioIds::CS_SUS_5): { case(gpioIds::CS_SUS_5): {
selectY2();
enableDecoderInterfaceBoardIc2(); enableDecoderInterfaceBoardIc2();
selectY2();
break; break;
} }
case(gpioIds::CS_SUS_6): { case(gpioIds::CS_SUS_6): {
selectY2();
enableDecoderInterfaceBoardIc1(); enableDecoderInterfaceBoardIc1();
selectY2();
break; break;
} }
case(gpioIds::CS_SUS_7): { case(gpioIds::CS_SUS_7): {
selectY3();
enableDecoderInterfaceBoardIc1(); enableDecoderInterfaceBoardIc1();
selectY3();
break; break;
} }
case(gpioIds::CS_SUS_8): { case(gpioIds::CS_SUS_8): {
selectY3();
enableDecoderInterfaceBoardIc2(); enableDecoderInterfaceBoardIc2();
selectY3();
break; break;
} }
case(gpioIds::CS_SUS_9): { case(gpioIds::CS_SUS_9): {
selectY4();
enableDecoderInterfaceBoardIc1(); enableDecoderInterfaceBoardIc1();
selectY4();
break; break;
} }
case(gpioIds::CS_SUS_10): { case(gpioIds::CS_SUS_10): {
selectY5();
enableDecoderInterfaceBoardIc1(); enableDecoderInterfaceBoardIc1();
selectY5();
break; break;
} }
case(gpioIds::CS_SUS_11): { case(gpioIds::CS_SUS_11): {
selectY4();
enableDecoderInterfaceBoardIc2(); enableDecoderInterfaceBoardIc2();
selectY4();
break; break;
} }
case(gpioIds::CS_SUS_12): { case(gpioIds::CS_SUS_12): {
selectY5();
enableDecoderInterfaceBoardIc2(); enableDecoderInterfaceBoardIc2();
selectY5();
break; break;
} }
case(gpioIds::CS_SUS_13): { case(gpioIds::CS_SUS_13): {
selectY6();
enableDecoderInterfaceBoardIc1(); enableDecoderInterfaceBoardIc1();
selectY6();
break; break;
} }
case(gpioIds::CS_RW1): { case(gpioIds::CS_RW1): {
selectY0();
enableRwDecoder(); enableRwDecoder();
selectY0();
break; break;
} }
case(gpioIds::CS_RW2): { case(gpioIds::CS_RW2): {
selectY1();
enableRwDecoder(); enableRwDecoder();
selectY1();
break; break;
} }
case(gpioIds::CS_RW3): { case(gpioIds::CS_RW3): {
selectY2();
enableRwDecoder(); enableRwDecoder();
selectY2();
break; break;
} }
case(gpioIds::CS_RW4): { case(gpioIds::CS_RW4): {
selectY3();
enableRwDecoder(); enableRwDecoder();
selectY3();
break; break;
} }
default: default:
@ -253,9 +399,9 @@ void enableDecoderTcsIc1() {
} }
void enableDecoderTcsIc2() { void enableDecoderTcsIc2() {
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_3);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_1); gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_1);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_2); gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_2);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_3);
} }
void enableDecoderInterfaceBoardIc1() { void enableDecoderInterfaceBoardIc1() {
@ -266,15 +412,41 @@ void enableDecoderInterfaceBoardIc1() {
void enableDecoderInterfaceBoardIc2() { void enableDecoderInterfaceBoardIc2() {
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_1); gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_1);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_2); gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_2);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_3); gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_3);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_2);
}
void disableDecoderTcsIc1() {
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_1);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_2);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_3);
}
void disableDecoderTcsIc2() {
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_1);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_3);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_2);
}
void disableDecoderInterfaceBoardIc1() {
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_1);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_2);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_3);
}
void disableDecoderInterfaceBoardIc2() {
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_1);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_2);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_3);
} }
void enableRwDecoder() { void enableRwDecoder() {
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_1); gpioComInterface->pullHigh(gpioIds::EN_RW_CS);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_2); }
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_3);
gpioComInterface->pullHigh(gpioIds::EN_RW_CS); void disableRwDecoder() {
gpioComInterface->pullLow(gpioIds::EN_RW_CS);
} }
void selectY0() { void selectY0() {
@ -326,9 +498,9 @@ void selectY7() {
} }
void disableAllDecoder() { void disableAllDecoder() {
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_3);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_1); gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_1);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_2); gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_2);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_3);
gpioComInterface->pullLow(gpioIds::EN_RW_CS); gpioComInterface->pullLow(gpioIds::EN_RW_CS);
} }

View File

@ -44,10 +44,16 @@ namespace gpioCallbacks {
*/ */
void enableDecoderInterfaceBoardIc2(); void enableDecoderInterfaceBoardIc2();
void disableDecoderTcsIc1();
void disableDecoderTcsIc2();
void disableDecoderInterfaceBoardIc1();
void disableDecoderInterfaceBoardIc2();
/** /**
* @brief Enables the reaction wheel chip select decoder (IC3). * @brief Enables the reaction wheel chip select decoder (IC3).
*/ */
void enableRwDecoder(); void enableRwDecoder();
void disableRwDecoder();
/** /**
* @brief This function disables all decoder. * @brief This function disables all decoder.

View File

@ -133,15 +133,14 @@ ReturnValue_t FileSystemHandler::initialize() {
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }
ReturnValue_t FileSystemHandler::appendToFile(const char *repositoryPath, const char *filename, ReturnValue_t FileSystemHandler::appendToFile(const char* repositoryPath,
const uint8_t *data, size_t size, uint16_t packetNumber, void *args) { const char* filename, const uint8_t* data, size_t size,
// A double slash between repo and filename should not be an issue, so add it in any case uint16_t packetNumber, FileSystemArgsIF* args) {
std::string fullPath = currentMountPrefix + std::string(repositoryPath) + "/" + auto path = getInitPath(args) / repositoryPath / filename;
std::string(filename); if(not std::filesystem::exists(path)) {
if(not std::filesystem::exists(fullPath)) {
return FILE_DOES_NOT_EXIST; return FILE_DOES_NOT_EXIST;
} }
std::ofstream file(fullPath, std::ios_base::app|std::ios_base::out); std::ofstream file(path, std::ios_base::app|std::ios_base::out);
file.write(reinterpret_cast<const char*>(data), size); file.write(reinterpret_cast<const char*>(data), size);
if(not file.good()) { if(not file.good()) {
return GENERIC_FILE_ERROR; return GENERIC_FILE_ERROR;
@ -149,21 +148,13 @@ ReturnValue_t FileSystemHandler::appendToFile(const char *repositoryPath, const
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }
ReturnValue_t FileSystemHandler::createFile(const char *repositoryPath, const char *filename, ReturnValue_t FileSystemHandler::createFile(const char* repositoryPath,
const uint8_t *data, size_t size, void *args) { const char* filename, const uint8_t* data, size_t size, FileSystemArgsIF* args) {
std::string fullPath; auto path = getInitPath(args) / filename;
bool useMountPrefix = true; if(std::filesystem::exists(path)) {
parseCfg(reinterpret_cast<FsCommandCfg*>(args), useMountPrefix);
if(useMountPrefix) {
fullPath += currentMountPrefix;
}
// A double slash between repo and filename should not be an issue, so add it in any case
fullPath += std::string(repositoryPath) + "/" + std::string(filename);
if(std::filesystem::exists(fullPath)) {
return FILE_ALREADY_EXISTS; return FILE_ALREADY_EXISTS;
} }
std::ofstream file(fullPath); std::ofstream file(path);
file.write(reinterpret_cast<const char*>(data), size); file.write(reinterpret_cast<const char*>(data), size);
if(not file.good()) { if(not file.good()) {
return GENERIC_FILE_ERROR; return GENERIC_FILE_ERROR;
@ -171,21 +162,13 @@ ReturnValue_t FileSystemHandler::createFile(const char *repositoryPath, const ch
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }
ReturnValue_t FileSystemHandler::removeFile(const char *repositoryPath, const char *filename, ReturnValue_t FileSystemHandler::removeFile(const char* repositoryPath,
void *args) { const char* filename, FileSystemArgsIF* args) {
std::string fullPath; auto path = getInitPath(args) / repositoryPath / filename;
bool useMountPrefix = true; if(not std::filesystem::exists(path)) {
parseCfg(reinterpret_cast<FsCommandCfg*>(args), useMountPrefix);
if(useMountPrefix) {
fullPath += currentMountPrefix;
}
// A double slash between repo and filename should not be an issue, so add it in any case
fullPath += std::string(repositoryPath) + "/" + std::string(filename);
if(not std::filesystem::exists(fullPath)) {
return FILE_DOES_NOT_EXIST; return FILE_DOES_NOT_EXIST;
} }
int result = std::remove(fullPath.c_str()); int result = std::remove(path.c_str());
if(result != 0) { if(result != 0) {
sif::warning << "FileSystemHandler::deleteFile: Failed with code " << result << std::endl; sif::warning << "FileSystemHandler::deleteFile: Failed with code " << result << std::endl;
return GENERIC_FILE_ERROR; return GENERIC_FILE_ERROR;
@ -193,41 +176,28 @@ ReturnValue_t FileSystemHandler::removeFile(const char *repositoryPath, const ch
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }
ReturnValue_t FileSystemHandler::createDirectory(const char *repositoryPath, void *args) { ReturnValue_t FileSystemHandler:: createDirectory(const char* repositoryPath, const char* dirname,
std::string fullPath; bool createParentDirs, FileSystemArgsIF* args) {
bool useMountPrefix = true; auto path = getInitPath(args) / repositoryPath / dirname;
parseCfg(reinterpret_cast<FsCommandCfg*>(args), useMountPrefix); if(std::filesystem::exists(path)) {
if(useMountPrefix) {
fullPath += currentMountPrefix;
}
fullPath += std::string(repositoryPath);
if(std::filesystem::exists(fullPath)) {
return DIRECTORY_ALREADY_EXISTS; return DIRECTORY_ALREADY_EXISTS;
} }
if(std::filesystem::create_directory(fullPath)) { if(std::filesystem::create_directory(path)) {
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }
sif::warning << "Creating directory " << fullPath << " failed" << std::endl; sif::warning << "Creating directory " << path << " failed" << std::endl;
return GENERIC_FILE_ERROR; return GENERIC_FILE_ERROR;
} }
ReturnValue_t FileSystemHandler::removeDirectory(const char *repositoryPath, ReturnValue_t FileSystemHandler::removeDirectory(const char* repositoryPath, const char* dirname,
bool deleteRecurively, void *args) { bool deleteRecurively, FileSystemArgsIF* args) {
std::string fullPath; auto path = getInitPath(args) / repositoryPath / dirname;
bool useMountPrefix = true; if(not std::filesystem::exists(path)) {
parseCfg(reinterpret_cast<FsCommandCfg*>(args), useMountPrefix);
if(useMountPrefix) {
fullPath += currentMountPrefix;
}
fullPath += std::string(repositoryPath);
if(not std::filesystem::exists(fullPath)) {
return DIRECTORY_DOES_NOT_EXIST; return DIRECTORY_DOES_NOT_EXIST;
} }
std::error_code err; std::error_code err;
if(not deleteRecurively) { if(not deleteRecurively) {
if(std::filesystem::remove(fullPath, err)) { if(std::filesystem::remove(path, err)) {
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }
else { else {
@ -244,7 +214,7 @@ ReturnValue_t FileSystemHandler::removeDirectory(const char *repositoryPath,
} }
} }
else { else {
if(std::filesystem::remove_all(fullPath, err)) { if(std::filesystem::remove_all(path, err)) {
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }
else { else {
@ -263,8 +233,25 @@ ReturnValue_t FileSystemHandler::removeDirectory(const char *repositoryPath,
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }
ReturnValue_t FileSystemHandler::renameFile(const char *repositoryPath, const char *oldFilename,
const char *newFilename, FileSystemArgsIF *args) {
auto basepath = getInitPath(args) / repositoryPath;
std::filesystem::rename(basepath / oldFilename, basepath / newFilename);
return HasReturnvaluesIF::RETURN_OK;
}
void FileSystemHandler::parseCfg(FsCommandCfg *cfg, bool& useMountPrefix) { void FileSystemHandler::parseCfg(FsCommandCfg *cfg, bool& useMountPrefix) {
if(cfg != nullptr) { if(cfg != nullptr) {
useMountPrefix = cfg->useMountPrefix; useMountPrefix = cfg->useMountPrefix;
} }
} }
std::filesystem::path FileSystemHandler::getInitPath(FileSystemArgsIF* args) {
bool useMountPrefix = true;
parseCfg(reinterpret_cast<FsCommandCfg*>(args), useMountPrefix);
std::string path;
if(useMountPrefix) {
path = currentMountPrefix;
}
return std::filesystem::path(path);
}

View File

@ -10,6 +10,7 @@
#include "fsfw/memory/HasFileSystemIF.h" #include "fsfw/memory/HasFileSystemIF.h"
#include <string> #include <string>
#include <filesystem>
class CoreController; class CoreController;
@ -17,7 +18,7 @@ class FileSystemHandler: public SystemObject,
public ExecutableObjectIF, public ExecutableObjectIF,
public HasFileSystemIF { public HasFileSystemIF {
public: public:
struct FsCommandCfg { struct FsCommandCfg: public FileSystemArgsIF {
// Can be used to automatically use mount prefix of active SD card. // Can be used to automatically use mount prefix of active SD card.
// Otherwise, the operator has to specify the full path to the mounted SD card as well. // Otherwise, the operator has to specify the full path to the mounted SD card as well.
bool useMountPrefix = false; bool useMountPrefix = false;
@ -35,18 +36,20 @@ public:
* @return MessageQueueId_t of the object * @return MessageQueueId_t of the object
*/ */
MessageQueueId_t getCommandQueue() const override; MessageQueueId_t getCommandQueue() const override;
ReturnValue_t appendToFile(const char* repositoryPath, ReturnValue_t appendToFile(const char* repositoryPath,
const char* filename, const uint8_t* data, size_t size, const char* filename, const uint8_t* data, size_t size,
uint16_t packetNumber, void* args = nullptr) override; uint16_t packetNumber, FileSystemArgsIF* args = nullptr) override;
ReturnValue_t createFile(const char* repositoryPath, ReturnValue_t createFile(const char* repositoryPath,
const char* filename, const uint8_t* data = nullptr, const char* filename, const uint8_t* data = nullptr,
size_t size = 0, void* args = nullptr) override; size_t size = 0, FileSystemArgsIF* args = nullptr) override;
ReturnValue_t removeFile(const char* repositoryPath, ReturnValue_t removeFile(const char* repositoryPath,
const char* filename, void* args = nullptr) override; const char* filename, FileSystemArgsIF* args = nullptr) override;
ReturnValue_t createDirectory(const char* repositoryPath, void* args = nullptr) override; ReturnValue_t createDirectory(const char* repositoryPath, const char* dirname,
ReturnValue_t removeDirectory(const char* repositoryPath, bool deleteRecurively = false, bool createParentDirs, FileSystemArgsIF* args = nullptr) override;
void* args = nullptr) override; ReturnValue_t removeDirectory(const char* repositoryPath, const char* dirname,
bool deleteRecurively = false, FileSystemArgsIF* args = nullptr) override;
ReturnValue_t renameFile(const char* repositoryPath, const char* oldFilename,
const char* newFilename, FileSystemArgsIF* args = nullptr) override;
private: private:
CoreController* coreCtrl = nullptr; CoreController* coreCtrl = nullptr;
@ -59,6 +62,7 @@ private:
void fileSystemHandlerLoop(); void fileSystemHandlerLoop();
void fileSystemCheckup(); void fileSystemCheckup();
std::filesystem::path getInitPath(FileSystemArgsIF* args);
void parseCfg(FsCommandCfg* cfg, bool& useMountPrefix); void parseCfg(FsCommandCfg* cfg, bool& useMountPrefix);
}; };

View File

@ -15,7 +15,7 @@ if [ "${counter}" -ge 5 ];then
exit 1 exit 1
fi fi
build_generator="Unix Makefiles" build_generator="make"
os_fsfw="host" os_fsfw="host"
builddir="build-Debug-Host" builddir="build-Debug-Host"
if [ "${OS}" = "Windows_NT" ]; then if [ "${OS}" = "Windows_NT" ]; then

View File

@ -15,7 +15,7 @@ if [ "${counter}" -ge 5 ];then
exit 1 exit 1
fi fi
build_generator="Unix Makefiles" build_generator="make"
os_fsfw="host" os_fsfw="host"
builddir="build-Release-Host" builddir="build-Release-Host"
if [ "${OS}" = "Windows_NT" ]; then if [ "${OS}" = "Windows_NT" ]; then

View File

@ -15,7 +15,7 @@ if [ "${counter}" -ge 5 ];then
exit 1 exit 1
fi fi
build_generator="Ninja" build_generator="ninja"
os_fsfw="host" os_fsfw="host"
builddir="build-Debug-Host" builddir="build-Debug-Host"
if [ "${OS}" = "Windows_NT" ]; then if [ "${OS}" = "Windows_NT" ]; then

View File

@ -15,7 +15,7 @@ if [ "${counter}" -ge 5 ];then
exit 1 exit 1
fi fi
build_generator="Unix Makefiles" build_generator="make"
os_fsfw="linux" os_fsfw="linux"
builddir="build-Debug-Host" builddir="build-Debug-Host"
if [ "${OS}" = "Windows_NT" ]; then if [ "${OS}" = "Windows_NT" ]; then

View File

@ -15,7 +15,7 @@ if [ "${counter}" -ge 5 ];then
exit 1 exit 1
fi fi
build_generator="Ninja" build_generator="ninja"
os_fsfw="linux" os_fsfw="linux"
builddir="build-Debug-Host" builddir="build-Debug-Host"
if [ "${OS}" = "Windows_NT" ]; then if [ "${OS}" = "Windows_NT" ]; then

View File

@ -18,13 +18,11 @@ fi
os_fsfw="linux" os_fsfw="linux"
tgt_bsp="arm/q7s" tgt_bsp="arm/q7s"
build_dir="build-Debug-Q7S" build_dir="build-Debug-Q7S"
build_generator="" build_generator="make"
if [ "${OS}" = "Windows_NT" ]; then if [ "${OS}" = "Windows_NT" ]; then
build_generator="MinGW Makefiles"
python="py" python="py"
# Could be other OS but this works for now. # Could be other OS but this works for now.
else else
build_generator="Unix Makefiles"
python="python3" python="python3"
fi fi

View File

@ -18,13 +18,11 @@ fi
os_fsfw="linux" os_fsfw="linux"
tgt_bsp="arm/q7s" tgt_bsp="arm/q7s"
build_dir="build-Debug-Q7S" build_dir="build-Debug-Q7S"
build_generator="" build_generator="make"
if [ "${OS}" = "Windows_NT" ]; then if [ "${OS}" = "Windows_NT" ]; then
build_generator="MinGW Makefiles"
python="py" python="py"
# Could be other OS but this works for now. # Could be other OS but this works for now.
else else
build_generator="Unix Makefiles"
python="python3" python="python3"
fi fi

View File

@ -18,7 +18,7 @@ fi
os_fsfw="linux" os_fsfw="linux"
tgt_bsp="arm/q7s" tgt_bsp="arm/q7s"
build_dir="build-Debug-Q7S" build_dir="build-Debug-Q7S"
build_generator="Ninja" build_generator="ninja"
if [ "${OS}" = "Windows_NT" ]; then if [ "${OS}" = "Windows_NT" ]; then
python="py" python="py"
# Could be other OS but this works for now. # Could be other OS but this works for now.

View File

@ -18,7 +18,7 @@ fi
os_fsfw="linux" os_fsfw="linux"
tgt_bsp="arm/q7s" tgt_bsp="arm/q7s"
build_dir="build-Release-Q7S" build_dir="build-Release-Q7S"
build_generator="Ninja" build_generator="ninja"
if [ "${OS}" = "Windows_NT" ]; then if [ "${OS}" = "Windows_NT" ]; then
python="py" python="py"
# Could be other OS but this works for now. # Could be other OS but this works for now.

View File

@ -18,14 +18,12 @@ fi
os_fsfw="linux" os_fsfw="linux"
tgt_bsp="arm/raspberrypi" tgt_bsp="arm/raspberrypi"
build_generator="" build_generator="make"
build_dir="build-Debug-RPi" build_dir="build-Debug-RPi"
if [ "${OS}" = "Windows_NT" ]; then if [ "${OS}" = "Windows_NT" ]; then
build_generator="MinGW Makefiles"
python="py" python="py"
# Could be other OS but this works for now. # Could be other OS but this works for now.
else else
build_generator="Unix Makefiles"
python="python3" python="python3"
fi fi

View File

@ -17,7 +17,7 @@ fi
os_fsfw="linux" os_fsfw="linux"
tgt_bsp="arm/raspberrypi" tgt_bsp="arm/raspberrypi"
build_generator="Ninja" build_generator="ninja"
build_dir="build-Debug-RPi" build_dir="build-Debug-RPi"
if [ "${OS}" = "Windows_NT" ]; then if [ "${OS}" = "Windows_NT" ]; then
python="py" python="py"

View File

@ -29,7 +29,9 @@ def main():
"Information)", default="debug" "Information)", default="debug"
) )
parser.add_argument("-l", "--builddir", type=str, help="Specify build directory.") parser.add_argument("-l", "--builddir", type=str, help="Specify build directory.")
parser.add_argument("-g", "--generator", type=str, help="CMake Generator") parser.add_argument(
"-g", "--generator", type=str, help="CMake Generator", choices=['make', 'ninja']
)
parser.add_argument( parser.add_argument(
"-d", "--defines", "-d", "--defines",
help="Additional custom defines passed to CMake (supply without -D prefix!)", help="Additional custom defines passed to CMake (supply without -D prefix!)",
@ -56,7 +58,15 @@ def main():
if args.generator is None: if args.generator is None:
generator_cmake_arg = "" generator_cmake_arg = ""
else: else:
generator_cmake_arg = f"-G \"{args.generator}\"" if args.generator == 'make':
if os.name == 'nt':
generator_cmake_arg = '-G "MinGW Makefiles"'
else:
generator_cmake_arg = '-G "Unix Makefiles"'
elif args.generator == 'ninja':
generator_cmake_arg = '-G Ninja'
else:
generator_cmake_arg = args.generator
if args.buildtype == "debug": if args.buildtype == "debug":
cmake_build_type = "Debug" cmake_build_type = "Debug"

View File

@ -21,6 +21,8 @@ enum commonClassIds: uint8_t {
PLOC_UPDATER, //PLUD PLOC_UPDATER, //PLUD
GOM_SPACE_HANDLER, //GOMS GOM_SPACE_HANDLER, //GOMS
PLOC_MEMORY_DUMPER, //PLMEMDUMP PLOC_MEMORY_DUMPER, //PLMEMDUMP
PDEC_HANDLER, //PDEC
CCSDS_HANDLER, //PDEC
COMMON_CLASS_ID_END // [EXPORT] : [END] COMMON_CLASS_ID_END // [EXPORT] : [END]
}; };

View File

@ -2,4 +2,4 @@
#include "tmtc/apid.h" #include "tmtc/apid.h"
#include "fsfw/tmtcpacket/SpacePacket.h" #include "fsfw/tmtcpacket/SpacePacket.h"
const uint16_t common::TC_PACKET_ID = spacepacket::getTcSpacePacketIdFromApid(apid::EIVE_OBSW); const uint16_t common::PUS_PACKET_ID = spacepacket::getTcSpacePacketIdFromApid(apid::EIVE_OBSW);

View File

@ -15,7 +15,7 @@
#define OBSW_USE_TCP_BRIDGE 1 #define OBSW_USE_TCP_BRIDGE 1
namespace common { namespace common {
extern const uint16_t TC_PACKET_ID; extern const uint16_t PUS_PACKET_ID;
static constexpr uint32_t CCSDS_HANDLER_QUEUE_SIZE = 50; static constexpr uint32_t CCSDS_HANDLER_QUEUE_SIZE = 50;
static constexpr uint8_t NUMBER_OF_VIRTUAL_CHANNELS = 4; static constexpr uint8_t NUMBER_OF_VIRTUAL_CHANNELS = 4;

View File

@ -16,6 +16,7 @@ enum commonObjects: uint32_t {
PAPB_VC1 = 0x50000701, PAPB_VC1 = 0x50000701,
PAPB_VC2 = 0x50000702, PAPB_VC2 = 0x50000702,
PAPB_VC3 = 0x50000703, PAPB_VC3 = 0x50000703,
PDEC_HANDLER = 0x50000704,
CCSDS_HANDLER = 0x50000800, CCSDS_HANDLER = 0x50000800,
/* 0x43 ('C') for Controllers */ /* 0x43 ('C') for Controllers */

View File

@ -17,6 +17,7 @@ enum: uint8_t {
FILE_SYSTEM = 116, FILE_SYSTEM = 116,
PLOC_UPDATER = 117, PLOC_UPDATER = 117,
PLOC_MEMORY_DUMPER = 118, PLOC_MEMORY_DUMPER = 118,
PDEC_HANDLER = 119,
COMMON_SUBSYSTEM_ID_END COMMON_SUBSYSTEM_ID_END
}; };
} }

View File

@ -33,6 +33,7 @@ static constexpr uint32_t RW_SPEED = 300'000;
static constexpr spi::SpiModes RW_MODE = spi::SpiModes::MODE_0; static constexpr spi::SpiModes RW_MODE = spi::SpiModes::MODE_0;
static constexpr uint32_t RTD_SPEED = 2'000'000; static constexpr uint32_t RTD_SPEED = 2'000'000;
static constexpr spi::SpiModes RTD_MODE = spi::SpiModes::MODE_3;
} }

2
fsfw

@ -1 +1 @@
Subproject commit eba2f87b36429fc814f9d4768c68fd2827f4c410 Subproject commit ceb87b5abb2992a18266328e0ea34d9af15db7af

View File

@ -1,106 +1,120 @@
2200;STORE_SEND_WRITE_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2200;STORE_SEND_WRITE_FAILED;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2201;STORE_WRITE_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2201;STORE_WRITE_FAILED;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2202;STORE_SEND_READ_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2202;STORE_SEND_READ_FAILED;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2203;STORE_READ_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2203;STORE_READ_FAILED;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2204;UNEXPECTED_MSG;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2204;UNEXPECTED_MSG;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2205;STORING_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2205;STORING_FAILED;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2206;TM_DUMP_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2206;TM_DUMP_FAILED;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2207;STORE_INIT_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2207;STORE_INIT_FAILED;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2208;STORE_INIT_EMPTY;INFO;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2208;STORE_INIT_EMPTY;INFO;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2209;STORE_CONTENT_CORRUPTED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2209;STORE_CONTENT_CORRUPTED;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2210;STORE_INITIALIZE;INFO;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2210;STORE_INITIALIZE;INFO;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2211;INIT_DONE;INFO;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2211;INIT_DONE;INFO;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2212;DUMP_FINISHED;INFO;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2212;DUMP_FINISHED;INFO;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2213;DELETION_FINISHED;INFO;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2213;DELETION_FINISHED;INFO;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2214;DELETION_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2214;DELETION_FAILED;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2215;AUTO_CATALOGS_SENDING_FAILED;INFO;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2215;AUTO_CATALOGS_SENDING_FAILED;INFO;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2600;GET_DATA_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/storagemanager/StorageManagerIF.h 2600;GET_DATA_FAILED;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/storagemanager/StorageManagerIF.h
2601;STORE_DATA_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/storagemanager/StorageManagerIF.h 2601;STORE_DATA_FAILED;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/storagemanager/StorageManagerIF.h
2800;DEVICE_BUILDING_COMMAND_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h 2800;DEVICE_BUILDING_COMMAND_FAILED;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2801;DEVICE_SENDING_COMMAND_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h 2801;DEVICE_SENDING_COMMAND_FAILED;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2802;DEVICE_REQUESTING_REPLY_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h 2802;DEVICE_REQUESTING_REPLY_FAILED;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2803;DEVICE_READING_REPLY_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h 2803;DEVICE_READING_REPLY_FAILED;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2804;DEVICE_INTERPRETING_REPLY_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h 2804;DEVICE_INTERPRETING_REPLY_FAILED;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2805;DEVICE_MISSED_REPLY;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h 2805;DEVICE_MISSED_REPLY;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2806;DEVICE_UNKNOWN_REPLY;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h 2806;DEVICE_UNKNOWN_REPLY;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2807;DEVICE_UNREQUESTED_REPLY;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h 2807;DEVICE_UNREQUESTED_REPLY;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2808;INVALID_DEVICE_COMMAND;LOW;Indicates a SW bug in child class.;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h 2808;INVALID_DEVICE_COMMAND;LOW;Indicates a SW bug in child class.;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2809;MONITORING_LIMIT_EXCEEDED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h 2809;MONITORING_LIMIT_EXCEEDED;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2810;MONITORING_AMBIGUOUS;HIGH;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h 2810;MONITORING_AMBIGUOUS;HIGH;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
4201;FUSE_CURRENT_HIGH;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/power/Fuse.h 4201;FUSE_CURRENT_HIGH;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/power/Fuse.h
4202;FUSE_WENT_OFF;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/power/Fuse.h 4202;FUSE_WENT_OFF;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/power/Fuse.h
4204;POWER_ABOVE_HIGH_LIMIT;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/power/Fuse.h 4204;POWER_ABOVE_HIGH_LIMIT;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/power/Fuse.h
4205;POWER_BELOW_LOW_LIMIT;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/power/Fuse.h 4205;POWER_BELOW_LOW_LIMIT;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/power/Fuse.h
4300;SWITCH_WENT_OFF;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/power/PowerSwitchIF.h 4300;SWITCH_WENT_OFF;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/power/PowerSwitchIF.h
5000;HEATER_ON;INFO;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h 5000;HEATER_ON;INFO;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/Heater.h
5001;HEATER_OFF;INFO;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h 5001;HEATER_OFF;INFO;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/Heater.h
5002;HEATER_TIMEOUT;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h 5002;HEATER_TIMEOUT;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/Heater.h
5003;HEATER_STAYED_ON;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h 5003;HEATER_STAYED_ON;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/Heater.h
5004;HEATER_STAYED_OFF;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h 5004;HEATER_STAYED_OFF;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/Heater.h
5200;TEMP_SENSOR_HIGH;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h 5200;TEMP_SENSOR_HIGH;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
5201;TEMP_SENSOR_LOW;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h 5201;TEMP_SENSOR_LOW;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
5202;TEMP_SENSOR_GRADIENT;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h 5202;TEMP_SENSOR_GRADIENT;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
5901;COMPONENT_TEMP_LOW;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h 5901;COMPONENT_TEMP_LOW;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h
5902;COMPONENT_TEMP_HIGH;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h 5902;COMPONENT_TEMP_HIGH;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h
5903;COMPONENT_TEMP_OOL_LOW;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h 5903;COMPONENT_TEMP_OOL_LOW;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h
5904;COMPONENT_TEMP_OOL_HIGH;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h 5904;COMPONENT_TEMP_OOL_HIGH;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h
5905;TEMP_NOT_IN_OP_RANGE;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h 5905;TEMP_NOT_IN_OP_RANGE;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h
7101;FDIR_CHANGED_STATE;INFO;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h 7101;FDIR_CHANGED_STATE;INFO;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h
7102;FDIR_STARTS_RECOVERY;MEDIUM;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h 7102;FDIR_STARTS_RECOVERY;MEDIUM;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h
7103;FDIR_TURNS_OFF_DEVICE;MEDIUM;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h 7103;FDIR_TURNS_OFF_DEVICE;MEDIUM;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h
7201;MONITOR_CHANGED_STATE;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h 7201;MONITOR_CHANGED_STATE;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h
7202;VALUE_BELOW_LOW_LIMIT;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h 7202;VALUE_BELOW_LOW_LIMIT;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h
7203;VALUE_ABOVE_HIGH_LIMIT;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h 7203;VALUE_ABOVE_HIGH_LIMIT;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h
7204;VALUE_OUT_OF_RANGE;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h 7204;VALUE_OUT_OF_RANGE;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h
7301;SWITCHING_TM_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/datapool/HkSwitchHelper.h 7301;SWITCHING_TM_FAILED;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/datapool/HkSwitchHelper.h
7400;CHANGING_MODE;INFO;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h 7400;CHANGING_MODE;INFO;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h
7401;MODE_INFO;INFO;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h 7401;MODE_INFO;INFO;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h
7402;FALLBACK_FAILED;HIGH;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h 7402;FALLBACK_FAILED;HIGH;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h
7403;MODE_TRANSITION_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h 7403;MODE_TRANSITION_FAILED;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h
7404;CANT_KEEP_MODE;HIGH;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h 7404;CANT_KEEP_MODE;HIGH;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h
7405;OBJECT_IN_INVALID_MODE;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h 7405;OBJECT_IN_INVALID_MODE;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h
7406;FORCING_MODE;MEDIUM;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h 7406;FORCING_MODE;MEDIUM;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h
7407;MODE_CMD_REJECTED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h 7407;MODE_CMD_REJECTED;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h
7506;HEALTH_INFO;INFO;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h 7506;HEALTH_INFO;INFO;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h
7507;CHILD_CHANGED_HEALTH;INFO;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h 7507;CHILD_CHANGED_HEALTH;INFO;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h
7508;CHILD_PROBLEMS;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h 7508;CHILD_PROBLEMS;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h
7509;OVERWRITING_HEALTH;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h 7509;OVERWRITING_HEALTH;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h
7510;TRYING_RECOVERY;MEDIUM;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h 7510;TRYING_RECOVERY;MEDIUM;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h
7511;RECOVERY_STEP;MEDIUM;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h 7511;RECOVERY_STEP;MEDIUM;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h
7512;RECOVERY_DONE;MEDIUM;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h 7512;RECOVERY_DONE;MEDIUM;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h
7900;RF_AVAILABLE;INFO;A RF available signal was detected. P1: raw RFA state, P2: 0;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h 7900;RF_AVAILABLE;INFO;A RF available signal was detected. P1: raw RFA state, P2: 0;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
7901;RF_LOST;INFO;A previously found RF available signal was lost. P1: raw RFA state, P2: 0;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h 7901;RF_LOST;INFO;A previously found RF available signal was lost. P1: raw RFA state, P2: 0;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
7902;BIT_LOCK;INFO;A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h 7902;BIT_LOCK;INFO;A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0;/home/eive/EIVE/Robin/eive-obsw/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;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/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;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
7905;FRAME_PROCESSING_FAILED;LOW;The CCSDS Board could not interpret a TC;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h 7905;FRAME_PROCESSING_FAILED;LOW;The CCSDS Board could not interpret a TC;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
8900;CLOCK_SET;INFO;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/pus/Service9TimeManagement.h 8900;CLOCK_SET;INFO;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/pus/Service9TimeManagement.h
8901;CLOCK_SET_FAILURE;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/pus/Service9TimeManagement.h 8901;CLOCK_SET_FAILURE;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/pus/Service9TimeManagement.h
9700;TEST;INFO;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/pus/Service17Test.h 9700;TEST;INFO;;/home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/pus/Service17Test.h
10600;CHANGE_OF_SETUP_PARAMETER;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/MGMHandlerLIS3MDL.h 10600;CHANGE_OF_SETUP_PARAMETER;LOW;;/home/eive/EIVE/Robin/eive-obsw/fsfw/hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h
11101;MEMORY_READ_RPT_CRC_FAILURE;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/PlocMPSoCHandler.h 10900;GPIO_PULL_HIGH_FAILED;LOW;;/home/eive/EIVE/Robin/eive-obsw/linux/devices/HeaterHandler.h
11102;ACK_FAILURE;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/PlocMPSoCHandler.h 10901;GPIO_PULL_LOW_FAILED;LOW;;/home/eive/EIVE/Robin/eive-obsw/linux/devices/HeaterHandler.h
11103;EXE_FAILURE;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/PlocMPSoCHandler.h 10902;SWITCH_ALREADY_ON;LOW;;/home/eive/EIVE/Robin/eive-obsw/linux/devices/HeaterHandler.h
11104;CRC_FAILURE_EVENT;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/PlocMPSoCHandler.h 10903;SWITCH_ALREADY_OFF;LOW;;/home/eive/EIVE/Robin/eive-obsw/linux/devices/HeaterHandler.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;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/IMTQHandler.h 10904;MAIN_SWITCH_TIMEOUT;LOW;;/home/eive/EIVE/Robin/eive-obsw/linux/devices/HeaterHandler.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;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/IMTQHandler.h 11000;MAIN_SWITCH_ON_TIMEOUT;LOW;;/home/eive/EIVE/Robin/eive-obsw/linux/devices/SolarArrayDeploymentHandler.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;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/IMTQHandler.h 11001;MAIN_SWITCH_OFF_TIMEOUT;LOW;;/home/eive/EIVE/Robin/eive-obsw/linux/devices/SolarArrayDeploymentHandler.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;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/IMTQHandler.h 11002;DEPLOYMENT_FAILED;HIGH;;/home/eive/EIVE/Robin/eive-obsw/linux/devices/SolarArrayDeploymentHandler.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;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/IMTQHandler.h 11003;DEPL_SA1_GPIO_SWTICH_ON_FAILED;HIGH;;/home/eive/EIVE/Robin/eive-obsw/linux/devices/SolarArrayDeploymentHandler.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;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/IMTQHandler.h 11004;DEPL_SA2_GPIO_SWTICH_ON_FAILED;HIGH;;/home/eive/EIVE/Robin/eive-obsw/linux/devices/SolarArrayDeploymentHandler.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;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/IMTQHandler.h 11101;MEMORY_READ_RPT_CRC_FAILURE;LOW;;/home/eive/EIVE/Robin/eive-obsw/mission/devices/PlocMPSoCHandler.h
11208;INVALID_ERROR_BYTE;LOW;Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC.;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/IMTQHandler.h 11102;ACK_FAILURE;LOW;;/home/eive/EIVE/Robin/eive-obsw/mission/devices/PlocMPSoCHandler.h
11301;ERROR_STATE;HIGH;Reaction wheel signals an error state;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/RwHandler.h 11103;EXE_FAILURE;LOW;;/home/eive/EIVE/Robin/eive-obsw/mission/devices/PlocMPSoCHandler.h
11501;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.h 11104;CRC_FAILURE_EVENT;LOW;;/home/eive/EIVE/Robin/eive-obsw/mission/devices/PlocMPSoCHandler.h
11502;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.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;/home/eive/EIVE/Robin/eive-obsw/mission/devices/IMTQHandler.h
11503;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.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;/home/eive/EIVE/Robin/eive-obsw/mission/devices/IMTQHandler.h
11504;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.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;/home/eive/EIVE/Robin/eive-obsw/mission/devices/IMTQHandler.h
11600;SANITIZATION_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/memory/SdCardManager.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;/home/eive/EIVE/Robin/eive-obsw/mission/devices/IMTQHandler.h
11700;UPDATE_FILE_NOT_EXISTS;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocUpdater.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;/home/eive/EIVE/Robin/eive-obsw/mission/devices/IMTQHandler.h
11701;ACTION_COMMANDING_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocUpdater.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;/home/eive/EIVE/Robin/eive-obsw/mission/devices/IMTQHandler.h
11702;UPDATE_AVAILABLE_FAILED;LOW;Supervisor handler replied action message indicating a command execution failure of the update available command;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocUpdater.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;/home/eive/EIVE/Robin/eive-obsw/mission/devices/IMTQHandler.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);C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocUpdater.h 11208;INVALID_ERROR_BYTE;LOW;Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC.;/home/eive/EIVE/Robin/eive-obsw/mission/devices/IMTQHandler.h
11704;UPDATE_VERIFY_FAILED;LOW;Supervisor failed to execute the update verify command.;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocUpdater.h 11301;ERROR_STATE;HIGH;Reaction wheel signals an error state;/home/eive/EIVE/Robin/eive-obsw/mission/devices/RwHandler.h
11705;UPDATE_FINISHED;INFO;MPSoC update successful completed;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocUpdater.h 11501;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;/home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocSupervisorHandler.h
11800;SEND_MRAM_DUMP_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocMemoryDumper.h 11502;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;/home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocSupervisorHandler.h
11801;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocMemoryDumper.h 11503;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report;/home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocSupervisorHandler.h
11802;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocMemoryDumper.h 11504;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;/home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocSupervisorHandler.h
11600;SANITIZATION_FAILED;LOW;;/home/eive/EIVE/Robin/eive-obsw/bsp_q7s/memory/SdCardManager.h
11700;UPDATE_FILE_NOT_EXISTS;LOW;;/home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocUpdater.h
11701;ACTION_COMMANDING_FAILED;LOW;;/home/eive/EIVE/Robin/eive-obsw/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;/home/eive/EIVE/Robin/eive-obsw/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);/home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocUpdater.h
11704;UPDATE_VERIFY_FAILED;LOW;Supervisor failed to execute the update verify command.;/home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocUpdater.h
11705;UPDATE_FINISHED;INFO;MPSoC update successful completed;/home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocUpdater.h
11800;SEND_MRAM_DUMP_FAILED;LOW;;/home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocMemoryDumper.h
11801;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;/home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocMemoryDumper.h
11802;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;/home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocMemoryDumper.h
11901;INVALID_TC_FRAME;HIGH;;/home/eive/EIVE/Robin/eive-obsw/linux/obc/PdecHandler.h
11902;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;/home/eive/EIVE/Robin/eive-obsw/linux/obc/PdecHandler.h
11903;CARRIER_LOCK;INFO;Carrier lock detected;/home/eive/EIVE/Robin/eive-obsw/linux/obc/PdecHandler.h
11904;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);/home/eive/EIVE/Robin/eive-obsw/linux/obc/PdecHandler.h

1 2200 STORE_SEND_WRITE_FAILED LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2 2201 STORE_WRITE_FAILED LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
3 2202 STORE_SEND_READ_FAILED LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
4 2203 STORE_READ_FAILED LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
5 2204 UNEXPECTED_MSG LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
6 2205 STORING_FAILED LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
7 2206 TM_DUMP_FAILED LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
8 2207 STORE_INIT_FAILED LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
9 2208 STORE_INIT_EMPTY INFO C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
10 2209 STORE_CONTENT_CORRUPTED LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
11 2210 STORE_INITIALIZE INFO C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
12 2211 INIT_DONE INFO C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
13 2212 DUMP_FINISHED INFO C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
14 2213 DELETION_FINISHED INFO C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
15 2214 DELETION_FAILED LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
16 2215 AUTO_CATALOGS_SENDING_FAILED INFO C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
17 2600 GET_DATA_FAILED LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/storagemanager/StorageManagerIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/storagemanager/StorageManagerIF.h
18 2601 STORE_DATA_FAILED LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/storagemanager/StorageManagerIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/storagemanager/StorageManagerIF.h
19 2800 DEVICE_BUILDING_COMMAND_FAILED LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
20 2801 DEVICE_SENDING_COMMAND_FAILED LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
21 2802 DEVICE_REQUESTING_REPLY_FAILED LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
22 2803 DEVICE_READING_REPLY_FAILED LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
23 2804 DEVICE_INTERPRETING_REPLY_FAILED LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
24 2805 DEVICE_MISSED_REPLY LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
25 2806 DEVICE_UNKNOWN_REPLY LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
26 2807 DEVICE_UNREQUESTED_REPLY LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
27 2808 INVALID_DEVICE_COMMAND LOW Indicates a SW bug in child class. C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
28 2809 MONITORING_LIMIT_EXCEEDED LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
29 2810 MONITORING_AMBIGUOUS HIGH C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
30 4201 FUSE_CURRENT_HIGH LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/power/Fuse.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/power/Fuse.h
31 4202 FUSE_WENT_OFF LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/power/Fuse.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/power/Fuse.h
32 4204 POWER_ABOVE_HIGH_LIMIT LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/power/Fuse.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/power/Fuse.h
33 4205 POWER_BELOW_LOW_LIMIT LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/power/Fuse.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/power/Fuse.h
34 4300 SWITCH_WENT_OFF LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/power/PowerSwitchIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/power/PowerSwitchIF.h
35 5000 HEATER_ON INFO C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/Heater.h
36 5001 HEATER_OFF INFO C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/Heater.h
37 5002 HEATER_TIMEOUT LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/Heater.h
38 5003 HEATER_STAYED_ON LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/Heater.h
39 5004 HEATER_STAYED_OFF LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/Heater.h
40 5200 TEMP_SENSOR_HIGH LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
41 5201 TEMP_SENSOR_LOW LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
42 5202 TEMP_SENSOR_GRADIENT LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
43 5901 COMPONENT_TEMP_LOW LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h
44 5902 COMPONENT_TEMP_HIGH LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h
45 5903 COMPONENT_TEMP_OOL_LOW LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h
46 5904 COMPONENT_TEMP_OOL_HIGH LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h
47 5905 TEMP_NOT_IN_OP_RANGE LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h
48 7101 FDIR_CHANGED_STATE INFO C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h
49 7102 FDIR_STARTS_RECOVERY MEDIUM C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h
50 7103 FDIR_TURNS_OFF_DEVICE MEDIUM C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h
51 7201 MONITOR_CHANGED_STATE LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h
52 7202 VALUE_BELOW_LOW_LIMIT LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h
53 7203 VALUE_ABOVE_HIGH_LIMIT LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h
54 7204 VALUE_OUT_OF_RANGE LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h
55 7301 SWITCHING_TM_FAILED LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/datapool/HkSwitchHelper.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/datapool/HkSwitchHelper.h
56 7400 CHANGING_MODE INFO C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h
57 7401 MODE_INFO INFO C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h
58 7402 FALLBACK_FAILED HIGH C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h
59 7403 MODE_TRANSITION_FAILED LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h
60 7404 CANT_KEEP_MODE HIGH C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h
61 7405 OBJECT_IN_INVALID_MODE LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h
62 7406 FORCING_MODE MEDIUM C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h
63 7407 MODE_CMD_REJECTED LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h
64 7506 HEALTH_INFO INFO C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h
65 7507 CHILD_CHANGED_HEALTH INFO C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h
66 7508 CHILD_PROBLEMS LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h
67 7509 OVERWRITING_HEALTH LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h
68 7510 TRYING_RECOVERY MEDIUM C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h
69 7511 RECOVERY_STEP MEDIUM C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h
70 7512 RECOVERY_DONE MEDIUM C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h
71 7900 RF_AVAILABLE INFO A RF available signal was detected. P1: raw RFA state, P2: 0 C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
72 7901 RF_LOST INFO A previously found RF available signal was lost. P1: raw RFA state, P2: 0 C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
73 7902 BIT_LOCK INFO A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0 C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
74 7903 BIT_LOCK_LOST INFO A previously found Bit Lock signal was lost. P1: raw BLO state, P2: 0 C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
75 7905 FRAME_PROCESSING_FAILED LOW The CCSDS Board could not interpret a TC C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
76 8900 CLOCK_SET INFO C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/pus/Service9TimeManagement.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/pus/Service9TimeManagement.h
77 8901 CLOCK_SET_FAILURE LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/pus/Service9TimeManagement.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/pus/Service9TimeManagement.h
78 9700 TEST INFO C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/fsfw/src/fsfw/pus/Service17Test.h /home/eive/EIVE/Robin/eive-obsw/fsfw/src/fsfw/pus/Service17Test.h
79 10600 CHANGE_OF_SETUP_PARAMETER LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/MGMHandlerLIS3MDL.h /home/eive/EIVE/Robin/eive-obsw/fsfw/hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h
80 11101 10900 MEMORY_READ_RPT_CRC_FAILURE GPIO_PULL_HIGH_FAILED LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/PlocMPSoCHandler.h /home/eive/EIVE/Robin/eive-obsw/linux/devices/HeaterHandler.h
81 11102 10901 ACK_FAILURE GPIO_PULL_LOW_FAILED LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/PlocMPSoCHandler.h /home/eive/EIVE/Robin/eive-obsw/linux/devices/HeaterHandler.h
82 11103 10902 EXE_FAILURE SWITCH_ALREADY_ON LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/PlocMPSoCHandler.h /home/eive/EIVE/Robin/eive-obsw/linux/devices/HeaterHandler.h
83 11104 10903 CRC_FAILURE_EVENT SWITCH_ALREADY_OFF LOW C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/PlocMPSoCHandler.h /home/eive/EIVE/Robin/eive-obsw/linux/devices/HeaterHandler.h
84 11201 10904 SELF_TEST_I2C_FAILURE MAIN_SWITCH_TIMEOUT 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 C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/IMTQHandler.h /home/eive/EIVE/Robin/eive-obsw/linux/devices/HeaterHandler.h
85 11202 11000 SELF_TEST_SPI_FAILURE MAIN_SWITCH_ON_TIMEOUT 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 C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/IMTQHandler.h /home/eive/EIVE/Robin/eive-obsw/linux/devices/SolarArrayDeploymentHandler.h
86 11203 11001 SELF_TEST_ADC_FAILURE MAIN_SWITCH_OFF_TIMEOUT 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 C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/IMTQHandler.h /home/eive/EIVE/Robin/eive-obsw/linux/devices/SolarArrayDeploymentHandler.h
87 11204 11002 SELF_TEST_PWM_FAILURE DEPLOYMENT_FAILED LOW HIGH 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 C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/IMTQHandler.h /home/eive/EIVE/Robin/eive-obsw/linux/devices/SolarArrayDeploymentHandler.h
88 11205 11003 SELF_TEST_TC_FAILURE DEPL_SA1_GPIO_SWTICH_ON_FAILED LOW HIGH 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 C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/IMTQHandler.h /home/eive/EIVE/Robin/eive-obsw/linux/devices/SolarArrayDeploymentHandler.h
89 11206 11004 SELF_TEST_MTM_RANGE_FAILURE DEPL_SA2_GPIO_SWTICH_ON_FAILED LOW HIGH 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 C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/IMTQHandler.h /home/eive/EIVE/Robin/eive-obsw/linux/devices/SolarArrayDeploymentHandler.h
90 11207 11101 SELF_TEST_COIL_CURRENT_FAILURE MEMORY_READ_RPT_CRC_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 C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/IMTQHandler.h /home/eive/EIVE/Robin/eive-obsw/mission/devices/PlocMPSoCHandler.h
91 11208 11102 INVALID_ERROR_BYTE ACK_FAILURE LOW Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC. C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/IMTQHandler.h /home/eive/EIVE/Robin/eive-obsw/mission/devices/PlocMPSoCHandler.h
92 11301 11103 ERROR_STATE EXE_FAILURE HIGH LOW Reaction wheel signals an error state C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/RwHandler.h /home/eive/EIVE/Robin/eive-obsw/mission/devices/PlocMPSoCHandler.h
93 11501 11104 SUPV_MEMORY_READ_RPT_CRC_FAILURE CRC_FAILURE_EVENT LOW PLOC supervisor crc failure in telemetry packet C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.h /home/eive/EIVE/Robin/eive-obsw/mission/devices/PlocMPSoCHandler.h
94 11502 11201 SUPV_ACK_FAILURE SELF_TEST_I2C_FAILURE LOW PLOC supervisor received acknowledgment failure report 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 C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.h /home/eive/EIVE/Robin/eive-obsw/mission/devices/IMTQHandler.h
95 11503 11202 SUPV_EXE_FAILURE SELF_TEST_SPI_FAILURE LOW PLOC received execution failure report 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 C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.h /home/eive/EIVE/Robin/eive-obsw/mission/devices/IMTQHandler.h
96 11504 11203 SUPV_CRC_FAILURE_EVENT SELF_TEST_ADC_FAILURE LOW PLOC supervisor reply has invalid crc 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 C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.h /home/eive/EIVE/Robin/eive-obsw/mission/devices/IMTQHandler.h
97 11600 11204 SANITIZATION_FAILED 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 C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/memory/SdCardManager.h /home/eive/EIVE/Robin/eive-obsw/mission/devices/IMTQHandler.h
98 11700 11205 UPDATE_FILE_NOT_EXISTS 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 C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocUpdater.h /home/eive/EIVE/Robin/eive-obsw/mission/devices/IMTQHandler.h
99 11701 11206 ACTION_COMMANDING_FAILED 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 C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocUpdater.h /home/eive/EIVE/Robin/eive-obsw/mission/devices/IMTQHandler.h
100 11702 11207 UPDATE_AVAILABLE_FAILED SELF_TEST_COIL_CURRENT_FAILURE LOW Supervisor handler replied action message indicating a command execution failure of the update available command 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 C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocUpdater.h /home/eive/EIVE/Robin/eive-obsw/mission/devices/IMTQHandler.h
101 11703 11208 UPDATE_TRANSFER_FAILED INVALID_ERROR_BYTE LOW Supervisor handler failed to transfer an update space packet. P1: Parameter holds the number of update packets already sent (inclusive the failed packet) Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC. C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocUpdater.h /home/eive/EIVE/Robin/eive-obsw/mission/devices/IMTQHandler.h
102 11704 11301 UPDATE_VERIFY_FAILED ERROR_STATE LOW HIGH Supervisor failed to execute the update verify command. Reaction wheel signals an error state C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocUpdater.h /home/eive/EIVE/Robin/eive-obsw/mission/devices/RwHandler.h
103 11705 11501 UPDATE_FINISHED SUPV_MEMORY_READ_RPT_CRC_FAILURE INFO LOW MPSoC update successful completed PLOC supervisor crc failure in telemetry packet C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocUpdater.h /home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocSupervisorHandler.h
104 11800 11502 SEND_MRAM_DUMP_FAILED SUPV_ACK_FAILURE LOW PLOC supervisor received acknowledgment failure report C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocMemoryDumper.h /home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocSupervisorHandler.h
105 11801 11503 MRAM_DUMP_FAILED SUPV_EXE_FAILURE LOW Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command PLOC received execution failure report C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocMemoryDumper.h /home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocSupervisorHandler.h
106 11802 11504 MRAM_DUMP_FINISHED SUPV_CRC_FAILURE_EVENT LOW MRAM dump finished successfully PLOC supervisor reply has invalid crc C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocMemoryDumper.h /home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocSupervisorHandler.h
107 11600 SANITIZATION_FAILED LOW /home/eive/EIVE/Robin/eive-obsw/bsp_q7s/memory/SdCardManager.h
108 11700 UPDATE_FILE_NOT_EXISTS LOW /home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocUpdater.h
109 11701 ACTION_COMMANDING_FAILED LOW /home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocUpdater.h
110 11702 UPDATE_AVAILABLE_FAILED LOW Supervisor handler replied action message indicating a command execution failure of the update available command /home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocUpdater.h
111 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) /home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocUpdater.h
112 11704 UPDATE_VERIFY_FAILED LOW Supervisor failed to execute the update verify command. /home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocUpdater.h
113 11705 UPDATE_FINISHED INFO MPSoC update successful completed /home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocUpdater.h
114 11800 SEND_MRAM_DUMP_FAILED LOW /home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocMemoryDumper.h
115 11801 MRAM_DUMP_FAILED LOW Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command /home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocMemoryDumper.h
116 11802 MRAM_DUMP_FINISHED LOW MRAM dump finished successfully /home/eive/EIVE/Robin/eive-obsw/bsp_q7s/devices/PlocMemoryDumper.h
117 11901 INVALID_TC_FRAME HIGH /home/eive/EIVE/Robin/eive-obsw/linux/obc/PdecHandler.h
118 11902 INVALID_FAR HIGH Read invalid FAR from PDEC after startup /home/eive/EIVE/Robin/eive-obsw/linux/obc/PdecHandler.h
119 11903 CARRIER_LOCK INFO Carrier lock detected /home/eive/EIVE/Robin/eive-obsw/linux/obc/PdecHandler.h
120 11904 BIT_LOCK_PDEC INFO Bit lock detected (data valid) /home/eive/EIVE/Robin/eive-obsw/linux/obc/PdecHandler.h

View File

@ -78,6 +78,7 @@
0x50000701;PAPB_VC1 0x50000701;PAPB_VC1
0x50000702;PAPB_VC2 0x50000702;PAPB_VC2
0x50000703;PAPB_VC3 0x50000703;PAPB_VC3
0x50000704;PDEC_HANDLER
0x50000800;CCSDS_HANDLER 0x50000800;CCSDS_HANDLER
0x51000500;PUS_SERVICE_6 0x51000500;PUS_SERVICE_6
0x53000000;FSFW_OBJECTS_START 0x53000000;FSFW_OBJECTS_START

1 0x00005060 P60DOCK_TEST_TASK
78 0x50000701 PAPB_VC1
79 0x50000702 PAPB_VC2
80 0x50000703 PAPB_VC3
81 0x50000704 PDEC_HANDLER
82 0x50000800 CCSDS_HANDLER
83 0x51000500 PUS_SERVICE_6
84 0x53000000 FSFW_OBJECTS_START

View File

@ -51,7 +51,7 @@ SUBSYSTEM_DEFINITION_DESTINATIONS = [
] ]
HEADER_DEFINITION_DESTINATIONS = [ HEADER_DEFINITION_DESTINATIONS = [
f"{OBSW_ROOT_DIR}/mission/", f"{OBSW_ROOT_DIR}/fsfw/", f"{FSFW_CONFIG_ROOT}", f"{OBSW_ROOT_DIR}/mission/", f"{OBSW_ROOT_DIR}/fsfw/", f"{FSFW_CONFIG_ROOT}",
f"{OBSW_ROOT_DIR}/test/", f"{OBSW_ROOT_DIR}/bsp_q7s" f"{OBSW_ROOT_DIR}/test/", f"{OBSW_ROOT_DIR}/bsp_q7s", f"{OBSW_ROOT_DIR}/linux/"
] ]

View File

@ -1,7 +1,7 @@
/** /**
* @brief Auto-generated event translation file. Contains 106 translations. * @brief Auto-generated event translation file. Contains 120 translations.
* @details * @details
* Generated on: 2021-08-31 10:50:10 * Generated on: 2021-11-25 14:09:00
*/ */
#include "translateEvents.h" #include "translateEvents.h"
@ -84,6 +84,16 @@ 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 *GPIO_PULL_HIGH_FAILED_STRING = "GPIO_PULL_HIGH_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_OFF_STRING = "SWITCH_ALREADY_OFF";
const char *MAIN_SWITCH_TIMEOUT_STRING = "MAIN_SWITCH_TIMEOUT";
const char *MAIN_SWITCH_ON_TIMEOUT_STRING = "MAIN_SWITCH_ON_TIMEOUT";
const char *MAIN_SWITCH_OFF_TIMEOUT_STRING = "MAIN_SWITCH_OFF_TIMEOUT";
const char *DEPLOYMENT_FAILED_STRING = "DEPLOYMENT_FAILED";
const char *DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING = "DEPL_SA1_GPIO_SWTICH_ON_FAILED";
const char *DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING = "DEPL_SA2_GPIO_SWTICH_ON_FAILED";
const char *MEMORY_READ_RPT_CRC_FAILURE_STRING = "MEMORY_READ_RPT_CRC_FAILURE"; const char *MEMORY_READ_RPT_CRC_FAILURE_STRING = "MEMORY_READ_RPT_CRC_FAILURE";
const char *ACK_FAILURE_STRING = "ACK_FAILURE"; const char *ACK_FAILURE_STRING = "ACK_FAILURE";
const char *EXE_FAILURE_STRING = "EXE_FAILURE"; const char *EXE_FAILURE_STRING = "EXE_FAILURE";
@ -111,6 +121,10 @@ const char *UPDATE_FINISHED_STRING = "UPDATE_FINISHED";
const char *SEND_MRAM_DUMP_FAILED_STRING = "SEND_MRAM_DUMP_FAILED"; const char *SEND_MRAM_DUMP_FAILED_STRING = "SEND_MRAM_DUMP_FAILED";
const char *MRAM_DUMP_FAILED_STRING = "MRAM_DUMP_FAILED"; const char *MRAM_DUMP_FAILED_STRING = "MRAM_DUMP_FAILED";
const char *MRAM_DUMP_FINISHED_STRING = "MRAM_DUMP_FINISHED"; const char *MRAM_DUMP_FINISHED_STRING = "MRAM_DUMP_FINISHED";
const char *INVALID_TC_FRAME_STRING = "INVALID_TC_FRAME";
const char *INVALID_FAR_STRING = "INVALID_FAR";
const char *CARRIER_LOCK_STRING = "CARRIER_LOCK";
const char *BIT_LOCK_PDEC_STRING = "BIT_LOCK_PDEC";
const char * translateEvents(Event event) { const char * translateEvents(Event event) {
switch( (event & 0xffff) ) { switch( (event & 0xffff) ) {
@ -272,6 +286,26 @@ 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(10900):
return GPIO_PULL_HIGH_FAILED_STRING;
case(10901):
return GPIO_PULL_LOW_FAILED_STRING;
case(10902):
return SWITCH_ALREADY_ON_STRING;
case(10903):
return SWITCH_ALREADY_OFF_STRING;
case(10904):
return MAIN_SWITCH_TIMEOUT_STRING;
case(11000):
return MAIN_SWITCH_ON_TIMEOUT_STRING;
case(11001):
return MAIN_SWITCH_OFF_TIMEOUT_STRING;
case(11002):
return DEPLOYMENT_FAILED_STRING;
case(11003):
return DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING;
case(11004):
return DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING;
case(11101): case(11101):
return MEMORY_READ_RPT_CRC_FAILURE_STRING; return MEMORY_READ_RPT_CRC_FAILURE_STRING;
case(11102): case(11102):
@ -326,6 +360,14 @@ const char * translateEvents(Event event) {
return MRAM_DUMP_FAILED_STRING; return MRAM_DUMP_FAILED_STRING;
case(11802): case(11802):
return MRAM_DUMP_FINISHED_STRING; return MRAM_DUMP_FINISHED_STRING;
case(11901):
return INVALID_TC_FRAME_STRING;
case(11902):
return INVALID_FAR_STRING;
case(11903):
return CARRIER_LOCK_STRING;
case(11904):
return BIT_LOCK_PDEC_STRING;
default: default:
return "UNKNOWN_EVENT"; return "UNKNOWN_EVENT";
} }

View File

@ -1,8 +1,8 @@
/** /**
* @brief Auto-generated object translation file. * @brief Auto-generated object translation file.
* @details * @details
* Contains 111 translations. * Contains 112 translations.
* Generated on: 2021-10-13 15:54:21 * Generated on: 2021-11-22 17:04:51
*/ */
#include "translateObjects.h" #include "translateObjects.h"
@ -86,6 +86,7 @@ const char *PAPB_VC0_STRING = "PAPB_VC0";
const char *PAPB_VC1_STRING = "PAPB_VC1"; const char *PAPB_VC1_STRING = "PAPB_VC1";
const char *PAPB_VC2_STRING = "PAPB_VC2"; const char *PAPB_VC2_STRING = "PAPB_VC2";
const char *PAPB_VC3_STRING = "PAPB_VC3"; const char *PAPB_VC3_STRING = "PAPB_VC3";
const char *PDEC_HANDLER_STRING = "PDEC_HANDLER";
const char *CCSDS_HANDLER_STRING = "CCSDS_HANDLER"; const char *CCSDS_HANDLER_STRING = "CCSDS_HANDLER";
const char *PUS_SERVICE_6_STRING = "PUS_SERVICE_6"; const char *PUS_SERVICE_6_STRING = "PUS_SERVICE_6";
const char *FSFW_OBJECTS_START_STRING = "FSFW_OBJECTS_START"; const char *FSFW_OBJECTS_START_STRING = "FSFW_OBJECTS_START";
@ -280,6 +281,8 @@ const char* translateObject(object_id_t object) {
return PAPB_VC2_STRING; return PAPB_VC2_STRING;
case 0x50000703: case 0x50000703:
return PAPB_VC3_STRING; return PAPB_VC3_STRING;
case 0x50000704:
return PDEC_HANDLER_STRING;
case 0x50000800: case 0x50000800:
return CCSDS_HANDLER_STRING; return CCSDS_HANDLER_STRING;
case 0x51000500: case 0x51000500:

View File

@ -37,7 +37,9 @@ debugging. */
// Set to 1 if all telemetry should be sent to the PTME IP Core // Set to 1 if all telemetry should be sent to the PTME IP Core
#define OBSW_TM_TO_PTME 1 #define OBSW_TM_TO_PTME 1
// Set to 1 if telecommands are received via the PDEC IP Core // Set to 1 if telecommands are received via the PDEC IP Core
#define OBSW_TC_FROM_PDEC 0 #define OBSW_TC_FROM_PDEC 1
#define TMTC_TEST_SETUP 1
#define OBSW_ENABLE_TIMERS 1 #define OBSW_ENABLE_TIMERS 1
#define OBSW_ADD_STAR_TRACKER 0 #define OBSW_ADD_STAR_TRACKER 0
@ -92,7 +94,6 @@ debugging. */
#define OBSW_TEST_TE7020_HEATER 0 #define OBSW_TEST_TE7020_HEATER 0
#define OBSW_TEST_GPIO_OPEN_BY_LABEL 0 #define OBSW_TEST_GPIO_OPEN_BY_LABEL 0
#define OBSW_TEST_GPIO_OPEN_BY_LINE_NAME 0 #define OBSW_TEST_GPIO_OPEN_BY_LINE_NAME 0
#define OBSW_LINK_IS_UP 1
#define OBSW_DEBUG_P60DOCK 0 #define OBSW_DEBUG_P60DOCK 0
#define OBSW_DEBUG_PDU1 0 #define OBSW_DEBUG_PDU1 0
@ -109,6 +110,7 @@ debugging. */
#define OBSW_DEBUG_STARTRACKER 0 #define OBSW_DEBUG_STARTRACKER 0
#define OBSW_DEBUG_PLOC_MPSOC 0 #define OBSW_DEBUG_PLOC_MPSOC 0
#define OBSW_DEBUG_PLOC_SUPERVISOR 0 #define OBSW_DEBUG_PLOC_SUPERVISOR 0
#define OBSW_DEBUG_PDEC_HANDLER 0
/*******************************************************************/ /*******************************************************************/
/** Hardcoded */ /** Hardcoded */

View File

@ -100,9 +100,15 @@ enum gpioId_t {
VC3_PAPB_EMPTY, VC3_PAPB_EMPTY,
VC3_PAPB_BUSY, VC3_PAPB_BUSY,
PDEC_RESET,
RS485_EN_TX_DATA, RS485_EN_TX_DATA,
RS485_EN_TX_CLOCK RS485_EN_TX_CLOCK,
RS485_EN_RX_DATA,
RS485_EN_RX_CLOCK,
BIT_RATE_SEL
}; };
} }

View File

@ -1,7 +1,7 @@
/** /**
* @brief Auto-generated event translation file. Contains 106 translations. * @brief Auto-generated event translation file. Contains 120 translations.
* @details * @details
* Generated on: 2021-08-31 10:50:10 * Generated on: 2021-11-25 14:09:00
*/ */
#include "translateEvents.h" #include "translateEvents.h"
@ -84,6 +84,16 @@ 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 *GPIO_PULL_HIGH_FAILED_STRING = "GPIO_PULL_HIGH_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_OFF_STRING = "SWITCH_ALREADY_OFF";
const char *MAIN_SWITCH_TIMEOUT_STRING = "MAIN_SWITCH_TIMEOUT";
const char *MAIN_SWITCH_ON_TIMEOUT_STRING = "MAIN_SWITCH_ON_TIMEOUT";
const char *MAIN_SWITCH_OFF_TIMEOUT_STRING = "MAIN_SWITCH_OFF_TIMEOUT";
const char *DEPLOYMENT_FAILED_STRING = "DEPLOYMENT_FAILED";
const char *DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING = "DEPL_SA1_GPIO_SWTICH_ON_FAILED";
const char *DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING = "DEPL_SA2_GPIO_SWTICH_ON_FAILED";
const char *MEMORY_READ_RPT_CRC_FAILURE_STRING = "MEMORY_READ_RPT_CRC_FAILURE"; const char *MEMORY_READ_RPT_CRC_FAILURE_STRING = "MEMORY_READ_RPT_CRC_FAILURE";
const char *ACK_FAILURE_STRING = "ACK_FAILURE"; const char *ACK_FAILURE_STRING = "ACK_FAILURE";
const char *EXE_FAILURE_STRING = "EXE_FAILURE"; const char *EXE_FAILURE_STRING = "EXE_FAILURE";
@ -111,6 +121,10 @@ const char *UPDATE_FINISHED_STRING = "UPDATE_FINISHED";
const char *SEND_MRAM_DUMP_FAILED_STRING = "SEND_MRAM_DUMP_FAILED"; const char *SEND_MRAM_DUMP_FAILED_STRING = "SEND_MRAM_DUMP_FAILED";
const char *MRAM_DUMP_FAILED_STRING = "MRAM_DUMP_FAILED"; const char *MRAM_DUMP_FAILED_STRING = "MRAM_DUMP_FAILED";
const char *MRAM_DUMP_FINISHED_STRING = "MRAM_DUMP_FINISHED"; const char *MRAM_DUMP_FINISHED_STRING = "MRAM_DUMP_FINISHED";
const char *INVALID_TC_FRAME_STRING = "INVALID_TC_FRAME";
const char *INVALID_FAR_STRING = "INVALID_FAR";
const char *CARRIER_LOCK_STRING = "CARRIER_LOCK";
const char *BIT_LOCK_PDEC_STRING = "BIT_LOCK_PDEC";
const char * translateEvents(Event event) { const char * translateEvents(Event event) {
switch( (event & 0xffff) ) { switch( (event & 0xffff) ) {
@ -272,6 +286,26 @@ 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(10900):
return GPIO_PULL_HIGH_FAILED_STRING;
case(10901):
return GPIO_PULL_LOW_FAILED_STRING;
case(10902):
return SWITCH_ALREADY_ON_STRING;
case(10903):
return SWITCH_ALREADY_OFF_STRING;
case(10904):
return MAIN_SWITCH_TIMEOUT_STRING;
case(11000):
return MAIN_SWITCH_ON_TIMEOUT_STRING;
case(11001):
return MAIN_SWITCH_OFF_TIMEOUT_STRING;
case(11002):
return DEPLOYMENT_FAILED_STRING;
case(11003):
return DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING;
case(11004):
return DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING;
case(11101): case(11101):
return MEMORY_READ_RPT_CRC_FAILURE_STRING; return MEMORY_READ_RPT_CRC_FAILURE_STRING;
case(11102): case(11102):
@ -326,6 +360,14 @@ const char * translateEvents(Event event) {
return MRAM_DUMP_FAILED_STRING; return MRAM_DUMP_FAILED_STRING;
case(11802): case(11802):
return MRAM_DUMP_FINISHED_STRING; return MRAM_DUMP_FINISHED_STRING;
case(11901):
return INVALID_TC_FRAME_STRING;
case(11902):
return INVALID_FAR_STRING;
case(11903):
return CARRIER_LOCK_STRING;
case(11904):
return BIT_LOCK_PDEC_STRING;
default: default:
return "UNKNOWN_EVENT"; return "UNKNOWN_EVENT";
} }

View File

@ -1,8 +1,8 @@
/** /**
* @brief Auto-generated object translation file. * @brief Auto-generated object translation file.
* @details * @details
* Contains 111 translations. * Contains 112 translations.
* Generated on: 2021-10-13 15:54:21 * Generated on: 2021-11-22 17:04:51
*/ */
#include "translateObjects.h" #include "translateObjects.h"
@ -86,6 +86,7 @@ const char *PAPB_VC0_STRING = "PAPB_VC0";
const char *PAPB_VC1_STRING = "PAPB_VC1"; const char *PAPB_VC1_STRING = "PAPB_VC1";
const char *PAPB_VC2_STRING = "PAPB_VC2"; const char *PAPB_VC2_STRING = "PAPB_VC2";
const char *PAPB_VC3_STRING = "PAPB_VC3"; const char *PAPB_VC3_STRING = "PAPB_VC3";
const char *PDEC_HANDLER_STRING = "PDEC_HANDLER";
const char *CCSDS_HANDLER_STRING = "CCSDS_HANDLER"; const char *CCSDS_HANDLER_STRING = "CCSDS_HANDLER";
const char *PUS_SERVICE_6_STRING = "PUS_SERVICE_6"; const char *PUS_SERVICE_6_STRING = "PUS_SERVICE_6";
const char *FSFW_OBJECTS_START_STRING = "FSFW_OBJECTS_START"; const char *FSFW_OBJECTS_START_STRING = "FSFW_OBJECTS_START";
@ -280,6 +281,8 @@ const char* translateObject(object_id_t object) {
return PAPB_VC2_STRING; return PAPB_VC2_STRING;
case 0x50000703: case 0x50000703:
return PAPB_VC3_STRING; return PAPB_VC3_STRING;
case 0x50000704:
return PDEC_HANDLER_STRING;
case 0x50000800: case 0x50000800:
return CCSDS_HANDLER_STRING; return CCSDS_HANDLER_STRING;
case 0x51000500: case 0x51000500:

View File

@ -36,9 +36,6 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
DeviceHandlerIF::PERFORM_OPERATION); DeviceHandlerIF::PERFORM_OPERATION);
#endif #endif
#if OBSW_ADD_RTD_DEVICES == 1 #if OBSW_ADD_RTD_DEVICES == 1
thisSequence->addSlot(objects::RTD_IC_0, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_IC_1, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_IC_2, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_IC_3, length * 0, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::RTD_IC_3, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_IC_4, length * 0, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::RTD_IC_4, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_IC_5, length * 0, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::RTD_IC_5, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
@ -52,6 +49,9 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
thisSequence->addSlot(objects::RTD_IC_13, length * 0, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::RTD_IC_13, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_IC_14, length * 0, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::RTD_IC_14, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_IC_15, length * 0, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::RTD_IC_15, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_IC_16, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_IC_17, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_IC_18, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
#endif /* OBSW_ADD_RTD_DEVICES */ #endif /* OBSW_ADD_RTD_DEVICES */
#if OBSW_ADD_TMP_DEVICES == 1 #if OBSW_ADD_TMP_DEVICES == 1
@ -59,9 +59,6 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.2, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.2, DeviceHandlerIF::SEND_WRITE);
#endif #endif
#if OBSW_ADD_RTD_DEVICES == 1 #if OBSW_ADD_RTD_DEVICES == 1
thisSequence->addSlot(objects::RTD_IC_0, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_IC_1, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_IC_2, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_IC_3, length * 0.2, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::RTD_IC_3, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_IC_4, length * 0.2, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::RTD_IC_4, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_IC_5, length * 0.2, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::RTD_IC_5, length * 0.2, DeviceHandlerIF::SEND_WRITE);
@ -75,6 +72,9 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
thisSequence->addSlot(objects::RTD_IC_13, length * 0.2, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::RTD_IC_13, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_IC_14, length * 0.2, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::RTD_IC_14, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_IC_15, length * 0.2, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::RTD_IC_15, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_IC_16, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_IC_17, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_IC_18, length * 0.2, DeviceHandlerIF::SEND_WRITE);
#endif /* OBSW_ADD_RTD_DEVICES */ #endif /* OBSW_ADD_RTD_DEVICES */
#if OBSW_ADD_TMP_DEVICES == 1 #if OBSW_ADD_TMP_DEVICES == 1
@ -82,9 +82,6 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.4, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.4, DeviceHandlerIF::GET_WRITE);
#endif #endif
#if OBSW_ADD_RTD_DEVICES == 1 #if OBSW_ADD_RTD_DEVICES == 1
thisSequence->addSlot(objects::RTD_IC_0, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_IC_1, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_IC_2, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_IC_3, length * 0.4, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::RTD_IC_3, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_IC_4, length * 0.4, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::RTD_IC_4, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_IC_5, length * 0.4, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::RTD_IC_5, length * 0.4, DeviceHandlerIF::GET_WRITE);
@ -98,6 +95,9 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
thisSequence->addSlot(objects::RTD_IC_13, length * 0.4, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::RTD_IC_13, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_IC_14, length * 0.4, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::RTD_IC_14, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_IC_15, length * 0.4, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::RTD_IC_15, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_IC_16, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_IC_17, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_IC_18, length * 0.4, DeviceHandlerIF::GET_WRITE);
#endif /* OBSW_ADD_RTD_DEVICES */ #endif /* OBSW_ADD_RTD_DEVICES */
#if OBSW_ADD_TMP_DEVICES == 1 #if OBSW_ADD_TMP_DEVICES == 1
@ -105,9 +105,6 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.6, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.6, DeviceHandlerIF::SEND_READ);
#endif #endif
#if OBSW_ADD_RTD_DEVICES == 1 #if OBSW_ADD_RTD_DEVICES == 1
thisSequence->addSlot(objects::RTD_IC_0, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_IC_1, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_IC_2, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_IC_3, length * 0.6, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::RTD_IC_3, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_IC_4, length * 0.6, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::RTD_IC_4, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_IC_5, length * 0.6, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::RTD_IC_5, length * 0.6, DeviceHandlerIF::SEND_READ);
@ -121,6 +118,9 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
thisSequence->addSlot(objects::RTD_IC_13, length * 0.6, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::RTD_IC_13, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_IC_14, length * 0.6, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::RTD_IC_14, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_IC_15, length * 0.6, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::RTD_IC_15, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_IC_16, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_IC_17, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_IC_18, length * 0.6, DeviceHandlerIF::SEND_READ);
#endif /* OBSW_ADD_RTD_DEVICES */ #endif /* OBSW_ADD_RTD_DEVICES */
#if OBSW_ADD_TMP_DEVICES == 1 #if OBSW_ADD_TMP_DEVICES == 1
@ -128,9 +128,6 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.8, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.8, DeviceHandlerIF::GET_READ);
#endif #endif
#if OBSW_ADD_RTD_DEVICES == 1 #if OBSW_ADD_RTD_DEVICES == 1
thisSequence->addSlot(objects::RTD_IC_0, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_IC_1, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_IC_2, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_IC_3, length * 0.8, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::RTD_IC_3, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_IC_4, length * 0.8, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::RTD_IC_4, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_IC_5, length * 0.8, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::RTD_IC_5, length * 0.8, DeviceHandlerIF::GET_READ);
@ -144,6 +141,9 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
thisSequence->addSlot(objects::RTD_IC_13, length * 0.8, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::RTD_IC_13, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_IC_14, length * 0.8, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::RTD_IC_14, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_IC_15, length * 0.8, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::RTD_IC_15, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_IC_16, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_IC_17, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_IC_18, length * 0.8, DeviceHandlerIF::GET_READ);
#endif /* OBSW_ADD_RTD_DEVICES */ #endif /* OBSW_ADD_RTD_DEVICES */
#if OBSW_ADD_RAD_SENSORS == 1 #if OBSW_ADD_RAD_SENSORS == 1
@ -439,8 +439,8 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
#endif #endif
#if OBSW_ADD_ACS_BOARD == 1 #if OBSW_ADD_ACS_BOARD == 1
bool enableAside = true; bool enableAside = false;
bool enableBside = false; bool enableBside = true;
if(enableAside) { if(enableAside) {
// A side // A side
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0,

View File

@ -1,6 +1,9 @@
target_sources(${TARGET_NAME} PUBLIC target_sources(${TARGET_NAME} PUBLIC
PapbVcInterface.cpp PapbVcInterface.cpp
Ptme.cpp Ptme.cpp
PdecHandler.cpp
PdecConfig.cpp
PtmeRateSetter.cpp
) )

36
linux/obc/PdecConfig.cpp Normal file
View File

@ -0,0 +1,36 @@
#include "PdecConfig.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
PdecConfig::PdecConfig() {
initialize();
}
PdecConfig::~PdecConfig() {
}
void PdecConfig::initialize() {
uint32_t word = 0;
word |= (VERSION_ID << 30);
word |= (BYPASS_FLAG << 29);
word |= (CONTROL_COMMAND_FLAG << 28);
word |= (RESERVED_FIELD_A << 26);
word |= (SPACECRAFT_ID << 16);
word |= (VIRTUAL_CHANNEL << 10);
word |= (DUMMY_BITS << 8);
word |= POSITIVE_WINDOW;
configWords[0] = word;
word = 0;
word |= (NEGATIVE_WINDOW << 24);
word |= (HIGH_AU_MAP_ID << 16);
word |= (ENABLE_DERANDOMIZER << 8);
configWords[1] = word;
}
uint32_t PdecConfig::getConfigWord(uint8_t wordNo) {
if (wordNo >= CONFIG_WORDS_NUM) {
sif::error << "PdecConfig::getConfigWord: Invalid word number" << std::endl;
return 0;
}
return configWords[wordNo];
}

52
linux/obc/PdecConfig.h Normal file
View File

@ -0,0 +1,52 @@
#ifndef LINUX_OBC_PDECCONFIG_H_
#define LINUX_OBC_PDECCONFIG_H_
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include <cstring>
/**
* @brief This class generates the configuration words for the configuration memory of the PDEC
* IP Cores.
*
* @details Fields are initialized according to pecification in PDEC datasheet section 6.11.3.1
* PROM usage.
*
* @author J. Meier
*/
class PdecConfig {
public:
PdecConfig();
virtual ~PdecConfig();
/**
* @brief Returns the configuration word by specifying the position.
*/
uint32_t getConfigWord(uint8_t wordNo);
private:
// TC transfer frame configuration parameters
static const uint8_t VERSION_ID = 0;
// BD Frames
static const uint8_t BYPASS_FLAG = 1;
static const uint8_t CONTROL_COMMAND_FLAG = 0;
static const uint8_t VIRTUAL_CHANNEL = 0;
static const uint8_t RESERVED_FIELD_A = 0;
static const uint16_t SPACECRAFT_ID = 0x274;
static const uint16_t DUMMY_BITS = 0;
// Parameters to control the FARM for AD frames
// Set here for future use
static const uint8_t POSITIVE_WINDOW = 10;
static const uint8_t NEGATIVE_WINDOW = 151;
static const uint8_t HIGH_AU_MAP_ID = 0xF;
static const uint8_t ENABLE_DERANDOMIZER = 1;
static const uint8_t CONFIG_WORDS_NUM = 2;
uint32_t configWords[CONFIG_WORDS_NUM];
void initialize();
};
#endif /* LINUX_OBC_PDECCONFIG_H_ */

538
linux/obc/PdecHandler.cpp Normal file
View File

@ -0,0 +1,538 @@
#include <cstring>
#include <sstream>
#include <sys/mman.h>
#include <fcntl.h>
#include "PdecHandler.h"
#include "OBSWConfig.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/tmtcservices/TmTcMessage.h"
#include "fsfw/objectmanager/ObjectManager.h"
#include "fsfw/ipc/QueueFactory.h"
PdecHandler::PdecHandler(object_id_t objectId, object_id_t tcDestinationId,
LinuxLibgpioIF* gpioComIF, gpioId_t pdecReset, std::string uioConfigMemory,
std::string uioRamMemory, std::string uioRegisters) :
SystemObject(objectId), tcDestinationId(tcDestinationId), gpioComIF(gpioComIF), pdecReset(
pdecReset), uioConfigMemory(uioConfigMemory), uioRamMemory(uioRamMemory), uioRegisters(
uioRegisters), actionHelper(this, nullptr) {
commandQueue = QueueFactory::instance()->createMessageQueue(QUEUE_SIZE);
}
PdecHandler::~PdecHandler() {
}
ReturnValue_t PdecHandler::initialize() {
tcStore = ObjectManager::instance()->get<StorageManagerIF>(objects::TC_STORE);
if (tcStore == nullptr) {
sif::error << "PdecHandler::initialize: Invalid TC store" << std::endl;
return ObjectManagerIF::CHILD_INIT_FAILED;
}
tcDestination = ObjectManager::instance()->get<AcceptsTelecommandsIF>(
tcDestinationId);
if (tcDestination == nullptr) {
sif::error << "PdecHandler::initialize: Invalid tc destination specified" << std::endl;
return ObjectManagerIF::CHILD_INIT_FAILED;
}
ReturnValue_t result = RETURN_OK;
result = getRegisterAddress();
if (result != RETURN_OK) {
return ObjectManagerIF::CHILD_INIT_FAILED;
}
result = getConfigMemoryBaseAddress();
if (result != RETURN_OK) {
return ObjectManagerIF::CHILD_INIT_FAILED;
}
result = getRamBaseAddress();
if (result != RETURN_OK) {
return ObjectManagerIF::CHILD_INIT_FAILED;
}
writePdecConfig();
result = releasePdec();
if (result != RETURN_OK) {
return ObjectManagerIF::CHILD_INIT_FAILED;
}
result = actionHelper.initialize(commandQueue);
if (result != RETURN_OK) {
return result;
}
return RETURN_OK;
}
MessageQueueId_t PdecHandler::getCommandQueue() const {
return commandQueue->getId();
}
ReturnValue_t PdecHandler::getRegisterAddress() {
int fd = open(uioRegisters.c_str(), O_RDWR);
if (fd < 1) {
sif::warning << "PdecHandler::getRegisterAddress: Invalid UIO device file" << std::endl;
return RETURN_FAILED;
}
registerBaseAddress = static_cast<uint32_t*>(mmap(NULL, REGISTER_MAP_SIZE,
PROT_WRITE | PROT_READ, MAP_SHARED, fd, 0));
if (registerBaseAddress == MAP_FAILED) {
sif::error << "PdecHandler::getRegisterAddress: Failed to map uio address" << std::endl;
return RETURN_FAILED;
}
return RETURN_OK;
}
ReturnValue_t PdecHandler::getConfigMemoryBaseAddress() {
int fd = open(uioConfigMemory.c_str(), O_RDWR);
if (fd < 1) {
sif::warning << "PdecHandler::getConfigMemoryBaseAddress: Invalid UIO device file" << std::endl;
return RETURN_FAILED;
}
memoryBaseAddress = static_cast<uint32_t*>(mmap(NULL, CONFIG_MEMORY_MAP_SIZE, PROT_WRITE | PROT_READ,
MAP_SHARED, fd, 0));
if (memoryBaseAddress == MAP_FAILED) {
sif::error << "PdecHandler::getConfigMemoryBaseAddress: Failed to map uio address" << std::endl;
return RETURN_FAILED;
}
return RETURN_OK;
}
ReturnValue_t PdecHandler::getRamBaseAddress() {
int fd = open(uioRamMemory.c_str(), O_RDWR);
ramBaseAddress = static_cast<uint32_t*>(mmap(NULL, RAM_MAP_SIZE, PROT_WRITE | PROT_READ,
MAP_SHARED, fd, 0));
if (ramBaseAddress == MAP_FAILED) {
sif::error << "PdecHandler::getRamBaseAddress: Failed to map RAM base address" << std::endl;
return RETURN_FAILED;
}
return RETURN_OK;
}
void PdecHandler::writePdecConfig() {
PdecConfig pdecConfig;
*(memoryBaseAddress + FRAME_HEADER_OFFSET)= pdecConfig.getConfigWord(0);
*(memoryBaseAddress + FRAME_HEADER_OFFSET + 1) = pdecConfig.getConfigWord(1);
// Configure all MAP IDs as invalid
for (int idx = 0; idx <= MAX_MAP_ADDR; idx += 4) {
*(memoryBaseAddress + MAP_ADDR_LUT_OFFSET + idx + 1 / 4) = NO_DESTINATION << 24
| NO_DESTINATION << 16 | NO_DESTINATION << 8 | NO_DESTINATION;
}
// All TCs with MAP ID 7 will be routed to the PM module (can then be read from memory)
uint8_t routeToPm = calcMapAddrEntry(PM_BUFFER);
*(memoryBaseAddress + MAP_ADDR_LUT_OFFSET + 1) = (NO_DESTINATION << 24) | (NO_DESTINATION << 16) | (NO_DESTINATION << 8)
| routeToPm;
// Write map id clock frequencies
for (int idx = 0; idx <= MAX_MAP_ADDR; idx += 4) {
*(memoryBaseAddress + MAP_CLK_FREQ_OFFSET + idx / 4) = MAP_CLK_FREQ << 24
| MAP_CLK_FREQ << 16 | MAP_CLK_FREQ << 8 | MAP_CLK_FREQ;
}
}
ReturnValue_t PdecHandler::resetFarStatFlag() {
uint32_t pdecFar = *(registerBaseAddress + PDEC_FAR_OFFSET);
if (pdecFar != FAR_RESET) {
sif::warning << "PdecHandler::resetFarStatFlag: FAR register did not match expected value."
<< " Read value: 0x" << std::hex << static_cast<unsigned int>(pdecFar) << std::endl;
return RETURN_FAILED;
}
#if OBSW_DEBUG_PDEC_HANDLER == 1
sif::debug << "PdecHandler::resetFarStatFlag: read FAR with value: 0x" << std::hex << pdecFar
<< std::endl;
#endif /* OBSW_DEBUG_PDEC_HANDLER == 1 */
return RETURN_OK;
}
ReturnValue_t PdecHandler::releasePdec() {
ReturnValue_t result = RETURN_OK;
result = gpioComIF->pullHigh(pdecReset);
if (result != RETURN_OK) {
sif::error << "PdecHandler::releasePdec: Failed to release PDEC reset signal" << std::endl;
}
return result;
}
ReturnValue_t PdecHandler::performOperation(uint8_t operationCode) {
ReturnValue_t result = RETURN_OK;
readCommandQueue();
switch(state) {
case State::INIT:
resetFarStatFlag();
if (result != RETURN_OK) {
// Requires reconfiguration and reinitialization of PDEC
triggerEvent(INVALID_FAR);
state = State::WAIT_FOR_RECOVERY;
return result;
}
state = State::RUNNING;
break;
case State::RUNNING:
if (newTcReceived()) {
handleNewTc();
}
checkLocks();
break;
case State::WAIT_FOR_RECOVERY:
break;
default:
sif::debug << "PdecHandler::performOperation: Invalid state" << std::endl;
break;
}
return RETURN_OK;
}
void PdecHandler::readCommandQueue(void) {
CommandMessage commandMessage;
ReturnValue_t result = RETURN_FAILED;
result = commandQueue->receiveMessage(&commandMessage);
if (result == RETURN_OK) {
result = actionHelper.handleActionMessage(&commandMessage);
if (result == RETURN_OK) {
return;
}
CommandMessage reply;
reply.setReplyRejected(CommandMessage::UNKNOWN_COMMAND,
commandMessage.getCommand());
commandQueue->reply(&reply);
return;
}
}
bool PdecHandler::newTcReceived() {
uint32_t pdecFar = *(registerBaseAddress + PDEC_FAR_OFFSET);
if (pdecFar >> STAT_POSITION != NEW_FAR_RECEIVED) {
return false;
}
if (!checkFrameAna(pdecFar)) {
return false;
}
return true;
}
void PdecHandler::checkLocks() {
uint32_t clcw = getClcw();
if (!(clcw & NO_RF_MASK) && (lastClcw & NO_RF_MASK)) {
// Rf available changed from 0 to 1
triggerEvent(CARRIER_LOCK);
}
if (!(clcw & NO_BITLOCK_MASK) && (lastClcw & NO_BITLOCK_MASK)) {
// Bit lock changed from 0 to 1
triggerEvent(BIT_LOCK_PDEC);
}
lastClcw = clcw;
}
bool PdecHandler::checkFrameAna(uint32_t pdecFar) {
bool frameValid = false;
FrameAna_t frameAna = static_cast<FrameAna_t>((pdecFar & FRAME_ANA_MASK) >> FRAME_ANA_POSITION);
switch(frameAna) {
case(FrameAna_t::ABANDONED_CLTU): {
triggerEvent(INVALID_TC_FRAME, ABANDONED_CLTU);
sif::warning << "PdecHandler::checkFrameAna: Abondoned CLTU" << std::endl;
break;
}
case(FrameAna_t::FRAME_DIRTY): {
triggerEvent(INVALID_TC_FRAME, FRAME_DIRTY);
sif::debug << "PdecHandler::checkFrameAna: Frame dirty" << std::endl;
break;
}
case(FrameAna_t::FRAME_ILLEGAL): {
sif::warning << "PdecHandler::checkFrameAna: Frame illegal for one reason" << std::endl;
handleIReason(pdecFar, FRAME_ILLEGAL_ONE_REASON);
break;
}
case(FrameAna_t::FRAME_ILLEGAL_MULTI_REASON): {
sif::warning << "PdecHandler::checkFrameAna: Frame illegal for multiple reasons"
<< std::endl;
handleIReason(pdecFar, FRAME_ILLEGAL_MULTIPLE_REASONS);
break;
}
case(FrameAna_t::AD_DISCARDED_LOCKOUT): {
triggerEvent(INVALID_TC_FRAME, AD_DISCARDED_LOCKOUT);
sif::warning << "PdecHandler::checkFrameAna: AD frame discarded because of lockout"
<< std::endl;
break;
}
case(FrameAna_t::AD_DISCARDED_WAIT): {
triggerEvent(INVALID_TC_FRAME, AD_DISCARDED_LOCKOUT);
sif::warning << "PdecHandler::checkFrameAna: AD frame discarded because of wait"
<< std::endl;
break;
}
case(FrameAna_t::AD_DISCARDED_NS_VR): {
triggerEvent(INVALID_TC_FRAME, AD_DISCARDED_NS_VS);
sif::warning << "PdecHandler::checkFrameAna: AD frame discarded because N(S) or V(R)"
<< std::endl;
break;
}
case(FrameAna_t::FRAME_ACCEPTED): {
#if OBSW_DEBUG_PDEC_HANDLER == 1
sif::info << "PdecHandler::checkFrameAna: Accepted TC frame" << std::endl;
#endif
frameValid = true;
break;
}
default: {
sif::debug << "PdecHandler::checkFrameAna: Invalid frame analysis report" << std::endl;
break;
}
}
return frameValid;
}
void PdecHandler::handleIReason(uint32_t pdecFar, ReturnValue_t parameter1) {
IReason_t ireason = static_cast<IReason_t>((pdecFar & IREASON_MASK) >> IREASON_POSITION);
switch(ireason) {
case(IReason_t::NO_REPORT): {
triggerEvent(INVALID_TC_FRAME, parameter1, NO_REPORT);
sif::debug << "PdecHandler::handleIReason: No illegal report" << std::endl;
break;
}
case(IReason_t::ERROR_VERSION_NUMBER): {
triggerEvent(INVALID_TC_FRAME, parameter1, ERROR_VERSION_NUMBER);
sif::debug << "PdecHandler::handleIReason: Error in version number and reserved A and B "
<< "fields" << std::endl;
break;
}
case(IReason_t::ILLEGAL_COMBINATION): {
triggerEvent(INVALID_TC_FRAME, parameter1, ILLEGAL_COMBINATION);
sif::debug << "PdecHandler::handleIReason: Illegal combination (AC) of bypass and control "
<< "command flags" << std::endl;
break;
}
case(IReason_t::INVALID_SC_ID): {
triggerEvent(INVALID_TC_FRAME, parameter1, INVALID_SC_ID);
sif::debug << "PdecHandler::handleIReason: Invalid spacecraft identifier " << std::endl;
break;
}
case(IReason_t::INVALID_VC_ID_MSB): {
triggerEvent(INVALID_TC_FRAME, parameter1, INVALID_VC_ID_MSB);
sif::debug << "PdecHandler::handleIReason: VC identifier bit 0 to 4 did not match "
<< std::endl;
break;
}
case(IReason_t::INVALID_VC_ID_LSB): {
triggerEvent(INVALID_TC_FRAME, parameter1, INVALID_VC_ID_LSB);
sif::debug << "PdecHandler::handleIReason: VC identifier bit 5 did not match " << std::endl;
break;
}
case(IReason_t::NS_NOT_ZERO): {
triggerEvent(INVALID_TC_FRAME, parameter1, NS_NOT_ZERO);
sif::debug << "PdecHandler::handleIReason: N(S) of BC or BD frame not set to all zeros"
<< std::endl;
break;
}
case(IReason_t::INCORRECT_BC_CC): {
triggerEvent(INVALID_TC_FRAME, parameter1, INVALID_BC_CC);
sif::debug << "PdecHandler::handleIReason: Invalid BC control command format" << std::endl;
break;
}
default: {
sif::debug << "PdecHandler::handleIReason: Invalid reason id" << std::endl;
break;
}
}
}
void PdecHandler::handleNewTc() {
ReturnValue_t result = RETURN_OK;
uint32_t tcLength = 0;
result = readTc(tcLength);
if (result != RETURN_OK) {
return;
}
#if OBSW_DEBUG_PDEC_HANDLER == 1
unsigned int mapId = tcSegment[0] & MAP_ID_MASK;
sif::debug << "PdecHandler::handleNewTc: Received TC segment with map ID " << mapId
<< std::endl;
printTC(tcLength);
#endif /* OBSW_DEBUG_PDEC_HANDLER */
store_address_t storeId;
result = tcStore->addData(&storeId, tcSegment + 1, tcLength - 1);
if (result != RETURN_OK) {
sif::warning << "PdecHandler::handleNewTc: Failed to add received space packet to store"
<< std::endl;
return;
}
TmTcMessage message(storeId);
result = MessageQueueSenderIF::sendMessage(tcDestination->getRequestQueue(), &message);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "PdecHandler::handleNewTc: Failed to send message to TC destination"
<< std::endl;
tcStore->deleteData(storeId);
return;
}
return;
}
ReturnValue_t PdecHandler::readTc(uint32_t& tcLength) {
uint32_t tcOffset = (*(registerBaseAddress + PDEC_BPTR_OFFSET) - PHYSICAL_RAM_BASE_ADDRESS) / 4;
#if OBSW_DEBUG_PDEC_HANDLER == 1
sif::debug << "PdecHandler::readTc: TC offset: 0x" << std::hex << tcOffset << std::endl;
#endif /* OBSW_DEBUG_PDEC_HANDLER */
tcLength = *(registerBaseAddress + PDEC_SLEN_OFFSET);
#if OBSW_DEBUG_PDEC_HANDLER == 1
sif::debug << "PdecHandler::readTc: TC segment length: " << std::dec << tcLength << std::endl;
#endif /* OBSW_DEBUG_PDEC_HANDLER */
if (tcLength > MAX_TC_SEGMENT_SIZE) {
sif::warning << "PdecHandler::handleNewTc: Read invalid TC length from PDEC register"
<< std::endl;
return RETURN_FAILED;
}
uint32_t idx = 0;
uint32_t tcData = 0;
for (idx = 0; idx <= tcLength; idx = idx + 4) {
tcData = *(ramBaseAddress + tcOffset + idx / 4);
if (idx == 0) {
tcSegment[idx] = static_cast<uint8_t>((tcData >> 16) & 0xFF);
tcSegment[idx + 1] = static_cast<uint8_t>((tcData >> 8) & 0xFF);
tcSegment[idx + 2] = static_cast<uint8_t>(tcData & 0xFF);
}
else if (tcLength - idx + 1 == 3) {
tcSegment[idx - 1] = static_cast<uint8_t>((tcData >> 24) & 0xFF);
tcSegment[idx] = static_cast<uint8_t>((tcData >> 16) & 0xFF);
tcSegment[idx + 1] = static_cast<uint8_t>((tcData >> 8) & 0xFF);
}
else if (tcLength - idx + 1 == 2) {
tcSegment[idx - 1] = static_cast<uint8_t>((tcData >> 24) & 0xFF);
tcSegment[idx] = static_cast<uint8_t>((tcData >> 16) & 0xFF);
}
else if (tcLength - idx + 1 == 1) {
tcSegment[idx - 1] = static_cast<uint8_t>((tcData >> 24) & 0xFF);
}
else {
tcSegment[idx - 1] = static_cast<uint8_t>((tcData >> 24) & 0xFF);
tcSegment[idx] = static_cast<uint8_t>((tcData >> 16) & 0xFF);
tcSegment[idx + 1] = static_cast<uint8_t>((tcData >> 8) & 0xFF);
tcSegment[idx + 2] = static_cast<uint8_t>(tcData & 0xFF);
}
}
// Backend buffer is handled back to PDEC3
*(registerBaseAddress + PDEC_BFREE_OFFSET) = 0;
return RETURN_OK;
}
void PdecHandler::printTC(uint32_t tcLength) {
std::stringstream tcSegmentStream;
tcSegmentStream << "TC segment data: 0x";
for (uint32_t idx = 0; idx < tcLength; idx++) {
tcSegmentStream << std::setfill('0') << std::setw(2) << std::hex
<< static_cast<unsigned int>(tcSegment[idx]);
}
sif::debug << tcSegmentStream.str() << std::endl;
}
uint8_t PdecHandler::calcMapAddrEntry(uint8_t moduleId) {
uint8_t lutEntry = 0;
uint8_t parity = getOddParity(moduleId | (1 << VALID_POSITION));
lutEntry = (parity << PARITY_POSITION) | (1 << VALID_POSITION) | moduleId;
return lutEntry;
}
uint8_t PdecHandler::getOddParity(uint8_t number) {
uint8_t parityBit = 0;
uint8_t countBits = 0;
for (unsigned int idx = 0; idx < sizeof(number) * 8; idx++) {
countBits += (number >> idx) & 0x1;
}
parityBit = ~(countBits & 0x1) & 0x1;
return parityBit;
}
uint32_t PdecHandler::getClcw() {
return *(registerBaseAddress + PDEC_CLCW_OFFSET);
}
void PdecHandler::printClcw() {
uint32_t clcw = getClcw();
uint8_t type = static_cast<uint8_t>((clcw >> 31) & 0x1);
uint8_t versionNo = static_cast<uint8_t>((clcw >> 29) & 0x3);
uint8_t status = static_cast<uint8_t>((clcw >> 26) & 0x7);
uint8_t cop = static_cast<uint8_t>((clcw >> 24) & 0x3);
uint8_t vcId = static_cast<uint8_t>((clcw >> 18) & 0x3F);
uint8_t noRf = static_cast<uint8_t>((clcw >> 15) & 0x1);
uint8_t noBitLock = static_cast<uint8_t>((clcw >> 14) & 0x1);
uint8_t lockoutFlag = static_cast<uint8_t>((clcw >> 13) & 0x1);
uint8_t waitFlag = static_cast<uint8_t>((clcw >> 12) & 0x1);
uint8_t retransmitFlag = static_cast<uint8_t>((clcw >> 11) & 0x1);
uint8_t farmBcnt = static_cast<uint8_t>((clcw >> 9) & 0x3);
// Expected frame sequence number in te next AD frame
uint8_t repValue = static_cast<uint8_t>(clcw & 0xFF);
sif::info << std::setw(30) << std::left << "CLCW type: " << std::hex
<< "0x" << static_cast<unsigned int>(type) << std::endl;
sif::info << std::setw(30) << std::left << "CLCW version no: " << std::hex
<< "0x" << static_cast<unsigned int>(versionNo) << std::endl;
sif::info << std::setw(30) << std::left << "CLCW status: " << std::hex
<< "0x" << static_cast<unsigned int>(status) << std::endl;
sif::info << std::setw(30) << std::left << "CLCW COP: " << std::hex
<< "0x" << static_cast<unsigned int>(cop) << std::endl;
sif::info << std::setw(30) << std::left << "CLCW virtual channel ID: " << std::hex
<< "0x" << static_cast<unsigned int>(vcId) << std::endl;
sif::info << std::setw(30) << std::left << "CLCW no RF: " << std::hex
<< "0x" << static_cast<unsigned int>(noRf) << std::endl;
sif::info << std::setw(30) << std::left << "CLCW no bit lock: " << std::hex
<< "0x" << static_cast<unsigned int>(noBitLock) << std::endl;
sif::info << std::setw(30) << std::left << "CLCW lockout flag: " << std::hex
<< "0x" << static_cast<unsigned int>(lockoutFlag) << std::endl;
sif::info << std::setw(30) << std::left << "CLCW wait flag: " << std::hex
<< "0x" << static_cast<unsigned int>(waitFlag) << std::endl;
sif::info << std::setw(30) << std::left << "CLCW retransmit flag: " << std::hex
<< "0x" << static_cast<unsigned int>(retransmitFlag) << std::endl;
sif::info << std::setw(30) << std::left << "CLCW FARM B count: " << std::hex
<< "0x" << static_cast<unsigned int>(farmBcnt) << std::endl;
sif::info << std::setw(30) << std::left << "CLCW rep value: " << std::hex
<< "0x" << static_cast<unsigned int>(repValue) << std::endl;
}
ReturnValue_t PdecHandler::executeAction(ActionId_t actionId,
MessageQueueId_t commandedBy, const uint8_t* data, size_t size) {
switch(actionId) {
case PRINT_CLCW:
printClcw();
return EXECUTION_FINISHED;
default:
return COMMAND_NOT_IMPLEMENTED;
}
}

383
linux/obc/PdecHandler.h Normal file
View File

@ -0,0 +1,383 @@
#ifndef LINUX_OBC_PDECHANDLER_H_
#define LINUX_OBC_PDECHANDLER_H_
#include "OBSWConfig.h"
#include "PdecConfig.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include "fsfw_hal/common/gpio/gpioDefinitions.h"
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
#include "fsfw/tmtcservices/AcceptsTelecommandsIF.h"
#include "fsfw/storagemanager/StorageManagerIF.h"
#include "fsfw/objectmanager/SystemObject.h"
#include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw/action/ActionHelper.h"
#include "fsfw/action/HasActionsIF.h"
/**
* @brief This class controls the PDEC IP Core implemented in the programmable logic of the
* Zynq-7020. All registers and memories of the PDEC IP Core are accessed via UIO
* drivers.
*
* @details The PDEC IP Core is responsible for processing data received in form of CLTUs from the
* S-Band transceiver. This comprises the BCH decoding of the CLTUs and reconstruction of
* telecommand transfer frames. Finally the PDEC stores the TC segment transported with
* the TC transfer frame in a register. As soon as a new TC has been received a new
* frame acceptance report (FAR) will be generated. If the FAR confirms the validity of
* a received TC segment, the data can be read out from the associated register.
* Currently, the ground software only supports transmissions of CLTUs containing one
* space packet.
* Link to datasheet of PDEC IP Core: https://eive-cloud.irs.uni-stuttgart.de/index.php/
* apps/files/?dir=/EIVE_IRS/Arbeitsdaten/08_Used%20Components/CCSDS_IP_Cores&fileid=1108967
*
* @author J. Meier
*/
class PdecHandler : public SystemObject,
public ExecutableObjectIF,
public HasReturnvaluesIF,
public HasActionsIF {
public:
/**
* @brief Constructor
* @param objectId Object ID of PDEC handler system object
* @param tcDestinationId Object ID of object responsible for processing TCs.
* @param gpioComIF Pointer to GPIO interace responsible for driving GPIOs.
* @param pdecReset GPIO ID of GPIO connected to the reset signal of the PDEC.
* @param uioConfigMemory String of uio device file same mapped to the PDEC memory space
* @param uioregsiters String of uio device file same mapped to the PDEC register space
*/
PdecHandler(object_id_t objectId, object_id_t tcDestinationId, LinuxLibgpioIF* gpioComIF,
gpioId_t pdecReset, std::string uioConfigMemory, std::string uioRamMemory,
std::string uioRegisters);
virtual ~PdecHandler();
ReturnValue_t performOperation(uint8_t operationCode = 0);
ReturnValue_t initialize() override;
MessageQueueId_t getCommandQueue() const;
ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t* data, size_t size) override;
/**
* brief Returns the 32-bit wide communication link control word (CLCW)
*/
uint32_t getClcw();
/**
* @rief Reads and prints the CLCW. Can be useful for debugging.
*/
void printClcw();
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PDEC_HANDLER;
//! [EXPORT] : [COMMENT] Frame acceptance report signals an invalid frame
//! P1: The frame analysis information (FrameAna field of PDEC_FAR register)
//! P2: When frame declared illegal this parameter this parameter gives information about the reason (IReason field of the PDEC_FAR register)
static const Event INVALID_TC_FRAME = MAKE_EVENT(1, severity::HIGH);
//! [EXPORT] : [COMMENT] Read invalid FAR from PDEC after startup
static const Event INVALID_FAR = MAKE_EVENT(2, severity::HIGH);
//! [EXPORT] : [COMMENT] Carrier lock detected
static const Event CARRIER_LOCK = MAKE_EVENT(3, severity::INFO);
//! [EXPORT] : [COMMENT] Bit lock detected (data valid)
static const Event BIT_LOCK_PDEC = MAKE_EVENT(4, severity::INFO);
private:
static const uint8_t INTERFACE_ID = CLASS_ID::PDEC_HANDLER;
static const ReturnValue_t ABANDONED_CLTU = MAKE_RETURN_CODE(0xA0);
static const ReturnValue_t FRAME_DIRTY = MAKE_RETURN_CODE(0xA1);
static const ReturnValue_t FRAME_ILLEGAL_ONE_REASON = MAKE_RETURN_CODE(0xA2);
static const ReturnValue_t FRAME_ILLEGAL_MULTIPLE_REASONS = MAKE_RETURN_CODE(0xA2);
static const ReturnValue_t AD_DISCARDED_LOCKOUT = MAKE_RETURN_CODE(0xA3);
static const ReturnValue_t AD_DISCARDED_WAIT = MAKE_RETURN_CODE(0xA4);
static const ReturnValue_t AD_DISCARDED_NS_VS = MAKE_RETURN_CODE(0xA5);
//! [EXPORT] : [COMMENT] Received action message with unknown action id
static const ReturnValue_t COMMAND_NOT_IMPLEMENTED = MAKE_RETURN_CODE(0xB0);
static const ReturnValue_t NO_REPORT = MAKE_RETURN_CODE(0xA6);
//! Error in version number and reserved A and B fields
static const ReturnValue_t ERROR_VERSION_NUMBER = MAKE_RETURN_CODE(0xA7);
//! Illegal combination of bypass and control command flag
static const ReturnValue_t ILLEGAL_COMBINATION = MAKE_RETURN_CODE(0xA8);
//! Spacecraft identifier did not match
static const ReturnValue_t INVALID_SC_ID = MAKE_RETURN_CODE(0xA9);
//! VC identifier bits 0 to 4 did not match
static const ReturnValue_t INVALID_VC_ID_MSB = MAKE_RETURN_CODE(0xAA);
//! VC identifier bit 5 did not match
static const ReturnValue_t INVALID_VC_ID_LSB = MAKE_RETURN_CODE(0xAB);
//! N(S) of BC or BD frame not set to all zeros
static const ReturnValue_t NS_NOT_ZERO = MAKE_RETURN_CODE(0xAC);
//! Invalid BC control command
static const ReturnValue_t INVALID_BC_CC = MAKE_RETURN_CODE(0xAE);
static const uint32_t QUEUE_SIZE = common::CCSDS_HANDLER_QUEUE_SIZE;
// Action IDs
static const ActionId_t PRINT_CLCW = 0;
static const uint8_t STAT_POSITION = 31;
static const uint8_t FRAME_ANA_POSITION = 28;
static const uint8_t IREASON_POSITION = 25;
static const uint8_t NEW_FAR_RECEIVED = 0;
static const uint32_t FRAME_ANA_MASK = 0x70000000;
static const uint32_t IREASON_MASK = 0x0E000000;
/**
* UIO is 4 byte aligned. Thus offset is calculated with "true offset" / 4
* Example: PDEC_FAR = 0x2840 => Offset in virtual address space is 0xA10
*/
static const uint32_t PDEC_FAR_OFFSET = 0xA10;
static const uint32_t PDEC_CLCW_OFFSET = 0xA12;
static const uint32_t PDEC_BFREE_OFFSET = 0xA24;
static const uint32_t PDEC_BPTR_OFFSET = 0xA25;
static const uint32_t PDEC_SLEN_OFFSET = 0xA26;
static const uint32_t PDEC_MON = 0xA27;
#if BOARD_TE0720 == 1
static const int CONFIG_MEMORY_MAP_SIZE = 0x400;
static const int RAM_MAP_SIZE = 0x4000;
static const int REGISTER_MAP_SIZE = 0x10000;
#else
static const int CONFIG_MEMORY_MAP_SIZE = 0x400;
static const int RAM_MAP_SIZE = 0x4000;
static const int REGISTER_MAP_SIZE = 0x4000;
#endif /* BOARD_TE0720 == 1 */
// 0x200 / 4 = 0x80
static const uint32_t FRAME_HEADER_OFFSET = 0x80;
static const size_t MAX_TC_SEGMENT_SIZE = 1017;
static const uint8_t MAP_ID_MASK = 0x3F;
#if BOARD_TE0720 == 1
static const uint32_t PHYSICAL_RAM_BASE_ADDRESS = 0x32000000;
#else
static const uint32_t PHYSICAL_RAM_BASE_ADDRESS = 0x26000000;
#endif
static const uint32_t MAP_ADDR_LUT_OFFSET = 0xA0;
static const uint32_t MAP_CLK_FREQ_OFFSET = 0x90;
static const uint8_t MAX_MAP_ADDR = 63;
// Writing this to the map address in the look up table will invalidate a MAP ID.
static const uint8_t NO_DESTINATION = 0;
static const uint8_t VALID_POSITION = 6;
static const uint8_t PARITY_POSITION = 7;
// Expected value stored in FAR register after reset
static const uint32_t FAR_RESET = 0x7FE0;
static const uint32_t TC_SEGMENT_LEN = 1017;
static const uint32_t NO_RF_MASK = 0x8000;
static const uint32_t NO_BITLOCK_MASK = 0x4000;
/**
* TCs with map addresses (also know as Map IDs) assigned to this channel will be stored in
* the PDEC memory.
*/
static const uint8_t PM_BUFFER = 7;
// MAP clock frequency. Must be a value between 1 and 13 otherwise the TC segment will be
// discarded
static const uint8_t MAP_CLK_FREQ = 2;
enum class FrameAna_t: uint8_t {
ABANDONED_CLTU,
FRAME_DIRTY,
FRAME_ILLEGAL,
FRAME_ILLEGAL_MULTI_REASON,
AD_DISCARDED_LOCKOUT,
AD_DISCARDED_WAIT,
AD_DISCARDED_NS_VR,
FRAME_ACCEPTED
};
enum class IReason_t: uint8_t {
NO_REPORT,
ERROR_VERSION_NUMBER,
ILLEGAL_COMBINATION,
INVALID_SC_ID,
INVALID_VC_ID_LSB,
INVALID_VC_ID_MSB,
NS_NOT_ZERO,
INCORRECT_BC_CC
};
enum class State: uint8_t {
INIT,
RUNNING,
WAIT_FOR_RECOVERY
};
/**
* @brief Reads and handles messages stored in the commandQueue
*/
void readCommandQueue(void);
/**
* @brief Opens UIO device assigned to AXI to AHB converter giving access to the PDEC
* registers. The register base address will be mapped into the virtual address space.
*/
ReturnValue_t getRegisterAddress();
/**
* @brief Opens UIO device assigned to the base address of the PDEC memory space and maps the
* physical address into the virtual address space.
*/
ReturnValue_t getConfigMemoryBaseAddress();
/**
* @brief Opens UIO device assigned to the RAM section of the PDEC IP core memory map.
*
* @details A received TC segment will be written to this memory area.
*/
ReturnValue_t getRamBaseAddress();
/**
* @brief This functions writes the configuration parameters to the configuration
* section of the PDEC.
*/
void writePdecConfig();
/**
* @brief Reading the FAR resets the set stat flag which signals a new TC. Without clearing
* this flag no new TC will be excepted. After start up the flag is set and needs
* to be reset.
* Stat flag 0 - new TC received
* Stat flag 1 - old TC (ready to receive next TC)
*/
ReturnValue_t resetFarStatFlag();
/**
* @brief Releases the PDEC from reset state. PDEC will start with loading the written
* configuration parameters.
*/
ReturnValue_t releasePdec();
/**
* @brief Reads the FAR register and checks if a new TC has been received.
*/
bool newTcReceived();
/**
* @brief Checks if carrier lock or bit lock has been detected and triggers appropriate
* event.
*/
void checkLocks();
/**
* @brief Analyzes the FramAna field (frame analysis data) of a FAR report.
*
* @return True if frame valid, otherwise false.
*/
bool checkFrameAna(uint32_t pdecFar);
/**
* @brief This function handles the IReason field of the frame analysis report.
*
* @details In case frame as been declared illegal for multiple reasons, the reason with the
* lowest value will be shown.
*/
void handleIReason(uint32_t pdecFar, ReturnValue_t parameter1);
/**
* @brief Handles the reception of new TCs. Reads the pointer to the storage location of the
* new TC segment, extracts the PUS packet and forwards the data to the object
* responsible for processing the TC.
*/
void handleNewTc();
/**
* @brief Function reads the last received TC segment from the PDEC memory and copies
* the data to the tcSegement array.
*
* @param tcLength The length of the received TC.
*
*/
ReturnValue_t readTc(uint32_t& tcLength);
/**
* @brief Prints the tc segment data
*/
void printTC(uint32_t tcLength);
/**
* @brief This function calculates the entry for the configuration of the MAP ID routing.
*
* @param mapAddr The MAP ID to configure
* @param moduleId The destination module where all TCs with the map id mapAddr will be routed
* to.
*
* @details The PDEC has different modules where the TCs can be routed to. A lookup table is
* used which links the MAP ID field to the destination module. The entry for this
* lookup table is created by this function and must be stored in the configuration
* memory region of the PDEC. The entry has a specific format
*/
uint8_t calcMapAddrEntry(uint8_t moduleId);
/**
* @brief This functions calculates the odd parity of the bits in number.
*
* @param number The number from which to calculate the odd parity.
*/
uint8_t getOddParity(uint8_t number);
object_id_t tcDestinationId;
AcceptsTelecommandsIF* tcDestination = nullptr;
LinuxLibgpioIF* gpioComIF = nullptr;
/**
* Reset signal is required to hold PDEC in reset state until the configuration has been
* written to the appropriate memory space.
* Can also be used to reboot PDEC in case of erros.
*/
gpioId_t pdecReset = gpio::NO_GPIO;
// UIO device file giving access to the PDEC configuration memory section
std::string uioConfigMemory;
// UIO device file giving access to the PDEC RAM section
std::string uioRamMemory;
// UIO device file giving access to the PDEC register space
std::string uioRegisters;
ActionHelper actionHelper;
StorageManagerIF* tcStore = nullptr;
MessageQueueIF* commandQueue = nullptr;
State state = State::INIT;
/**
* Pointer pointing to base address of the PDEC memory space.
* This address is equivalent with the base address of the section named configuration area in
* the PDEC datasheet.
*/
uint32_t* memoryBaseAddress = nullptr;
uint32_t* ramBaseAddress = nullptr;
// Pointer pointing to base address of register space
uint32_t* registerBaseAddress = nullptr;
uint32_t pdecFar = 0;
uint8_t tcSegment[TC_SEGMENT_LEN];
// Used to check carrier and bit lock changes (default set to no rf and no bitlock)
uint32_t lastClcw = 0xC000;
};
#endif /* LINUX_OBC_PDECHANDLER_H_ */

View File

@ -3,10 +3,10 @@
#include "fsfw/returnvalues/HasReturnvaluesIF.h" #include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include <cstring> #include <cstring>
#include "OBSWConfig.h"
/** /**
* @brief Configuration parameters derived from FPGA design and device tree. * @brief PTME specific configuration parameters derived from FPGA design and device tree.
* *
* @author J. Meier * @author J. Meier
*/ */
@ -19,8 +19,12 @@ namespace PtmeConfig {
static const uint32_t VC1_OFFSETT = 0x4000; static const uint32_t VC1_OFFSETT = 0x4000;
static const uint32_t VC2_OFFSETT = 0x8000; static const uint32_t VC2_OFFSETT = 0x8000;
static const uint32_t VC3_OFFSETT = 0xC000; static const uint32_t VC3_OFFSETT = 0xC000;
#if BOARD_TE0720 == 0
static const char UIO_DEVICE_FILE[] = "/dev/uio1";
#else
static const char UIO_DEVICE_FILE[] = "/dev/uio1";
#endif
static const char UIO_DEVICE_FILE[] = "/dev/uio0";
}; };
#endif /* LINUX_OBC_PTMECONFIG_H_ */ #endif /* LINUX_OBC_PTMECONFIG_H_ */

View File

@ -0,0 +1,27 @@
#include "PtmeRateSetter.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
PtmeRateSetter::PtmeRateSetter(gpioId_t bitrateSel, GpioIF* gpioif) :
bitrateSel(bitrateSel), gpioif(gpioif) {
}
PtmeRateSetter::~PtmeRateSetter() {
}
ReturnValue_t PtmeRateSetter::setRate(BitRates rate) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
switch(rate) {
case RATE_2000KHZ:
result = gpioif->pullHigh(bitrateSel);
break;
case RATE_400KHZ:
result = gpioif->pullLow(bitrateSel);
break;
default:
sif::debug << "PtmeRateSetter::setRate: Invalid rate" << std::endl;
result = HasReturnvaluesIF::RETURN_FAILED;
break;
}
return result;
}

View File

@ -0,0 +1,40 @@
#ifndef LINUX_OBC_PTMERATESETTER_H_
#define LINUX_OBC_PTMERATESETTER_H_
#include "TxRateSetterIF.h"
#include "fsfw_hal/common/gpio/gpioDefinitions.h"
#include "fsfw_hal/common/gpio/GpioIF.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
/**
* @brief Class to set the downlink bit rate by using the cadu_rate_switcher implemented in
* the programmable logic.
*
* @details The cadu_rate_switcher module sets the input rate to the syrlinks transceiver either
* to 2000 kHz (bitrateSel = 1) or 400 kHz (bitrate = 0).
*
* @author J. Meier
*/
class PtmeRateSetter: public TxRateSetterIF {
public:
/**
* @brief Constructor
*
* @param bitrateSel GPIO ID of the GPIO connected to the bitrate_sel input of the
* cadu_rate_switcher.
* @param gpioif GPIO interface to drive the bitrateSel GPIO
*/
PtmeRateSetter(gpioId_t bitrateSel, GpioIF* gpioif);
virtual ~PtmeRateSetter();
virtual ReturnValue_t setRate(BitRates rate);
private:
gpioId_t bitrateSel = gpio::NO_GPIO;
GpioIF* gpioif = nullptr;
};
#endif /* LINUX_OBC_PTMERATESETTER_H_ */

View File

@ -0,0 +1,25 @@
#ifndef LINUX_OBC_TXRATESETTERIF_H_
#define LINUX_OBC_TXRATESETTERIF_H_
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
enum BitRates : uint32_t {
RATE_2000KHZ,
RATE_400KHZ
};
/**
* @brief Abstract class for objects implementing the functionality to switch the
* downlink bit rate.
*
* @author J. Meier
*/
class TxRateSetterIF {
public:
TxRateSetterIF() {};
virtual ~TxRateSetterIF() {};
virtual ReturnValue_t setRate(BitRates bitRate) = 0;
};
#endif /* LINUX_OBC_TXRATESETTERIF_H_ */

View File

@ -18,10 +18,10 @@
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/> <stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/> <booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/> <stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build-Debug-Unittest/eive-unittest"/> <stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="fsfw/build-Unittest/fsfw-tests"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="eive-obsw"/> <stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="eive-obsw"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/> <booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.775472168"/> <stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value=""/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/eive-obsw"/> <listEntry value="/eive-obsw"/>
</listAttribute> </listAttribute>

View File

@ -101,18 +101,18 @@ void ObjectFactory::produceGenericObjects() {
#if OBSW_ADD_TCPIP_BRIDGE == 1 #if OBSW_ADD_TCPIP_BRIDGE == 1
#if OBSW_USE_TCP_BRIDGE == 0 #if OBSW_USE_TCP_BRIDGE == 0
auto tmtcBridge = new UdpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR); auto tmtcBridge = new UdpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR);
tmtcBridge->setMaxNumberOfPacketsStored(50);
new UdpTcPollingTask(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE); new UdpTcPollingTask(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE);
sif::info << "Created UDP server for TMTC commanding with listener port " << sif::info << "Created UDP server for TMTC commanding with listener port " <<
udpBridge->getUdpPort() << std::endl; udpBridge->getUdpPort() << std::endl;
#else #else
auto tmtcBridge = new TcpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR); auto tmtcBridge = new TcpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR);
tmtcBridge->setMaxNumberOfPacketsStored(50);
auto tcpServer = new TcpTmTcServer(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE); auto tcpServer = new TcpTmTcServer(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE);
// TCP is stream based. Use packet ID as start marker when parsing for space packets // TCP is stream based. Use packet ID as start marker when parsing for space packets
tcpServer->setSpacePacketParsingOptions({common::TC_PACKET_ID}); tcpServer->setSpacePacketParsingOptions({common::PUS_PACKET_ID});
sif::info << "Created TCP server for TMTC commanding with listener port " sif::info << "Created TCP server for TMTC commanding with listener port "
<< tcpServer->getTcpPort() << std::endl; << tcpServer->getTcpPort() << std::endl;
#endif /* OBSW_USE_TMTC_TCP_BRIDGE == 0 */ #endif /* OBSW_USE_TMTC_TCP_BRIDGE == 0 */
tmtcBridge->setMaxNumberOfPacketsStored(70);
#endif /* OBSW_ADD_TCPIP_BRIDGE == 1 */ #endif /* OBSW_ADD_TCPIP_BRIDGE == 1 */
} }

View File

@ -306,7 +306,8 @@ ReturnValue_t Max31865PT1000Handler::interpretDeviceReply(
if(packet[1] != DEFAULT_CONFIG) { if(packet[1] != DEFAULT_CONFIG) {
#if FSFW_CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
// it propably would be better if we at least try one restart.. // it propably would be better if we at least try one restart..
sif::error << "Max31865PT1000Handler: Invalid configuration reply!" << std::endl; sif::error << "Max31865PT1000Handler: Object ID: " << std::hex << this->getObjectId()
<< ": Invalid configuration reply!" << std::endl;
#else #else
sif::printError("Max31865PT1000Handler: Invalid configuration reply!\n"); sif::printError("Max31865PT1000Handler: Invalid configuration reply!\n");
#endif #endif
@ -327,7 +328,8 @@ ReturnValue_t Max31865PT1000Handler::interpretDeviceReply(
if(readLowThreshold != LOW_THRESHOLD) { if(readLowThreshold != LOW_THRESHOLD) {
#if FSFW_VERBOSE_LEVEL >= 1 #if FSFW_VERBOSE_LEVEL >= 1
#if FSFW_CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "Max31865PT1000Handler::interpretDeviceReply: Missmatch between " << sif::warning << "Max31865PT1000Handler::interpretDeviceReply: Object ID: " <<
std::hex << this->getObjectId() << ": Missmatch between " <<
"written and readback value of low threshold register" << std::endl; "written and readback value of low threshold register" << std::endl;
#else #else
sif::printWarning("Max31865PT1000Handler::interpretDeviceReply: Missmatch between " sif::printWarning("Max31865PT1000Handler::interpretDeviceReply: Missmatch between "
@ -343,7 +345,8 @@ ReturnValue_t Max31865PT1000Handler::interpretDeviceReply(
if(readHighThreshold != HIGH_THRESHOLD) { if(readHighThreshold != HIGH_THRESHOLD) {
#if FSFW_VERBOSE_LEVEL >= 1 #if FSFW_VERBOSE_LEVEL >= 1
#if FSFW_CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "Max31865PT1000Handler::interpretDeviceReply: Missmatch between " << sif::warning << "Max31865PT1000Handler::interpretDeviceReply: Object ID: "
<< std::hex << this->getObjectId() << ": Missmatch between " <<
"written and readback value of high threshold register" << std::endl; "written and readback value of high threshold register" << std::endl;
#else #else
sif::printWarning("Max31865PT1000Handler::interpretDeviceReply: Missmatch between " sif::printWarning("Max31865PT1000Handler::interpretDeviceReply: Missmatch between "
@ -375,7 +378,8 @@ ReturnValue_t Max31865PT1000Handler::interpretDeviceReply(
#if OBSW_VERBOSE_LEVEL >= 1 #if OBSW_VERBOSE_LEVEL >= 1
if(debugDivider->checkAndIncrement()) { if(debugDivider->checkAndIncrement()) {
#if FSFW_CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "Max31865: Measured resistance is " << rtdValue << " Ohms." << std::endl; sif::info << "Max31865: Object ID: " << std::hex << this->getObjectId()
<< ": Measured resistance is " << rtdValue << " Ohms." << std::endl;
sif::info << "Approximated temperature is " << approxTemp << " C" << std::endl; sif::info << "Approximated temperature is " << approxTemp << " C" << std::endl;
#else #else
sif::printInfo("Max31685: Measured resistance is %f Ohms\n", rtdValue); sif::printInfo("Max31685: Measured resistance is %f Ohms\n", rtdValue);
@ -388,11 +392,12 @@ ReturnValue_t Max31865PT1000Handler::interpretDeviceReply(
if(pg.getReadResult() != HasReturnvaluesIF::RETURN_OK) { if(pg.getReadResult() != HasReturnvaluesIF::RETURN_OK) {
// Configuration error // Configuration error
#if FSFW_CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "Max31865PT1000Handler::interpretDeviceReply: Error reading dataset!" sif::warning << "Max31865PT1000Handler::interpretDeviceReply: Object ID: "
<< std::hex << this->getObjectId() << ": Error reading dataset!"
<< std::endl; << std::endl;
#else #else
sif::printWarning("Max31865PT1000Handler::interpretDeviceReply: " sif::printWarning("Max31865PT1000Handler::interpretDeviceReply: "
"Error reading dataset!\n"); "Error reading dataset!\n");
#endif #endif
return pg.getReadResult(); return pg.getReadResult();
} }
@ -411,7 +416,8 @@ ReturnValue_t Max31865PT1000Handler::interpretDeviceReply(
faultByte = packet[1]; faultByte = packet[1];
#if OBSW_VERBOSE_LEVEL >= 1 #if OBSW_VERBOSE_LEVEL >= 1
#if FSFW_CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "Max31865PT1000Handler::interpretDeviceReply: Fault byte" sif::warning << "Max31865PT1000Handler::interpretDeviceReply: Object ID: "
<< std::hex << this->getObjectId() << ": Fault byte"
" is: 0b" << std::bitset<8>(faultByte) << std::endl; " is: 0b" << std::bitset<8>(faultByte) << std::endl;
#else #else
sif::printWarning("Max31865PT1000Handler::interpretDeviceReply: Fault byte" sif::printWarning("Max31865PT1000Handler::interpretDeviceReply: Fault byte"
@ -422,7 +428,8 @@ ReturnValue_t Max31865PT1000Handler::interpretDeviceReply(
if(result != HasReturnvaluesIF::RETURN_OK) { if(result != HasReturnvaluesIF::RETURN_OK) {
// Configuration error // Configuration error
#if FSFW_CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "Max31865PT1000Handler::interpretDeviceReply: " sif::debug << "Max31865PT1000Handler::interpretDeviceReply: Object ID: " << std::hex
<< this->getObjectId() << ":"
"Error reading dataset!" << std::endl; "Error reading dataset!" << std::endl;
#else #else
sif::printDebug("Max31865PT1000Handler::interpretDeviceReply: " sif::printDebug("Max31865PT1000Handler::interpretDeviceReply: "
@ -440,8 +447,8 @@ ReturnValue_t Max31865PT1000Handler::interpretDeviceReply(
if(result != HasReturnvaluesIF::RETURN_OK) { if(result != HasReturnvaluesIF::RETURN_OK) {
// Configuration error // Configuration error
#if FSFW_CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "Max31865PT1000Handler::interpretDeviceReply: " sif::debug << "Max31865PT1000Handler::interpretDeviceReply: Object ID: " << std::hex
"Error commiting dataset!" << std::endl; << this->getObjectId() << ": Error commiting dataset!" << std::endl;
#else #else
sif::printDebug("Max31865PT1000Handler::interpretDeviceReply: " sif::printDebug("Max31865PT1000Handler::interpretDeviceReply: "
"Error commiting dataset!\n"); "Error commiting dataset!\n");

View File

@ -37,7 +37,7 @@ public:
// 1. 1 for V_BIAS enabled, 0 for disabled // 1. 1 for V_BIAS enabled, 0 for disabled
// 2. 1 for Auto-conversion, 0 for off // 2. 1 for Auto-conversion, 0 for off
// 3. 1 for 1-shot enabled, 0 for disabled (self-clearing bit) // 3. 1 for 1-shot enabled, 0 for disabled (self-clearing bit)
// 4. 1 for 3-wire disabled, 0 for disabled // 4. 1 for 3-wire enabled, 0 for disabled (two and four wired RTD)
// 5./6. Fault detection: 00 for no action, 01 for automatic delay, 1 // 5./6. Fault detection: 00 for no action, 01 for automatic delay, 1
// 0 for run fault detection with manual delay, // 0 for run fault detection with manual delay,
// 11 for finish fault detection with manual delay // 11 for finish fault detection with manual delay

View File

@ -86,7 +86,7 @@ ReturnValue_t StarTrackerHandler::scanForReply(const uint8_t *start, size_t rema
continue; continue;
} }
case ARC_DEC_ASYNC: { case ARC_DEC_ASYNC: {
sif::debug << "StarTrackerHandler::scanForReply: Received asychronous tm" << std::endl; sif::debug << "StarTrackerHandler::scanForReply: Received asynchronous tm" << std::endl;
/** No asynchronous replies are expected as of now */ /** No asynchronous replies are expected as of now */
return RETURN_FAILED; return RETURN_FAILED;
} }

View File

@ -2,21 +2,30 @@
#include "fsfw/serviceinterface/serviceInterfaceDefintions.h" #include "fsfw/serviceinterface/serviceInterfaceDefintions.h"
#include "fsfw/objectmanager/ObjectManager.h" #include "fsfw/objectmanager/ObjectManager.h"
#include "fsfw/ipc/QueueFactory.h" #include "fsfw/ipc/QueueFactory.h"
#include "fsfw/events/EventManagerIF.h"
#include <linux/obc/PdecHandler.h>
#include "CCSDSHandler.h" #include "CCSDSHandler.h"
CCSDSHandler::CCSDSHandler(object_id_t objectId, object_id_t ptmeId) : CCSDSHandler::CCSDSHandler(object_id_t objectId, object_id_t ptmeId, object_id_t tcDestination,
SystemObject(objectId), ptmeId(ptmeId), parameterHelper(this) { TxRateSetterIF* txRateSetterIF, GpioIF* gpioIF, gpioId_t enTxClock, gpioId_t enTxData) :
SystemObject(objectId), ptmeId(ptmeId), tcDestination(tcDestination), parameterHelper(this), actionHelper(
this, nullptr), txRateSetterIF(txRateSetterIF), gpioIF(gpioIF), enTxClock(
enTxClock), enTxData(enTxData) {
commandQueue = QueueFactory::instance()->createMessageQueue(QUEUE_SIZE); commandQueue = QueueFactory::instance()->createMessageQueue(QUEUE_SIZE);
eventQueue = QueueFactory::instance()->createMessageQueue(EventMessage::EVENT_MESSAGE_SIZE * 2);
} }
CCSDSHandler::~CCSDSHandler() { CCSDSHandler::~CCSDSHandler() {
} }
ReturnValue_t CCSDSHandler::performOperation(uint8_t operationCode) { ReturnValue_t CCSDSHandler::performOperation(uint8_t operationCode) {
checkEvents();
readCommandQueue(); readCommandQueue();
handleTelemetry(); handleTelemetry();
handleTelecommands(); handleTelecommands();
checkTxTimer();
return RETURN_OK; return RETURN_OK;
} }
@ -39,11 +48,27 @@ ReturnValue_t CCSDSHandler::initialize() {
return ObjectManagerIF::CHILD_INIT_FAILED; return ObjectManagerIF::CHILD_INIT_FAILED;
} }
AcceptsTelecommandsIF* tcDistributor =
ObjectManager::instance()->get<AcceptsTelecommandsIF>(tcDestination);
if (tcDistributor == nullptr) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "CCSDSHandler::initialize: Invalid TC Distributor object" << std::endl;
#endif
return ObjectManagerIF::CHILD_INIT_FAILED;
}
tcDistributorQueueId = tcDistributor->getRequestQueue();
result = parameterHelper.initialize(); result = parameterHelper.initialize();
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != HasReturnvaluesIF::RETURN_OK) {
return result; return result;
} }
result = actionHelper.initialize(commandQueue);
if (result != RETURN_OK) {
return result;
}
VirtualChannelMapIter iter; VirtualChannelMapIter iter;
for (iter = virtualChannelMap.begin(); iter != virtualChannelMap.end(); iter++) { for (iter = virtualChannelMap.begin(); iter != virtualChannelMap.end(); iter++) {
result = iter->second->initialize(); result = iter->second->initialize();
@ -53,6 +78,28 @@ ReturnValue_t CCSDSHandler::initialize() {
iter->second->setPtmeObject(ptme); iter->second->setPtmeObject(ptme);
} }
EventManagerIF* manager = ObjectManager::instance()->get<EventManagerIF>(
objects::EVENT_MANAGER);
if (manager == nullptr) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "CCSDSHandler::initialize: Invalid event manager" << std::endl;
#endif
return RETURN_FAILED;
}
result = manager->registerListener(eventQueue->getId());
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
result = manager->subscribeToEventRange(eventQueue->getId(),
event::getEventId(PdecHandler::CARRIER_LOCK),
event::getEventId(PdecHandler::BIT_LOCK_PDEC));
if (result != HasReturnvaluesIF::RETURN_OK) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "CCSDSHandler::initialize: Failed to subscribe to events from PDEC "
"handler" << std::endl;
#endif
return result;
}
return result; return result;
} }
@ -66,10 +113,15 @@ void CCSDSHandler::readCommandQueue(void) {
if (result == RETURN_OK) { if (result == RETURN_OK) {
return; return;
} }
result = actionHelper.handleActionMessage(&commandMessage);
if (result == RETURN_OK) {
return;
}
CommandMessage reply; CommandMessage reply;
reply.setReplyRejected(CommandMessage::UNKNOWN_COMMAND, reply.setReplyRejected(CommandMessage::UNKNOWN_COMMAND,
commandMessage.getCommand()); commandMessage.getCommand());
commandQueue->reply(&reply); commandQueue->reply(&reply);
return;
} }
} }
@ -120,3 +172,128 @@ ReturnValue_t CCSDSHandler::getParameter(uint8_t domainId, uint8_t uniqueIdentif
uint16_t startAtIndex) { uint16_t startAtIndex) {
return RETURN_OK; return RETURN_OK;
} }
uint16_t CCSDSHandler::getIdentifier() {
return 0;
}
MessageQueueId_t CCSDSHandler::getRequestQueue() {
// Forward packets directly to TC distributor
return tcDistributorQueueId;
}
ReturnValue_t CCSDSHandler::executeAction(ActionId_t actionId,
MessageQueueId_t commandedBy, const uint8_t* data, size_t size) {
switch(actionId) {
case SET_LOW_RATE: {
txRateSetterIF->setRate(BitRates::RATE_400KHZ);
return EXECUTION_FINISHED;
}
case SET_HIGH_RATE: {
txRateSetterIF->setRate(BitRates::RATE_2000KHZ);
return EXECUTION_FINISHED;
}
case EN_TRANSMITTER: {
enableTransmit();
return EXECUTION_FINISHED;
}
case DIS_TRANSMITTER: {
disableTransmit();
return EXECUTION_FINISHED;
}
default:
return COMMAND_NOT_IMPLEMENTED;
}
}
void CCSDSHandler::checkEvents() {
EventMessage event;
for (ReturnValue_t result = eventQueue->receiveMessage(&event);
result == RETURN_OK; result = eventQueue->receiveMessage(&event)) {
switch (event.getMessageId()) {
case EventMessage::EVENT_MESSAGE:
handleEvent(&event);
break;
default:
sif::debug << "CCSDSHandler::checkEvents: Did not subscribe to this event message"
<< std::endl;
break;
}
}
}
void CCSDSHandler::handleEvent(EventMessage* eventMessage) {
Event event = eventMessage->getEvent();
switch(event){
case PdecHandler::BIT_LOCK_PDEC: {
handleBitLockEvent();
break;
}
case PdecHandler::CARRIER_LOCK: {
handleCarrierLockEvent();
break;
}
default:
sif::debug << "CCSDSHandler::handleEvent: Did not subscribe to this event"
<< std::endl;
break;
}
}
void CCSDSHandler::handleBitLockEvent() {
if(transmitterCountdown.isBusy()) {
// Transmitter already enabled
return;
}
enableTransmit();
}
void CCSDSHandler::handleCarrierLockEvent() {
if (!enableTxWhenCarrierLock) {
return;
}
enableTransmit();
}
void CCSDSHandler::forwardLinkstate() {
VirtualChannelMapIter iter;
for(iter = virtualChannelMap.begin(); iter != virtualChannelMap.end(); iter++) {
iter->second->setLinkState(linkState);
}
}
void CCSDSHandler::enableTransmit() {
if(transmitterCountdown.isBusy()) {
// Transmitter already enabled
return;
}
transmitterCountdown.setTimeout(TRANSMITTER_TIMEOUT);
#if BOARD_TE0720 == 0
gpioIF->pullHigh(enTxClock);
gpioIF->pullHigh(enTxData);
#endif /* BOARD_TE0720 == 0 */
linkState = UP;
// Set link state of all virtual channels to link up
forwardLinkstate();
}
void CCSDSHandler::checkTxTimer() {
if(linkState == DOWN) {
return;
}
if (transmitterCountdown.hasTimedOut()) {
disableTransmit();
}
}
void CCSDSHandler::disableTransmit() {
#if BOARD_TE0720 == 0
gpioIF->pullLow(enTxClock);
gpioIF->pullLow(enTxData);
#endif /* BOARD_TE0720 == 0 */
linkState = DOWN;
forwardLinkstate();
transmitterCountdown.setTimeout(0);
}

View File

@ -5,7 +5,16 @@
#include "fsfw/objectmanager/SystemObject.h" #include "fsfw/objectmanager/SystemObject.h"
#include "fsfw/tasks/ExecutableObjectIF.h" #include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h" #include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include "fsfw/tmtcservices/AcceptsTelemetryIF.h"
#include "fsfw/tmtcservices/AcceptsTelecommandsIF.h"
#include "fsfw/parameters/ParameterHelper.h" #include "fsfw/parameters/ParameterHelper.h"
#include "fsfw/action/ActionHelper.h"
#include "fsfw/action/HasActionsIF.h"
#include "fsfw/timemanager/Countdown.h"
#include "fsfw/events/EventMessage.h"
#include "linux/obc/TxRateSetterIF.h"
#include "fsfw_hal/common/gpio/gpioDefinitions.h"
#include "fsfw_hal/common/gpio/GpioIF.h"
#include "VirtualChannel.h" #include "VirtualChannel.h"
#include <unordered_map> #include <unordered_map>
@ -18,8 +27,10 @@
class CCSDSHandler: public SystemObject, class CCSDSHandler: public SystemObject,
public ExecutableObjectIF, public ExecutableObjectIF,
public AcceptsTelemetryIF, public AcceptsTelemetryIF,
public AcceptsTelecommandsIF,
public HasReturnvaluesIF, public HasReturnvaluesIF,
public ReceivesParameterMessagesIF { public ReceivesParameterMessagesIF,
public HasActionsIF {
public: public:
using VcId_t = uint8_t; using VcId_t = uint8_t;
@ -29,8 +40,15 @@ public:
* *
* @param objectId Object ID of the CCSDS handler * @param objectId Object ID of the CCSDS handler
* @param ptmeId Object ID of the PTME object providing access to the PTME IP Core. * @param ptmeId Object ID of the PTME object providing access to the PTME IP Core.
* @param tcDestination Object ID of object handling received TC space packets
* @param txRateSetter Object providing the functionality to switch the input bitrate of
* the S-Band transceiver.
* @param gpioIF Required to enable TX data and TX clock RS485 transceiver chips.
* @param enTxClock GPIO ID of RS485 tx clock enable
* @param enTxData GPIO ID of RS485 tx data enable
*/ */
CCSDSHandler(object_id_t objectId, object_id_t ptmeId); CCSDSHandler(object_id_t objectId, object_id_t ptmeId, object_id_t tcDestination,
TxRateSetterIF* txRateSetterIF, GpioIF* gpioIF, gpioId_t enTxClock, gpioId_t enTxData);
~CCSDSHandler(); ~CCSDSHandler();
@ -51,10 +69,37 @@ public:
ParameterWrapper *parameterWrapper, const ParameterWrapper *newValues, ParameterWrapper *parameterWrapper, const ParameterWrapper *newValues,
uint16_t startAtIndex); uint16_t startAtIndex);
uint16_t getIdentifier() override;
MessageQueueId_t getRequestQueue() override;
virtual ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t* data, size_t size);
private: private:
static const uint8_t INTERFACE_ID = CLASS_ID::CCSDS_HANDLER;
static const uint32_t QUEUE_SIZE = common::CCSDS_HANDLER_QUEUE_SIZE; static const uint32_t QUEUE_SIZE = common::CCSDS_HANDLER_QUEUE_SIZE;
static const ActionId_t SET_LOW_RATE = 0;
static const ActionId_t SET_HIGH_RATE = 1;
static const ActionId_t EN_TRANSMITTER = 2;
static const ActionId_t DIS_TRANSMITTER = 3;
//! [EXPORT] : [COMMENT] Received action message with unknown action id
static const ReturnValue_t COMMAND_NOT_IMPLEMENTED = MAKE_RETURN_CODE(0xA0);
#if TMTC_TEST_SETUP == 0
// syrlinks must not be transmitting more than 15 minutes (according to datasheet)
static const uint32_t TRANSMITTER_TIMEOUT = 900000; //900000 ms = 15 min
#else
// Set to high value when not sending via syrlinks
static const uint32_t TRANSMITTER_TIMEOUT = 86400000; // 1 day
#endif /* TMTC_TEST_SETUP == 0 */
static const bool UP = true;
static const bool DOWN = false;
using VirtualChannelMap = std::unordered_map<VcId_t, VirtualChannel*>; using VirtualChannelMap = std::unordered_map<VcId_t, VirtualChannel*>;
using VirtualChannelMapIter = VirtualChannelMap::iterator; using VirtualChannelMapIter = VirtualChannelMap::iterator;
@ -63,13 +108,61 @@ private:
// Object ID of PTME object // Object ID of PTME object
object_id_t ptmeId; object_id_t ptmeId;
object_id_t tcDestination;
MessageQueueIF* commandQueue = nullptr; MessageQueueIF* commandQueue = nullptr;
MessageQueueIF* eventQueue = nullptr;
ParameterHelper parameterHelper; ParameterHelper parameterHelper;
ActionHelper actionHelper;
MessageQueueId_t tcDistributorQueueId;
TxRateSetterIF* txRateSetterIF = nullptr;
GpioIF* gpioIF = nullptr;
gpioId_t enTxClock = gpio::NO_GPIO;
gpioId_t enTxData = gpio::NO_GPIO;
// Countdown to disable transmitter after 15 minutes
Countdown transmitterCountdown;
// When true transmitting is started as soon as carrier lock has been detected
bool enableTxWhenCarrierLock = false;
bool linkState = DOWN;
void readCommandQueue(void); void readCommandQueue(void);
void handleTelemetry(); void handleTelemetry();
void handleTelecommands(); void handleTelecommands();
void checkEvents();
void handleEvent(EventMessage* eventMessage);
void handleBitLockEvent();
void handleCarrierLockEvent();
/**
* @brief Forward link state to virtual channels.
*/
void forwardLinkstate();
/**
* @brief Starts transmit timer and enables transmitter.
*/
void enableTransmit();
/**
* @brief Checks Tx timer for timeout and disables RS485 tx clock and tx data in case
* timer has expired.
*/
void checkTxTimer();
/**
* @brief Disables the transmitter by pulling the enable tx clock and tx data pin of the
* RS485 transceiver chips to high.
*/
void disableTransmit();
}; };
#endif /* CCSDSHANDLER_H_ */ #endif /* CCSDSHANDLER_H_ */

View File

@ -64,6 +64,6 @@ void VirtualChannel::setPtmeObject(PtmeIF* ptme_) {
ptme = ptme_; ptme = ptme_;
} }
void VirtualChannel::setLinkState(bool linkIsUp) { void VirtualChannel::setLinkState(bool linkIsUp_) {
linkIsUp = linkIsUp; linkIsUp = linkIsUp_;
} }

View File

@ -38,7 +38,7 @@ class VirtualChannel: public AcceptsTelemetryIF, public HasReturnvaluesIF {
* @brief Can be used by the owner to set the link state. Packets will be discarded if link * @brief Can be used by the owner to set the link state. Packets will be discarded if link
* to ground station is down. * to ground station is down.
*/ */
void setLinkState(bool linkIsUp); void setLinkState(bool linkIsUp_);
private: private:
@ -46,11 +46,7 @@ private:
MessageQueueIF* tmQueue = nullptr; MessageQueueIF* tmQueue = nullptr;
uint8_t vcId; uint8_t vcId;
#if OBSW_LINK_IS_UP == 1
bool linkIsUp = true;
#else
bool linkIsUp = false; bool linkIsUp = false;
#endif /* OBSW_LINK_IS_UP == 1 */
StorageManagerIF* tmStore = nullptr; StorageManagerIF* tmStore = nullptr;
}; };

View File

@ -11,15 +11,14 @@
#include <cstring> #include <cstring>
TestTask::TestTask(object_id_t objectId_): EiveTestTask::EiveTestTask(object_id_t objectId_): TestTask(objectId_), testMode(testModes::A) {
SystemObject(objectId_), testMode(testModes::A) {
IPCStore = ObjectManager::instance()->get<StorageManagerIF>(objects::IPC_STORE); IPCStore = ObjectManager::instance()->get<StorageManagerIF>(objects::IPC_STORE);
} }
TestTask::~TestTask() { EiveTestTask::~EiveTestTask() {
} }
ReturnValue_t TestTask::performOperation(uint8_t operationCode) { ReturnValue_t EiveTestTask::performOperation(uint8_t operationCode) {
ReturnValue_t result = RETURN_OK; ReturnValue_t result = RETURN_OK;
if(oneShotAction) { if(oneShotAction) {
@ -74,7 +73,7 @@ const char hyperion_gps_data[] = ""
"$GNVTG,040.7,T,,M,000.0,N,000.0,K,A*10\r\n" "$GNVTG,040.7,T,,M,000.0,N,000.0,K,A*10\r\n"
"$GNZDA,173225.998892,27,02,2021,00,00*75\r\n"; "$GNZDA,173225.998892,27,02,2021,00,00*75\r\n";
ReturnValue_t TestTask::performOneShotAction() { ReturnValue_t EiveTestTask::performOneShotAction() {
#if OBSW_ADD_TEST_CODE == 1 #if OBSW_ADD_TEST_CODE == 1
//performLwgpsTest(); //performLwgpsTest();
#endif #endif
@ -82,24 +81,24 @@ ReturnValue_t TestTask::performOneShotAction() {
} }
ReturnValue_t TestTask::performPeriodicAction() { ReturnValue_t EiveTestTask::performPeriodicAction() {
ReturnValue_t result = RETURN_OK; ReturnValue_t result = RETURN_OK;
return result; return result;
} }
ReturnValue_t TestTask::performActionA() { ReturnValue_t EiveTestTask::performActionA() {
ReturnValue_t result = RETURN_OK; ReturnValue_t result = RETURN_OK;
/* Add periodically executed code here */ /* Add periodically executed code here */
return result; return result;
} }
ReturnValue_t TestTask::performActionB() { ReturnValue_t EiveTestTask::performActionB() {
ReturnValue_t result = RETURN_OK; ReturnValue_t result = RETURN_OK;
/* Add periodically executed code here */ /* Add periodically executed code here */
return result; return result;
} }
void TestTask::performLwgpsTest() { void EiveTestTask::performLwgpsTest() {
/* Everything here will only be performed once. */ /* Everything here will only be performed once. */
sif::info << "Processing sample GPS output.." << std::endl; sif::info << "Processing sample GPS output.." << std::endl;

View File

@ -1,13 +1,10 @@
#ifndef TEST_TESTTASK_H_ #ifndef TEST_TESTTASK_H_
#define TEST_TESTTASK_H_ #define TEST_TESTTASK_H_
#include <fsfw/tasks/ExecutableObjectIF.h>
#include <fsfw/objectmanager/SystemObject.h>
#include <fsfw/parameters/HasParametersIF.h>
#include <fsfw/serialize/SerialBufferAdapter.h> #include <fsfw/serialize/SerialBufferAdapter.h>
#include <fsfw/serialize/SerializeElement.h> #include <fsfw/serialize/SerializeElement.h>
#include <fsfw/serialize/SerialLinkedListAdapter.h> #include <fsfw/serialize/SerialLinkedListAdapter.h>
#include <fsfw/storagemanager/StorageManagerIF.h> #include "fsfw_tests/integration/task/TestTask.h"
#include <cstddef> #include <cstddef>
@ -18,13 +15,11 @@
* Should not be used for board specific * Should not be used for board specific
* tests. Instead, a derived board test class should be used. * tests. Instead, a derived board test class should be used.
*/ */
class TestTask : public SystemObject, class EiveTestTask : public TestTask {
public ExecutableObjectIF,
public HasReturnvaluesIF {
public: public:
TestTask(object_id_t objectId); EiveTestTask(object_id_t objectId);
virtual ~TestTask(); virtual ~EiveTestTask();
virtual ReturnValue_t performOperation(uint8_t operationCode = 0); virtual ReturnValue_t performOperation(uint8_t operationCode = 0) override;
protected: protected:
virtual ReturnValue_t performOneShotAction(); virtual ReturnValue_t performOneShotAction();

2
tmtc

@ -1 +1 @@
Subproject commit b2cc2354d410b0bc0d80c481bfd37afc580e63cf Subproject commit 1d374230b34606d8b6aa4df1335befec316a1e35