Merge branch 'develop' into mueller/system-subsystems
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
This commit is contained in:
commit
c4ed263e6c
@ -1,5 +1,6 @@
|
|||||||
#include "SdCardManager.h"
|
#include "SdCardManager.h"
|
||||||
|
|
||||||
|
#include <fsfw/ipc/MutexGuard.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@ -15,7 +16,9 @@
|
|||||||
|
|
||||||
SdCardManager* SdCardManager::factoryInstance = nullptr;
|
SdCardManager* SdCardManager::factoryInstance = nullptr;
|
||||||
|
|
||||||
SdCardManager::SdCardManager() : SystemObject(objects::SDC_MANAGER), cmdExecutor(256) {}
|
SdCardManager::SdCardManager() : SystemObject(objects::SDC_MANAGER), cmdExecutor(256) {
|
||||||
|
mutex = MutexFactory::instance()->createMutex();
|
||||||
|
}
|
||||||
|
|
||||||
SdCardManager::~SdCardManager() {}
|
SdCardManager::~SdCardManager() {}
|
||||||
|
|
||||||
@ -162,6 +165,7 @@ ReturnValue_t SdCardManager::setSdCardState(sd::SdCard sdCard, bool on) {
|
|||||||
|
|
||||||
ReturnValue_t SdCardManager::getSdCardActiveStatus(SdStatePair& active) {
|
ReturnValue_t SdCardManager::getSdCardActiveStatus(SdStatePair& active) {
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
MutexGuard mg(mutex);
|
||||||
if (not filesystem::exists(SD_STATE_FILE)) {
|
if (not filesystem::exists(SD_STATE_FILE)) {
|
||||||
return STATUS_FILE_NEXISTS;
|
return STATUS_FILE_NEXISTS;
|
||||||
}
|
}
|
||||||
@ -366,6 +370,7 @@ ReturnValue_t SdCardManager::updateSdCardStateFile() {
|
|||||||
if (cmdExecutor.getCurrentState() == CommandExecutor::States::PENDING) {
|
if (cmdExecutor.getCurrentState() == CommandExecutor::States::PENDING) {
|
||||||
return CommandExecutor::COMMAND_PENDING;
|
return CommandExecutor::COMMAND_PENDING;
|
||||||
}
|
}
|
||||||
|
MutexGuard mg(mutex);
|
||||||
// Use q7hw utility and pipe the command output into the state file
|
// Use q7hw utility and pipe the command output into the state file
|
||||||
std::string updateCmd = "q7hw sd info all > " + std::string(SD_STATE_FILE);
|
std::string updateCmd = "q7hw sd info all > " + std::string(SD_STATE_FILE);
|
||||||
cmdExecutor.load(updateCmd, blocking, printCmdOutput);
|
cmdExecutor.load(updateCmd, blocking, printCmdOutput);
|
||||||
@ -440,6 +445,7 @@ void SdCardManager::setPrintCommandOutput(bool print) { this->printCmdOutput = p
|
|||||||
bool SdCardManager::isSdCardMounted(sd::SdCard sdCard) {
|
bool SdCardManager::isSdCardMounted(sd::SdCard sdCard) {
|
||||||
SdCardManager::SdStatePair active;
|
SdCardManager::SdStatePair active;
|
||||||
ReturnValue_t result = this->getSdCardActiveStatus(active);
|
ReturnValue_t result = this->getSdCardActiveStatus(active);
|
||||||
|
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
sif::debug << "SdCardManager::isSdCardMounted: Failed to get SD card active state";
|
sif::debug << "SdCardManager::isSdCardMounted: Failed to get SD card active state";
|
||||||
return false;
|
return false;
|
||||||
|
@ -10,11 +10,12 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include "definitions.h"
|
|
||||||
#include "events/subsystemIdRanges.h"
|
#include "events/subsystemIdRanges.h"
|
||||||
#include "fsfw/events/Event.h"
|
#include "fsfw/events/Event.h"
|
||||||
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
||||||
#include "fsfw_hal/linux/CommandExecutor.h"
|
#include "fsfw_hal/linux/CommandExecutor.h"
|
||||||
|
#include "mission/memory/SdCardMountedIF.h"
|
||||||
|
#include "mission/memory/definitions.h"
|
||||||
#include "returnvalues/classIds.h"
|
#include "returnvalues/classIds.h"
|
||||||
|
|
||||||
class MutexIF;
|
class MutexIF;
|
||||||
@ -23,10 +24,12 @@ class MutexIF;
|
|||||||
* @brief Manages handling of SD cards like switching them on or off or getting the current
|
* @brief Manages handling of SD cards like switching them on or off or getting the current
|
||||||
* state
|
* state
|
||||||
*/
|
*/
|
||||||
class SdCardManager : public SystemObject {
|
class SdCardManager : public SystemObject, public SdCardMountedIF {
|
||||||
friend class SdCardAccess;
|
friend class SdCardAccess;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
using mountInitCb = ReturnValue_t (*)(void* args);
|
||||||
|
|
||||||
enum class Operations { SWITCHING_ON, SWITCHING_OFF, MOUNTING, UNMOUNTING, IDLE };
|
enum class Operations { SWITCHING_ON, SWITCHING_OFF, MOUNTING, UNMOUNTING, IDLE };
|
||||||
|
|
||||||
enum class OpStatus { IDLE, TIMEOUT, ONGOING, SUCCESS, FAIL };
|
enum class OpStatus { IDLE, TIMEOUT, ONGOING, SUCCESS, FAIL };
|
||||||
@ -88,7 +91,7 @@ class SdCardManager : public SystemObject {
|
|||||||
* @param sdCard
|
* @param sdCard
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
ReturnValue_t getPreferredSdCard(sd::SdCard& sdCard) const;
|
ReturnValue_t getPreferredSdCard(sd::SdCard& sdCard) const override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Switch on the specified SD card.
|
* Switch on the specified SD card.
|
||||||
@ -170,7 +173,7 @@ class SdCardManager : public SystemObject {
|
|||||||
* @param prefSdCardPtr
|
* @param prefSdCardPtr
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
std::string getCurrentMountPrefix(sd::SdCard prefSdCardPtr = sd::SdCard::NONE);
|
std::string getCurrentMountPrefix(sd::SdCard prefSdCardPtr = sd::SdCard::NONE) override;
|
||||||
|
|
||||||
OpStatus checkCurrentOp(Operations& currentOp);
|
OpStatus checkCurrentOp(Operations& currentOp);
|
||||||
|
|
||||||
@ -183,19 +186,20 @@ class SdCardManager : public SystemObject {
|
|||||||
void setPrintCommandOutput(bool print);
|
void setPrintCommandOutput(bool print);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Checks if an SD card is mounted
|
* @brief Checks if an SD card is mounted.
|
||||||
*
|
*
|
||||||
* @param sdCard The SD card to check
|
* @param sdCard The SD card to check
|
||||||
*
|
*
|
||||||
* @return true if mounted, otherwise false
|
* @return true if mounted, otherwise false
|
||||||
*/
|
*/
|
||||||
bool isSdCardMounted(sd::SdCard sdCard);
|
bool isSdCardMounted(sd::SdCard sdCard) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CommandExecutor cmdExecutor;
|
CommandExecutor cmdExecutor;
|
||||||
Operations currentOp = Operations::IDLE;
|
Operations currentOp = Operations::IDLE;
|
||||||
bool blocking = false;
|
bool blocking = false;
|
||||||
bool printCmdOutput = true;
|
bool printCmdOutput = true;
|
||||||
|
MutexIF* mutex = nullptr;
|
||||||
|
|
||||||
SdCardManager();
|
SdCardManager();
|
||||||
|
|
||||||
|
@ -1,139 +1,141 @@
|
|||||||
2200;STORE_SEND_WRITE_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2200;STORE_SEND_WRITE_FAILED;LOW;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2201;STORE_WRITE_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2201;STORE_WRITE_FAILED;LOW;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2202;STORE_SEND_READ_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2202;STORE_SEND_READ_FAILED;LOW;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2203;STORE_READ_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2203;STORE_READ_FAILED;LOW;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2204;UNEXPECTED_MSG;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2204;UNEXPECTED_MSG;LOW;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2205;STORING_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2205;STORING_FAILED;LOW;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2206;TM_DUMP_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2206;TM_DUMP_FAILED;LOW;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2207;STORE_INIT_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2207;STORE_INIT_FAILED;LOW;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2208;STORE_INIT_EMPTY;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2208;STORE_INIT_EMPTY;INFO;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2209;STORE_CONTENT_CORRUPTED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2209;STORE_CONTENT_CORRUPTED;LOW;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2210;STORE_INITIALIZE;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2210;STORE_INITIALIZE;INFO;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2211;INIT_DONE;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2211;INIT_DONE;INFO;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2212;DUMP_FINISHED;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2212;DUMP_FINISHED;INFO;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2213;DELETION_FINISHED;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2213;DELETION_FINISHED;INFO;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2214;DELETION_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2214;DELETION_FAILED;LOW;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2215;AUTO_CATALOGS_SENDING_FAILED;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2215;AUTO_CATALOGS_SENDING_FAILED;INFO;;./fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2600;GET_DATA_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
2600;GET_DATA_FAILED;LOW;;./fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||||
2601;STORE_DATA_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
2601;STORE_DATA_FAILED;LOW;;./fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||||
2800;DEVICE_BUILDING_COMMAND_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2800;DEVICE_BUILDING_COMMAND_FAILED;LOW;;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
2801;DEVICE_SENDING_COMMAND_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2801;DEVICE_SENDING_COMMAND_FAILED;LOW;;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
2802;DEVICE_REQUESTING_REPLY_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2802;DEVICE_REQUESTING_REPLY_FAILED;LOW;;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
2803;DEVICE_READING_REPLY_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2803;DEVICE_READING_REPLY_FAILED;LOW;;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
2804;DEVICE_INTERPRETING_REPLY_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2804;DEVICE_INTERPRETING_REPLY_FAILED;LOW;;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
2805;DEVICE_MISSED_REPLY;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2805;DEVICE_MISSED_REPLY;LOW;;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
2806;DEVICE_UNKNOWN_REPLY;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2806;DEVICE_UNKNOWN_REPLY;LOW;;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
2807;DEVICE_UNREQUESTED_REPLY;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2807;DEVICE_UNREQUESTED_REPLY;LOW;;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
2808;INVALID_DEVICE_COMMAND;LOW;Indicates a SW bug in child class.;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2808;INVALID_DEVICE_COMMAND;LOW;Indicates a SW bug in child class.;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
2809;MONITORING_LIMIT_EXCEEDED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2809;MONITORING_LIMIT_EXCEEDED;LOW;;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
2810;MONITORING_AMBIGUOUS;HIGH;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2810;MONITORING_AMBIGUOUS;HIGH;;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
2811;DEVICE_WANTS_HARD_REBOOT;HIGH;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
2811;DEVICE_WANTS_HARD_REBOOT;HIGH;;./fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
4201;FUSE_CURRENT_HIGH;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/power/Fuse.h
|
4201;FUSE_CURRENT_HIGH;LOW;;./fsfw/src/fsfw/power/Fuse.h
|
||||||
4202;FUSE_WENT_OFF;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/power/Fuse.h
|
4202;FUSE_WENT_OFF;LOW;;./fsfw/src/fsfw/power/Fuse.h
|
||||||
4204;POWER_ABOVE_HIGH_LIMIT;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/power/Fuse.h
|
4204;POWER_ABOVE_HIGH_LIMIT;LOW;;./fsfw/src/fsfw/power/Fuse.h
|
||||||
4205;POWER_BELOW_LOW_LIMIT;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/power/Fuse.h
|
4205;POWER_BELOW_LOW_LIMIT;LOW;;./fsfw/src/fsfw/power/Fuse.h
|
||||||
4300;SWITCH_WENT_OFF;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/power/PowerSwitchIF.h
|
4300;SWITCH_WENT_OFF;LOW;;./fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||||
5000;HEATER_ON;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h
|
5000;HEATER_ON;INFO;;./fsfw/src/fsfw/thermal/Heater.h
|
||||||
5001;HEATER_OFF;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h
|
5001;HEATER_OFF;INFO;;./fsfw/src/fsfw/thermal/Heater.h
|
||||||
5002;HEATER_TIMEOUT;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h
|
5002;HEATER_TIMEOUT;LOW;;./fsfw/src/fsfw/thermal/Heater.h
|
||||||
5003;HEATER_STAYED_ON;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h
|
5003;HEATER_STAYED_ON;LOW;;./fsfw/src/fsfw/thermal/Heater.h
|
||||||
5004;HEATER_STAYED_OFF;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h
|
5004;HEATER_STAYED_OFF;LOW;;./fsfw/src/fsfw/thermal/Heater.h
|
||||||
5200;TEMP_SENSOR_HIGH;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
|
5200;TEMP_SENSOR_HIGH;LOW;;./fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
|
||||||
5201;TEMP_SENSOR_LOW;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
|
5201;TEMP_SENSOR_LOW;LOW;;./fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
|
||||||
5202;TEMP_SENSOR_GRADIENT;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
|
5202;TEMP_SENSOR_GRADIENT;LOW;;./fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
|
||||||
5901;COMPONENT_TEMP_LOW;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
5901;COMPONENT_TEMP_LOW;LOW;;./fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||||
5902;COMPONENT_TEMP_HIGH;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
5902;COMPONENT_TEMP_HIGH;LOW;;./fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||||
5903;COMPONENT_TEMP_OOL_LOW;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
5903;COMPONENT_TEMP_OOL_LOW;LOW;;./fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||||
5904;COMPONENT_TEMP_OOL_HIGH;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
5904;COMPONENT_TEMP_OOL_HIGH;LOW;;./fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||||
5905;TEMP_NOT_IN_OP_RANGE;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
5905;TEMP_NOT_IN_OP_RANGE;LOW;;./fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||||
7101;FDIR_CHANGED_STATE;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h
|
7101;FDIR_CHANGED_STATE;INFO;;./fsfw/src/fsfw/fdir/FailureIsolationBase.h
|
||||||
7102;FDIR_STARTS_RECOVERY;MEDIUM;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h
|
7102;FDIR_STARTS_RECOVERY;MEDIUM;;./fsfw/src/fsfw/fdir/FailureIsolationBase.h
|
||||||
7103;FDIR_TURNS_OFF_DEVICE;MEDIUM;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h
|
7103;FDIR_TURNS_OFF_DEVICE;MEDIUM;;./fsfw/src/fsfw/fdir/FailureIsolationBase.h
|
||||||
7201;MONITOR_CHANGED_STATE;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h
|
7201;MONITOR_CHANGED_STATE;LOW;;./fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
7202;VALUE_BELOW_LOW_LIMIT;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h
|
7202;VALUE_BELOW_LOW_LIMIT;LOW;;./fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
7203;VALUE_ABOVE_HIGH_LIMIT;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h
|
7203;VALUE_ABOVE_HIGH_LIMIT;LOW;;./fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
7204;VALUE_OUT_OF_RANGE;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h
|
7204;VALUE_OUT_OF_RANGE;LOW;;./fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
7400;CHANGING_MODE;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h
|
7400;CHANGING_MODE;INFO;;./fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
7401;MODE_INFO;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h
|
7401;MODE_INFO;INFO;;./fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
7402;FALLBACK_FAILED;HIGH;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h
|
7402;FALLBACK_FAILED;HIGH;;./fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
7403;MODE_TRANSITION_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h
|
7403;MODE_TRANSITION_FAILED;LOW;;./fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
7404;CANT_KEEP_MODE;HIGH;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h
|
7404;CANT_KEEP_MODE;HIGH;;./fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
7405;OBJECT_IN_INVALID_MODE;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h
|
7405;OBJECT_IN_INVALID_MODE;LOW;;./fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
7406;FORCING_MODE;MEDIUM;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h
|
7406;FORCING_MODE;MEDIUM;;./fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
7407;MODE_CMD_REJECTED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h
|
7407;MODE_CMD_REJECTED;LOW;;./fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
7506;HEALTH_INFO;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h
|
7506;HEALTH_INFO;INFO;;./fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
7507;CHILD_CHANGED_HEALTH;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h
|
7507;CHILD_CHANGED_HEALTH;INFO;;./fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
7508;CHILD_PROBLEMS;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h
|
7508;CHILD_PROBLEMS;LOW;;./fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
7509;OVERWRITING_HEALTH;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h
|
7509;OVERWRITING_HEALTH;LOW;;./fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
7510;TRYING_RECOVERY;MEDIUM;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h
|
7510;TRYING_RECOVERY;MEDIUM;;./fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
7511;RECOVERY_STEP;MEDIUM;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h
|
7511;RECOVERY_STEP;MEDIUM;;./fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
7512;RECOVERY_DONE;MEDIUM;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h
|
7512;RECOVERY_DONE;MEDIUM;;./fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
7900;RF_AVAILABLE;INFO;A RF available signal was detected. P1: raw RFA state, P2: 0;C:\Users\jakob\eive-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;./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\eive-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;./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\eive-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;./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\eive-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;./fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||||
7905;FRAME_PROCESSING_FAILED;LOW;The CCSDS Board could not interpret a TC;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
7905;FRAME_PROCESSING_FAILED;LOW;The CCSDS Board could not interpret a TC;./fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||||
8900;CLOCK_SET;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/pus/Service9TimeManagement.h
|
8900;CLOCK_SET;INFO;;./fsfw/src/fsfw/pus/Service9TimeManagement.h
|
||||||
8901;CLOCK_SET_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/pus/Service9TimeManagement.h
|
8901;CLOCK_SET_FAILURE;LOW;;./fsfw/src/fsfw/pus/Service9TimeManagement.h
|
||||||
9700;TEST;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/pus/Service17Test.h
|
9700;TEST;INFO;;./fsfw/src/fsfw/pus/Service17Test.h
|
||||||
10600;CHANGE_OF_SETUP_PARAMETER;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h
|
10600;CHANGE_OF_SETUP_PARAMETER;LOW;;./fsfw/hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h
|
||||||
10900;GPIO_PULL_HIGH_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/HeaterHandler.h
|
10900;GPIO_PULL_HIGH_FAILED;LOW;;./mission/devices/HeaterHandler.h
|
||||||
10901;GPIO_PULL_LOW_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/HeaterHandler.h
|
10901;GPIO_PULL_LOW_FAILED;LOW;;./mission/devices/HeaterHandler.h
|
||||||
10902;SWITCH_ALREADY_ON;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/HeaterHandler.h
|
10902;SWITCH_ALREADY_ON;LOW;;./mission/devices/HeaterHandler.h
|
||||||
10903;SWITCH_ALREADY_OFF;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/HeaterHandler.h
|
10903;SWITCH_ALREADY_OFF;LOW;;./mission/devices/HeaterHandler.h
|
||||||
10904;MAIN_SWITCH_TIMEOUT;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/HeaterHandler.h
|
10904;MAIN_SWITCH_TIMEOUT;LOW;;./mission/devices/HeaterHandler.h
|
||||||
11000;MAIN_SWITCH_ON_TIMEOUT;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/SolarArrayDeploymentHandler.h
|
11000;MAIN_SWITCH_ON_TIMEOUT;LOW;;./mission/devices/SolarArrayDeploymentHandler.h
|
||||||
11001;MAIN_SWITCH_OFF_TIMEOUT;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/SolarArrayDeploymentHandler.h
|
11001;MAIN_SWITCH_OFF_TIMEOUT;LOW;;./mission/devices/SolarArrayDeploymentHandler.h
|
||||||
11002;DEPLOYMENT_FAILED;HIGH;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/SolarArrayDeploymentHandler.h
|
11002;DEPLOYMENT_FAILED;HIGH;;./mission/devices/SolarArrayDeploymentHandler.h
|
||||||
11003;DEPL_SA1_GPIO_SWTICH_ON_FAILED;HIGH;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/SolarArrayDeploymentHandler.h
|
11003;DEPL_SA1_GPIO_SWTICH_ON_FAILED;HIGH;;./mission/devices/SolarArrayDeploymentHandler.h
|
||||||
11004;DEPL_SA2_GPIO_SWTICH_ON_FAILED;HIGH;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/SolarArrayDeploymentHandler.h
|
11004;DEPL_SA2_GPIO_SWTICH_ON_FAILED;HIGH;;./mission/devices/SolarArrayDeploymentHandler.h
|
||||||
11101;MEMORY_READ_RPT_CRC_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/PlocMPSoCHandler.h
|
11101;MEMORY_READ_RPT_CRC_FAILURE;LOW;;./mission/devices/PlocMPSoCHandler.h
|
||||||
11102;ACK_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/PlocMPSoCHandler.h
|
11102;ACK_FAILURE;LOW;;./mission/devices/PlocMPSoCHandler.h
|
||||||
11103;EXE_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/PlocMPSoCHandler.h
|
11103;EXE_FAILURE;LOW;;./mission/devices/PlocMPSoCHandler.h
|
||||||
11104;CRC_FAILURE_EVENT;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/PlocMPSoCHandler.h
|
11104;CRC_FAILURE_EVENT;LOW;;./mission/devices/PlocMPSoCHandler.h
|
||||||
11201;SELF_TEST_I2C_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h
|
11201;SELF_TEST_I2C_FAILURE;LOW;Get self test result returns I2C failure P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;./mission/devices/IMTQHandler.h
|
||||||
11202;SELF_TEST_SPI_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h
|
11202;SELF_TEST_SPI_FAILURE;LOW;Get self test result returns SPI failure. This concerns the MTM connectivity. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;./mission/devices/IMTQHandler.h
|
||||||
11203;SELF_TEST_ADC_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h
|
11203;SELF_TEST_ADC_FAILURE;LOW;Get self test result returns failure in measurement of current and temperature. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;./mission/devices/IMTQHandler.h
|
||||||
11204;SELF_TEST_PWM_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h
|
11204;SELF_TEST_PWM_FAILURE;LOW;Get self test result returns PWM failure which concerns the coil actuation. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;./mission/devices/IMTQHandler.h
|
||||||
11205;SELF_TEST_TC_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h
|
11205;SELF_TEST_TC_FAILURE;LOW;Get self test result returns TC failure (system failure) P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;./mission/devices/IMTQHandler.h
|
||||||
11206;SELF_TEST_MTM_RANGE_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h
|
11206;SELF_TEST_MTM_RANGE_FAILURE;LOW;Get self test result returns failure that MTM values were outside of the expected range. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;./mission/devices/IMTQHandler.h
|
||||||
11207;SELF_TEST_COIL_CURRENT_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h
|
11207;SELF_TEST_COIL_CURRENT_FAILURE;LOW;Get self test result returns failure indicating that the coil current was outside of the expected range P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;./mission/devices/IMTQHandler.h
|
||||||
11208;INVALID_ERROR_BYTE;LOW;Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC.;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h
|
11208;INVALID_ERROR_BYTE;LOW;Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC.;./mission/devices/IMTQHandler.h
|
||||||
11301;ERROR_STATE;HIGH;Reaction wheel signals an error state;C:\Users\jakob\eive-software\eive_obsw/mission/devices/RwHandler.h
|
11301;ERROR_STATE;HIGH;Reaction wheel signals an error state;./mission/devices/RwHandler.h
|
||||||
11401;BOOTING_FIRMWARE_FAILED;LOW;Failed to boot firmware;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StarTrackerHandler.h
|
11401;BOOTING_FIRMWARE_FAILED;LOW;Failed to boot firmware;./linux/devices/startracker/StarTrackerHandler.h
|
||||||
11402;BOOTING_BOOTLOADER_FAILED;LOW;Failed to boot star tracker into bootloader mode;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StarTrackerHandler.h
|
11402;BOOTING_BOOTLOADER_FAILED;LOW;Failed to boot star tracker into bootloader mode;./linux/devices/startracker/StarTrackerHandler.h
|
||||||
11501;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.h
|
11501;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;./bsp_q7s/devices/PlocSupervisorHandler.h
|
||||||
11502;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.h
|
11502;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;./bsp_q7s/devices/PlocSupervisorHandler.h
|
||||||
11503;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.h
|
11503;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report;./bsp_q7s/devices/PlocSupervisorHandler.h
|
||||||
11504;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.h
|
11504;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;./bsp_q7s/devices/PlocSupervisorHandler.h
|
||||||
11600;SANITIZATION_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/memory/SdCardManager.h
|
11600;ALLOC_FAILURE;MEDIUM;;./bsp_q7s/core/CoreController.h
|
||||||
11700;UPDATE_FILE_NOT_EXISTS;LOW;;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocUpdater.h
|
11601;REBOOT_SW;MEDIUM; Software reboot occured. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;./bsp_q7s/core/CoreController.h
|
||||||
11701;ACTION_COMMANDING_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocUpdater.h
|
11603;REBOOT_HW;MEDIUM;;./bsp_q7s/core/CoreController.h
|
||||||
11702;UPDATE_AVAILABLE_FAILED;LOW;Supervisor handler replied action message indicating a command execution failure of the update available command;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocUpdater.h
|
11700;UPDATE_FILE_NOT_EXISTS;LOW;;./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);C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocUpdater.h
|
11701;ACTION_COMMANDING_FAILED;LOW;Failed to send command to supervisor handler P1: Return value of CommandActionHelper::commandAction P2: Action ID of command to send;./bsp_q7s/devices/PlocUpdater.h
|
||||||
11704;UPDATE_VERIFY_FAILED;LOW;Supervisor failed to execute the update verify command.;C:\Users\jakob\eive-software\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;./bsp_q7s/devices/PlocUpdater.h
|
||||||
11705;UPDATE_FINISHED;INFO;MPSoC update successful completed;C:\Users\jakob\eive-software\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);./bsp_q7s/devices/PlocUpdater.h
|
||||||
11800;SEND_MRAM_DUMP_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocMemoryDumper.h
|
11704;UPDATE_VERIFY_FAILED;LOW;Supervisor failed to execute the update verify command.;./bsp_q7s/devices/PlocUpdater.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\eive-software\eive_obsw/bsp_q7s/devices/PlocMemoryDumper.h
|
11705;UPDATE_FINISHED;INFO;MPSoC update successful completed;./bsp_q7s/devices/PlocUpdater.h
|
||||||
11802;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocMemoryDumper.h
|
11800;SEND_MRAM_DUMP_FAILED;LOW;Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command;./bsp_q7s/devices/PlocMemoryDumper.h
|
||||||
11901;INVALID_TC_FRAME;HIGH;;C:\Users\jakob\eive-software\eive_obsw/linux/obc/PdecHandler.h
|
11801;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;./bsp_q7s/devices/PlocMemoryDumper.h
|
||||||
11902;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;C:\Users\jakob\eive-software\eive_obsw/linux/obc/PdecHandler.h
|
11802;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;./bsp_q7s/devices/PlocMemoryDumper.h
|
||||||
11903;CARRIER_LOCK;INFO;Carrier lock detected;C:\Users\jakob\eive-software\eive_obsw/linux/obc/PdecHandler.h
|
11901;INVALID_TC_FRAME;HIGH;;./linux/obc/PdecHandler.h
|
||||||
11904;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);C:\Users\jakob\eive-software\eive_obsw/linux/obc/PdecHandler.h
|
11902;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;./linux/obc/PdecHandler.h
|
||||||
12000;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h
|
11903;CARRIER_LOCK;INFO;Carrier lock detected;./linux/obc/PdecHandler.h
|
||||||
12001;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h
|
11904;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);./linux/obc/PdecHandler.h
|
||||||
12002;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h
|
12000;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;./linux/devices/startracker/StrHelper.h
|
||||||
12003;IMAGE_DOWNLOAD_SUCCESSFUL;LOW;Image download was successful;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h
|
12001;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;./linux/devices/startracker/StrHelper.h
|
||||||
12004;FLASH_WRITE_SUCCESSFUL;LOW;Finished flash write procedure successfully;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h
|
12002;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;./linux/devices/startracker/StrHelper.h
|
||||||
12005;FLASH_READ_SUCCESSFUL;LOW;Finished flash read procedure successfully;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h
|
12003;IMAGE_DOWNLOAD_SUCCESSFUL;LOW;Image download was successful;./linux/devices/startracker/StrHelper.h
|
||||||
12006;FLASH_READ_FAILED;LOW;Flash read procedure failed;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h
|
12004;FLASH_WRITE_SUCCESSFUL;LOW;Finished flash write procedure successfully;./linux/devices/startracker/StrHelper.h
|
||||||
12007;FIRMWARE_UPDATE_SUCCESSFUL;LOW;Firmware update was successful;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h
|
12005;FLASH_READ_SUCCESSFUL;LOW;Finished flash read procedure successfully;./linux/devices/startracker/StrHelper.h
|
||||||
12008;FIRMWARE_UPDATE_FAILED;LOW;Firmware update failed;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h
|
12006;FLASH_READ_FAILED;LOW;Flash read procedure failed;./linux/devices/startracker/StrHelper.h
|
||||||
12009;STR_HELPER_READING_REPLY_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h
|
12007;FIRMWARE_UPDATE_SUCCESSFUL;LOW;Firmware update was successful;./linux/devices/startracker/StrHelper.h
|
||||||
12010;STR_HELPER_COM_ERROR;LOW;;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h
|
12008;FIRMWARE_UPDATE_FAILED;LOW;Firmware update failed;./linux/devices/startracker/StrHelper.h
|
||||||
12011;STR_HELPER_NO_REPLY;LOW;Star tracker did not send replies (maybe device is powered off) P1: Position of upload or download packet for which no reply was sent;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h
|
12009;STR_HELPER_READING_REPLY_FAILED;LOW;Failed to read communication interface reply data P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed;./linux/devices/startracker/StrHelper.h
|
||||||
12012;STR_HELPER_DEC_ERROR;LOW;;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h
|
12010;STR_HELPER_COM_ERROR;LOW;Unexpected stop of decoding sequence P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed;./linux/devices/startracker/StrHelper.h
|
||||||
12013;POSITION_MISMATCH;LOW;Position mismatch P1: The expected position and thus the position for which the image upload/download failed;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h
|
12011;STR_HELPER_NO_REPLY;LOW;Star tracker did not send replies (maybe device is powered off) P1: Position of upload or download packet for which no reply was sent;./linux/devices/startracker/StrHelper.h
|
||||||
12014;STR_HELPER_FILE_NOT_EXISTS;LOW;Specified file does not exist P1: Internal state of str helper;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h
|
12012;STR_HELPER_DEC_ERROR;LOW;Error during decoding of received reply occurred P1: Return value of decoding function P2: Position of upload/download packet, or address of flash write/read request;./linux/devices/startracker/StrHelper.h
|
||||||
12015;STR_HELPER_SENDING_PACKET_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h
|
12013;POSITION_MISMATCH;LOW;Position mismatch P1: The expected position and thus the position for which the image upload/download failed;./linux/devices/startracker/StrHelper.h
|
||||||
12016;STR_HELPER_REQUESTING_MSG_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h
|
12014;STR_HELPER_FILE_NOT_EXISTS;LOW;Specified file does not exist P1: Internal state of str helper;./linux/devices/startracker/StrHelper.h
|
||||||
|
12015;STR_HELPER_SENDING_PACKET_FAILED;LOW;;./linux/devices/startracker/StrHelper.h
|
||||||
|
12016;STR_HELPER_REQUESTING_MSG_FAILED;LOW;;./linux/devices/startracker/StrHelper.h
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -2,9 +2,18 @@ import os
|
|||||||
import enum
|
import enum
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
PATH_VAR_ROOT = Path(os.path.abspath(os.curdir))
|
|
||||||
ROOT_DIR = PATH_VAR_ROOT.absolute()
|
def determine_obsw_root_path() -> str:
|
||||||
OBSW_ROOT_DIR = PATH_VAR_ROOT.parent.absolute()
|
for _ in range(5):
|
||||||
|
if os.path.exists("CMakeLists.txt"):
|
||||||
|
return os.curdir
|
||||||
|
else:
|
||||||
|
os.chdir("..")
|
||||||
|
|
||||||
|
|
||||||
|
PATH_VAR_ROOT = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
ROOT_DIR = PATH_VAR_ROOT
|
||||||
|
OBSW_ROOT_DIR = Path(determine_obsw_root_path())
|
||||||
DATABASE_NAME = "eive_mod.db"
|
DATABASE_NAME = "eive_mod.db"
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,12 +3,17 @@ Event exporter.
|
|||||||
"""
|
"""
|
||||||
import datetime
|
import datetime
|
||||||
import time
|
import time
|
||||||
|
import os
|
||||||
|
|
||||||
from fsfwgen.events.event_parser import handle_csv_export, handle_cpp_export, \
|
from fsfwgen.events.event_parser import (
|
||||||
SubsystemDefinitionParser, EventParser
|
handle_csv_export,
|
||||||
|
handle_cpp_export,
|
||||||
|
SubsystemDefinitionParser,
|
||||||
|
EventParser,
|
||||||
|
)
|
||||||
from fsfwgen.parserbase.file_list_parser import FileListParser
|
from fsfwgen.parserbase.file_list_parser import FileListParser
|
||||||
from fsfwgen.utility.printer import PrettyPrinter
|
from fsfwgen.utility.printer import PrettyPrinter
|
||||||
from fsfwgen.utility.file_management import copy_file, move_file
|
from fsfwgen.utility.file_management import copy_file
|
||||||
from fsfwgen.core import get_console_logger
|
from fsfwgen.core import get_console_logger
|
||||||
from definitions import BspType, ROOT_DIR, OBSW_ROOT_DIR
|
from definitions import BspType, ROOT_DIR, OBSW_ROOT_DIR
|
||||||
|
|
||||||
@ -25,15 +30,16 @@ MOVE_CSV_FILE = True
|
|||||||
|
|
||||||
PARSE_HOST_BSP = True
|
PARSE_HOST_BSP = True
|
||||||
|
|
||||||
CPP_FILENAME = f'{__package__}/translateEvents.cpp'
|
# Store these files relative to the events folder
|
||||||
CPP_H_FILENAME = f'{__package__}/translateEvents.h'
|
CPP_FILENAME = f"{os.path.dirname(os.path.realpath(__file__))}/translateEvents.cpp"
|
||||||
|
CPP_H_FILENAME = f"{os.path.dirname(os.path.realpath(__file__))}/translateEvents.h"
|
||||||
|
|
||||||
BSP_SELECT = BspType.BSP_Q7S
|
BSP_SELECT = BspType.BSP_Q7S
|
||||||
|
|
||||||
BSP_DIR_NAME = BSP_SELECT.value
|
BSP_DIR_NAME = BSP_SELECT.value
|
||||||
|
|
||||||
CSV_FILENAME = f"{BSP_SELECT.value}_events.csv"
|
# Store this file in the root of the generators folder
|
||||||
CSV_MOVE_DESTINATION = f'{ROOT_DIR}'
|
CSV_FILENAME = f"{ROOT_DIR}/{BSP_SELECT.value}_events.csv"
|
||||||
|
|
||||||
if BSP_SELECT == BspType.BSP_Q7S or BSP_SELECT == BspType.BSP_LINUX_BOARD:
|
if BSP_SELECT == BspType.BSP_Q7S or BSP_SELECT == BspType.BSP_LINUX_BOARD:
|
||||||
FSFW_CONFIG_ROOT = f"{OBSW_ROOT_DIR}/linux/fsfwconfig"
|
FSFW_CONFIG_ROOT = f"{OBSW_ROOT_DIR}/linux/fsfwconfig"
|
||||||
@ -47,11 +53,15 @@ FILE_SEPARATOR = ";"
|
|||||||
SUBSYSTEM_DEFINITION_DESTINATIONS = [
|
SUBSYSTEM_DEFINITION_DESTINATIONS = [
|
||||||
f"{FSFW_CONFIG_ROOT}/events/subsystemIdRanges.h",
|
f"{FSFW_CONFIG_ROOT}/events/subsystemIdRanges.h",
|
||||||
f"{OBSW_ROOT_DIR}/fsfw/src/fsfw/events/fwSubsystemIdRanges.h",
|
f"{OBSW_ROOT_DIR}/fsfw/src/fsfw/events/fwSubsystemIdRanges.h",
|
||||||
f"{OBSW_ROOT_DIR}/common/config/commonSubsystemIds.h"
|
f"{OBSW_ROOT_DIR}/common/config/commonSubsystemIds.h",
|
||||||
]
|
]
|
||||||
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}/test/", f"{OBSW_ROOT_DIR}/bsp_q7s", f"{OBSW_ROOT_DIR}/linux/"
|
f"{OBSW_ROOT_DIR}/fsfw/",
|
||||||
|
f"{FSFW_CONFIG_ROOT}",
|
||||||
|
f"{OBSW_ROOT_DIR}/test/",
|
||||||
|
f"{OBSW_ROOT_DIR}/bsp_q7s",
|
||||||
|
f"{OBSW_ROOT_DIR}/linux/",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@ -73,11 +83,14 @@ def parse_events(
|
|||||||
)
|
)
|
||||||
if generate_cpp:
|
if generate_cpp:
|
||||||
handle_cpp_export(
|
handle_cpp_export(
|
||||||
event_list=event_list, date_string=DATE_STRING_FULL, file_name=CPP_FILENAME,
|
event_list=event_list,
|
||||||
generate_header=GENERATE_CPP_H, header_file_name=CPP_H_FILENAME
|
date_string=DATE_STRING_FULL,
|
||||||
|
file_name=CPP_FILENAME,
|
||||||
|
generate_header=GENERATE_CPP_H,
|
||||||
|
header_file_name=CPP_H_FILENAME,
|
||||||
)
|
)
|
||||||
if COPY_CPP_FILE:
|
if COPY_CPP_FILE:
|
||||||
LOGGER.info(f'EventParser: Copying file to {CPP_COPY_DESTINATION}')
|
LOGGER.info(f"EventParser: Copying file to {CPP_COPY_DESTINATION}")
|
||||||
copy_file(CPP_FILENAME, CPP_COPY_DESTINATION)
|
copy_file(CPP_FILENAME, CPP_COPY_DESTINATION)
|
||||||
copy_file(CPP_H_FILENAME, CPP_COPY_DESTINATION)
|
copy_file(CPP_H_FILENAME, CPP_COPY_DESTINATION)
|
||||||
|
|
||||||
@ -85,7 +98,7 @@ def parse_events(
|
|||||||
def generate_event_list() -> list:
|
def generate_event_list() -> list:
|
||||||
subsystem_parser = SubsystemDefinitionParser(SUBSYSTEM_DEFINITION_DESTINATIONS)
|
subsystem_parser = SubsystemDefinitionParser(SUBSYSTEM_DEFINITION_DESTINATIONS)
|
||||||
subsystem_table = subsystem_parser.parse_files()
|
subsystem_table = subsystem_parser.parse_files()
|
||||||
LOGGER.info(f'Found {len(subsystem_table)} subsystem definitions.')
|
LOGGER.info(f"Found {len(subsystem_table)} subsystem definitions.")
|
||||||
PrettyPrinter.pprint(subsystem_table)
|
PrettyPrinter.pprint(subsystem_table)
|
||||||
event_header_parser = FileListParser(HEADER_DEFINITION_DESTINATIONS)
|
event_header_parser = FileListParser(HEADER_DEFINITION_DESTINATIONS)
|
||||||
event_headers = event_header_parser.parse_header_files(
|
event_headers = event_header_parser.parse_header_files(
|
||||||
@ -94,8 +107,9 @@ def generate_event_list() -> list:
|
|||||||
# PrettyPrinter.pprint(event_headers)
|
# PrettyPrinter.pprint(event_headers)
|
||||||
# myEventList = parseHeaderFiles(subsystem_table, event_headers)
|
# myEventList = parseHeaderFiles(subsystem_table, event_headers)
|
||||||
event_parser = EventParser(event_headers, subsystem_table)
|
event_parser = EventParser(event_headers, subsystem_table)
|
||||||
|
event_parser.obsw_root_path = OBSW_ROOT_DIR
|
||||||
event_parser.set_moving_window_mode(moving_window_size=7)
|
event_parser.set_moving_window_mode(moving_window_size=7)
|
||||||
event_table = event_parser.parse_files()
|
event_table = event_parser.parse_files()
|
||||||
event_list = sorted(event_table.items())
|
event_list = sorted(event_table.items())
|
||||||
LOGGER.info(f'Found {len(event_list)} entries')
|
LOGGER.info(f"Found {len(event_list)} entries")
|
||||||
return event_list
|
return event_list
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 139 translations.
|
* @brief Auto-generated event translation file. Contains 141 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2022-02-27 15:36:42
|
* Generated on: 2022-03-01 18:04:34
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -113,7 +113,9 @@ const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_
|
|||||||
const char *SUPV_ACK_FAILURE_STRING = "SUPV_ACK_FAILURE";
|
const char *SUPV_ACK_FAILURE_STRING = "SUPV_ACK_FAILURE";
|
||||||
const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE";
|
const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE";
|
||||||
const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT";
|
const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT";
|
||||||
const char *SANITIZATION_FAILED_STRING = "SANITIZATION_FAILED";
|
const char *ALLOC_FAILURE_STRING = "ALLOC_FAILURE";
|
||||||
|
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
||||||
|
const char *REBOOT_HW_STRING = "REBOOT_HW";
|
||||||
const char *UPDATE_FILE_NOT_EXISTS_STRING = "UPDATE_FILE_NOT_EXISTS";
|
const char *UPDATE_FILE_NOT_EXISTS_STRING = "UPDATE_FILE_NOT_EXISTS";
|
||||||
const char *ACTION_COMMANDING_FAILED_STRING = "ACTION_COMMANDING_FAILED";
|
const char *ACTION_COMMANDING_FAILED_STRING = "ACTION_COMMANDING_FAILED";
|
||||||
const char *UPDATE_AVAILABLE_FAILED_STRING = "UPDATE_AVAILABLE_FAILED";
|
const char *UPDATE_AVAILABLE_FAILED_STRING = "UPDATE_AVAILABLE_FAILED";
|
||||||
@ -146,7 +148,7 @@ const char *STR_HELPER_SENDING_PACKET_FAILED_STRING = "STR_HELPER_SENDING_PACKET
|
|||||||
const char *STR_HELPER_REQUESTING_MSG_FAILED_STRING = "STR_HELPER_REQUESTING_MSG_FAILED";
|
const char *STR_HELPER_REQUESTING_MSG_FAILED_STRING = "STR_HELPER_REQUESTING_MSG_FAILED";
|
||||||
|
|
||||||
const char *translateEvents(Event event) {
|
const char *translateEvents(Event event) {
|
||||||
switch( (event & 0xffff) ) {
|
switch((event & 0xFFFF)) {
|
||||||
case (2200):
|
case (2200):
|
||||||
return STORE_SEND_WRITE_FAILED_STRING;
|
return STORE_SEND_WRITE_FAILED_STRING;
|
||||||
case (2201):
|
case (2201):
|
||||||
@ -364,7 +366,11 @@ const char * translateEvents(Event event) {
|
|||||||
case (11504):
|
case (11504):
|
||||||
return SUPV_CRC_FAILURE_EVENT_STRING;
|
return SUPV_CRC_FAILURE_EVENT_STRING;
|
||||||
case (11600):
|
case (11600):
|
||||||
return SANITIZATION_FAILED_STRING;
|
return ALLOC_FAILURE_STRING;
|
||||||
|
case (11601):
|
||||||
|
return REBOOT_SW_STRING;
|
||||||
|
case (11603):
|
||||||
|
return REBOOT_HW_STRING;
|
||||||
case (11700):
|
case (11700):
|
||||||
return UPDATE_FILE_NOT_EXISTS_STRING;
|
return UPDATE_FILE_NOT_EXISTS_STRING;
|
||||||
case (11701):
|
case (11701):
|
||||||
|
@ -4,26 +4,31 @@ import time
|
|||||||
from objects.objects import parse_objects
|
from objects.objects import parse_objects
|
||||||
from events.event_parser import parse_events
|
from events.event_parser import parse_events
|
||||||
from returnvalues.returnvalues_parser import parse_returnvalues
|
from returnvalues.returnvalues_parser import parse_returnvalues
|
||||||
from fsfwgen.core import return_generic_args_parser, init_printout, get_console_logger, ParserTypes
|
from fsfwgen.core import (
|
||||||
|
return_generic_args_parser,
|
||||||
|
init_printout,
|
||||||
|
get_console_logger,
|
||||||
|
ParserTypes,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
LOGGER = get_console_logger()
|
LOGGER = get_console_logger()
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
init_printout(project_string='EIVE')
|
init_printout(project_string="EIVE")
|
||||||
parser = return_generic_args_parser()
|
parser = return_generic_args_parser()
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
if args.type == 'objects':
|
if args.type == "objects":
|
||||||
LOGGER.info(f'Generating objects data..')
|
LOGGER.info(f"Generating objects data..")
|
||||||
time.sleep(0.05)
|
time.sleep(0.05)
|
||||||
parse_objects()
|
parse_objects()
|
||||||
elif args.type == 'events':
|
elif args.type == "events":
|
||||||
LOGGER.info(f'Generating event data')
|
LOGGER.info(f"Generating event data")
|
||||||
time.sleep(0.05)
|
time.sleep(0.05)
|
||||||
parse_events()
|
parse_events()
|
||||||
elif args.type == 'returnvalues':
|
elif args.type == "returnvalues":
|
||||||
LOGGER.info('Generating returnvalue data')
|
LOGGER.info("Generating returnvalue data")
|
||||||
time.sleep(0.05)
|
time.sleep(0.05)
|
||||||
parse_returnvalues()
|
parse_returnvalues()
|
||||||
pass
|
pass
|
||||||
|
@ -2,13 +2,18 @@
|
|||||||
Object exporter.
|
Object exporter.
|
||||||
"""
|
"""
|
||||||
import datetime
|
import datetime
|
||||||
|
import os
|
||||||
|
|
||||||
from fsfwgen.core import get_console_logger
|
from fsfwgen.core import get_console_logger
|
||||||
from fsfwgen.objects.objects import sql_object_exporter, ObjectDefinitionParser, \
|
from fsfwgen.objects.objects import (
|
||||||
write_translation_file, \
|
sql_object_exporter,
|
||||||
export_object_file, write_translation_header_file
|
ObjectDefinitionParser,
|
||||||
|
write_translation_file,
|
||||||
|
export_object_file,
|
||||||
|
write_translation_header_file,
|
||||||
|
)
|
||||||
from fsfwgen.utility.printer import PrettyPrinter
|
from fsfwgen.utility.printer import PrettyPrinter
|
||||||
from fsfwgen.utility.file_management import copy_file, move_file
|
from fsfwgen.utility.file_management import copy_file
|
||||||
|
|
||||||
from definitions import BspType, DATABASE_NAME, OBSW_ROOT_DIR, ROOT_DIR
|
from definitions import BspType, DATABASE_NAME, OBSW_ROOT_DIR, ROOT_DIR
|
||||||
|
|
||||||
@ -34,16 +39,17 @@ else:
|
|||||||
EXPORT_TO_SQL = True
|
EXPORT_TO_SQL = True
|
||||||
|
|
||||||
CPP_COPY_DESTINATION = f"{FSFW_CONFIG_ROOT}/objects/"
|
CPP_COPY_DESTINATION = f"{FSFW_CONFIG_ROOT}/objects/"
|
||||||
CSV_MOVE_DESTINATION = f"{ROOT_DIR}"
|
CPP_FILENAME = f"{os.path.dirname(os.path.realpath(__file__))}//translateObjects.cpp"
|
||||||
CPP_FILENAME = f'{__package__}/translateObjects.cpp'
|
CPP_H_FILENAME = f"{os.path.dirname(os.path.realpath(__file__))}//translateObjects.h"
|
||||||
CPP_H_FILENAME = f'{__package__}/translateObjects.h'
|
CSV_OBJECT_FILENAME = f"{ROOT_DIR}/{BSP_SELECT.value}_objects.csv"
|
||||||
CSV_OBJECT_FILENAME = f"{BSP_SELECT.value}_objects.csv"
|
|
||||||
FILE_SEPARATOR = ";"
|
FILE_SEPARATOR = ";"
|
||||||
|
|
||||||
|
|
||||||
OBJECTS_PATH = f"{FSFW_CONFIG_ROOT}/objects/systemObjectList.h"
|
OBJECTS_PATH = f"{FSFW_CONFIG_ROOT}/objects/systemObjectList.h"
|
||||||
FRAMEWORK_OBJECT_PATH = f'{OBSW_ROOT_DIR}/fsfw/src/fsfw/objectmanager/frameworkObjects.h'
|
FRAMEWORK_OBJECT_PATH = (
|
||||||
COMMON_OBJECTS_PATH = f'{OBSW_ROOT_DIR}/common/config/commonObjects.h'
|
f"{OBSW_ROOT_DIR}/fsfw/src/fsfw/objectmanager/frameworkObjects.h"
|
||||||
|
)
|
||||||
|
COMMON_OBJECTS_PATH = f"{OBSW_ROOT_DIR}/common/config/commonObjects.h"
|
||||||
OBJECTS_DEFINITIONS = [OBJECTS_PATH, FRAMEWORK_OBJECT_PATH, COMMON_OBJECTS_PATH]
|
OBJECTS_DEFINITIONS = [OBJECTS_PATH, FRAMEWORK_OBJECT_PATH, COMMON_OBJECTS_PATH]
|
||||||
|
|
||||||
SQL_DELETE_OBJECTS_CMD = """
|
SQL_DELETE_OBJECTS_CMD = """
|
||||||
@ -70,35 +76,41 @@ def parse_objects(print_object_list: bool = True):
|
|||||||
subsystem_definitions = object_parser.parse_files()
|
subsystem_definitions = object_parser.parse_files()
|
||||||
# id_subsystem_definitions.update(framework_subsystem_definitions)
|
# id_subsystem_definitions.update(framework_subsystem_definitions)
|
||||||
list_items = sorted(subsystem_definitions.items())
|
list_items = sorted(subsystem_definitions.items())
|
||||||
LOGGER.info(f'ObjectParser: Number of objects: {len(list_items)}')
|
LOGGER.info(f"ObjectParser: Number of objects: {len(list_items)}")
|
||||||
|
|
||||||
if print_object_list:
|
if print_object_list:
|
||||||
PrettyPrinter.pprint(list_items)
|
PrettyPrinter.pprint(list_items)
|
||||||
|
|
||||||
handle_file_export(list_items)
|
handle_file_export(list_items)
|
||||||
if EXPORT_TO_SQL:
|
if EXPORT_TO_SQL:
|
||||||
LOGGER.info('ObjectParser: Exporting to SQL')
|
LOGGER.info("ObjectParser: Exporting to SQL")
|
||||||
sql_object_exporter(
|
sql_object_exporter(
|
||||||
object_table=list_items, delete_cmd=SQL_DELETE_OBJECTS_CMD,
|
object_table=list_items,
|
||||||
|
delete_cmd=SQL_DELETE_OBJECTS_CMD,
|
||||||
insert_cmd=SQL_INSERT_INTO_OBJECTS_CMD,
|
insert_cmd=SQL_INSERT_INTO_OBJECTS_CMD,
|
||||||
create_cmd=SQL_CREATE_OBJECTS_CMD, db_filename=f"{ROOT_DIR}/{DATABASE_NAME}"
|
create_cmd=SQL_CREATE_OBJECTS_CMD,
|
||||||
|
db_filename=f"{ROOT_DIR}/{DATABASE_NAME}",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def handle_file_export(list_items):
|
def handle_file_export(list_items):
|
||||||
if GENERATE_CPP:
|
if GENERATE_CPP:
|
||||||
LOGGER.info('ObjectParser: Generating translation C++ file')
|
LOGGER.info("ObjectParser: Generating C++ translation file")
|
||||||
write_translation_file(
|
write_translation_file(
|
||||||
filename=CPP_FILENAME, list_of_entries=list_items, date_string_full=DATE_STRING_FULL
|
filename=CPP_FILENAME,
|
||||||
|
list_of_entries=list_items,
|
||||||
|
date_string_full=DATE_STRING_FULL,
|
||||||
)
|
)
|
||||||
if COPY_CPP:
|
if COPY_CPP:
|
||||||
print("ObjectParser: Copying object file to " + CPP_COPY_DESTINATION)
|
LOGGER.info("ObjectParser: Copying object file to " + CPP_COPY_DESTINATION)
|
||||||
copy_file(CPP_FILENAME, CPP_COPY_DESTINATION)
|
copy_file(CPP_FILENAME, CPP_COPY_DESTINATION)
|
||||||
if GENERATE_HEADER:
|
if GENERATE_HEADER:
|
||||||
write_translation_header_file(filename=CPP_H_FILENAME)
|
write_translation_header_file(filename=CPP_H_FILENAME)
|
||||||
copy_file(filename=CPP_H_FILENAME, destination=CPP_COPY_DESTINATION)
|
copy_file(filename=CPP_H_FILENAME, destination=CPP_COPY_DESTINATION)
|
||||||
if GENERATE_CSV:
|
if GENERATE_CSV:
|
||||||
print("ObjectParser: Generating text export.")
|
LOGGER.info("ObjectParser: Generating text export")
|
||||||
export_object_file(
|
export_object_file(
|
||||||
filename=CSV_OBJECT_FILENAME, object_list=list_items, file_separator=FILE_SEPARATOR
|
filename=CSV_OBJECT_FILENAME,
|
||||||
|
object_list=list_items,
|
||||||
|
file_separator=FILE_SEPARATOR,
|
||||||
)
|
)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 112 translations.
|
* Contains 112 translations.
|
||||||
* Generated on: 2022-02-27 15:36:48
|
* Generated on: 2022-03-01 18:04:38
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
|
@ -24,33 +24,34 @@ EXPORT_TO_SQL = True
|
|||||||
PRINT_TABLES = True
|
PRINT_TABLES = True
|
||||||
|
|
||||||
|
|
||||||
FILE_SEPARATOR = ';'
|
FILE_SEPARATOR = ";"
|
||||||
MAX_STRING_LENGTH = 32
|
MAX_STRING_LENGTH = 32
|
||||||
|
|
||||||
BSP_SELECT = BspType.BSP_Q7S
|
BSP_SELECT = BspType.BSP_Q7S
|
||||||
BSP_DIR_NAME = BSP_SELECT.value
|
BSP_DIR_NAME = BSP_SELECT.value
|
||||||
CSV_RETVAL_FILENAME = f'{BSP_SELECT.value}_returnvalues.csv'
|
CSV_RETVAL_FILENAME = f"{ROOT_DIR}/{BSP_SELECT.value}_returnvalues.csv"
|
||||||
CSV_MOVE_DESTINATION = f'{ROOT_DIR}'
|
|
||||||
ADD_LINUX_FOLDER = False
|
ADD_LINUX_FOLDER = False
|
||||||
|
|
||||||
if BSP_SELECT == BspType.BSP_Q7S or BSP_SELECT == BspType.BSP_LINUX_BOARD:
|
if BSP_SELECT == BspType.BSP_Q7S or BSP_SELECT == BspType.BSP_LINUX_BOARD:
|
||||||
FSFW_CONFIG_ROOT = f'{OBSW_ROOT_DIR}/linux/fsfwconfig'
|
FSFW_CONFIG_ROOT = f"{OBSW_ROOT_DIR}/linux/fsfwconfig"
|
||||||
ADD_LINUX_FOLDER = True
|
ADD_LINUX_FOLDER = True
|
||||||
else:
|
else:
|
||||||
FSFW_CONFIG_ROOT = f'{OBSW_ROOT_DIR}/{BSP_DIR_NAME}/fsfwconfig'
|
FSFW_CONFIG_ROOT = f"{OBSW_ROOT_DIR}/{BSP_DIR_NAME}/fsfwconfig"
|
||||||
BSP_PATH = f"{OBSW_ROOT_DIR}/{BSP_DIR_NAME}"
|
BSP_PATH = f"{OBSW_ROOT_DIR}/{BSP_DIR_NAME}"
|
||||||
|
|
||||||
INTERFACE_DEFINITION_FILES = [
|
INTERFACE_DEFINITION_FILES = [
|
||||||
f'{OBSW_ROOT_DIR}/fsfw/src/fsfw/returnvalues/FwClassIds.h',
|
f"{OBSW_ROOT_DIR}/fsfw/src/fsfw/returnvalues/FwClassIds.h",
|
||||||
f'{OBSW_ROOT_DIR}/common/config/commonClassIds.h',
|
f"{OBSW_ROOT_DIR}/common/config/commonClassIds.h",
|
||||||
f'{FSFW_CONFIG_ROOT}/returnvalues/classIds.h'
|
f"{FSFW_CONFIG_ROOT}/returnvalues/classIds.h",
|
||||||
]
|
]
|
||||||
RETURNVALUE_SOURCES = [
|
RETURNVALUE_SOURCES = [
|
||||||
f'{OBSW_ROOT_DIR}/mission/', f'{OBSW_ROOT_DIR}/fsfw/', f'{BSP_PATH}'
|
f"{OBSW_ROOT_DIR}/mission/",
|
||||||
|
f"{OBSW_ROOT_DIR}/fsfw/",
|
||||||
|
f"{BSP_PATH}",
|
||||||
]
|
]
|
||||||
|
|
||||||
if ADD_LINUX_FOLDER:
|
if ADD_LINUX_FOLDER:
|
||||||
RETURNVALUE_SOURCES.append(f'{OBSW_ROOT_DIR}/linux')
|
RETURNVALUE_SOURCES.append(f"{OBSW_ROOT_DIR}/linux")
|
||||||
|
|
||||||
SQL_DELETE_RETURNVALUES_CMD = """
|
SQL_DELETE_RETURNVALUES_CMD = """
|
||||||
DROP TABLE IF EXISTS Returnvalues
|
DROP TABLE IF EXISTS Returnvalues
|
||||||
@ -76,12 +77,16 @@ VALUES(?,?,?,?,?)
|
|||||||
def parse_returnvalues():
|
def parse_returnvalues():
|
||||||
returnvalue_table = generate_returnvalue_table()
|
returnvalue_table = generate_returnvalue_table()
|
||||||
if EXPORT_TO_FILE:
|
if EXPORT_TO_FILE:
|
||||||
ReturnValueParser.export_to_file(CSV_RETVAL_FILENAME, returnvalue_table, FILE_SEPARATOR)
|
ReturnValueParser.export_to_file(
|
||||||
|
CSV_RETVAL_FILENAME, returnvalue_table, FILE_SEPARATOR
|
||||||
|
)
|
||||||
# if MOVE_CSV_FILE:
|
# if MOVE_CSV_FILE:
|
||||||
# move_file(file_name=CSV_RETVAL_FILENAME, destination=CSV_MOVE_DESTINATION)
|
# move_file(file_name=CSV_RETVAL_FILENAME, destination=CSV_MOVE_DESTINATION)
|
||||||
if EXPORT_TO_SQL:
|
if EXPORT_TO_SQL:
|
||||||
LOGGER.info('ReturnvalueParser: Exporting to SQL')
|
LOGGER.info("ReturnvalueParser: Exporting to SQL")
|
||||||
sql_retval_exporter(returnvalue_table, db_filename=f"{ROOT_DIR}/{DATABASE_NAME}")
|
sql_retval_exporter(
|
||||||
|
returnvalue_table, db_filename=f"{ROOT_DIR}/{DATABASE_NAME}"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def generate_returnvalue_table():
|
def generate_returnvalue_table():
|
||||||
@ -104,10 +109,8 @@ def sql_retval_exporter(returnvalue_table, db_filename: str):
|
|||||||
sql_writer.open(SQL_CREATE_RETURNVALUES_CMD)
|
sql_writer.open(SQL_CREATE_RETURNVALUES_CMD)
|
||||||
for entry in returnvalue_table.items():
|
for entry in returnvalue_table.items():
|
||||||
sql_writer.write_entries(
|
sql_writer.write_entries(
|
||||||
SQL_INSERT_RETURNVALUES_CMD, (entry[0],
|
SQL_INSERT_RETURNVALUES_CMD,
|
||||||
entry[1][2],
|
(entry[0], entry[1][2], entry[1][4], entry[1][3], entry[1][1]),
|
||||||
entry[1][4],
|
)
|
||||||
entry[1][3],
|
|
||||||
entry[1][1]))
|
|
||||||
sql_writer.commit()
|
sql_writer.commit()
|
||||||
sql_writer.close()
|
sql_writer.close()
|
||||||
|
@ -140,10 +140,9 @@ debugging. */
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
/** Hardcoded */
|
/** CMake Defines */
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
// Leave at one as the BSP is linux. Used by the ADIS1650X device handler
|
#cmakedefine EIVE_BUILD_GPSD_GPS_HANDLER
|
||||||
#define OBSW_ADIS1650X_LINUX_COM_IF 1
|
|
||||||
|
|
||||||
#include "OBSWVersion.h"
|
#include "OBSWVersion.h"
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 139 translations.
|
* @brief Auto-generated event translation file. Contains 141 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2022-02-27 15:36:42
|
* Generated on: 2022-03-01 18:04:34
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -113,7 +113,9 @@ const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_
|
|||||||
const char *SUPV_ACK_FAILURE_STRING = "SUPV_ACK_FAILURE";
|
const char *SUPV_ACK_FAILURE_STRING = "SUPV_ACK_FAILURE";
|
||||||
const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE";
|
const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE";
|
||||||
const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT";
|
const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT";
|
||||||
const char *SANITIZATION_FAILED_STRING = "SANITIZATION_FAILED";
|
const char *ALLOC_FAILURE_STRING = "ALLOC_FAILURE";
|
||||||
|
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
||||||
|
const char *REBOOT_HW_STRING = "REBOOT_HW";
|
||||||
const char *UPDATE_FILE_NOT_EXISTS_STRING = "UPDATE_FILE_NOT_EXISTS";
|
const char *UPDATE_FILE_NOT_EXISTS_STRING = "UPDATE_FILE_NOT_EXISTS";
|
||||||
const char *ACTION_COMMANDING_FAILED_STRING = "ACTION_COMMANDING_FAILED";
|
const char *ACTION_COMMANDING_FAILED_STRING = "ACTION_COMMANDING_FAILED";
|
||||||
const char *UPDATE_AVAILABLE_FAILED_STRING = "UPDATE_AVAILABLE_FAILED";
|
const char *UPDATE_AVAILABLE_FAILED_STRING = "UPDATE_AVAILABLE_FAILED";
|
||||||
@ -146,7 +148,7 @@ const char *STR_HELPER_SENDING_PACKET_FAILED_STRING = "STR_HELPER_SENDING_PACKET
|
|||||||
const char *STR_HELPER_REQUESTING_MSG_FAILED_STRING = "STR_HELPER_REQUESTING_MSG_FAILED";
|
const char *STR_HELPER_REQUESTING_MSG_FAILED_STRING = "STR_HELPER_REQUESTING_MSG_FAILED";
|
||||||
|
|
||||||
const char *translateEvents(Event event) {
|
const char *translateEvents(Event event) {
|
||||||
switch ((event & 0xffff)) {
|
switch((event & 0xFFFF)) {
|
||||||
case (2200):
|
case (2200):
|
||||||
return STORE_SEND_WRITE_FAILED_STRING;
|
return STORE_SEND_WRITE_FAILED_STRING;
|
||||||
case (2201):
|
case (2201):
|
||||||
@ -364,7 +366,11 @@ const char *translateEvents(Event event) {
|
|||||||
case (11504):
|
case (11504):
|
||||||
return SUPV_CRC_FAILURE_EVENT_STRING;
|
return SUPV_CRC_FAILURE_EVENT_STRING;
|
||||||
case (11600):
|
case (11600):
|
||||||
return SANITIZATION_FAILED_STRING;
|
return ALLOC_FAILURE_STRING;
|
||||||
|
case (11601):
|
||||||
|
return REBOOT_SW_STRING;
|
||||||
|
case (11603):
|
||||||
|
return REBOOT_HW_STRING;
|
||||||
case (11700):
|
case (11700):
|
||||||
return UPDATE_FILE_NOT_EXISTS_STRING;
|
return UPDATE_FILE_NOT_EXISTS_STRING;
|
||||||
case (11701):
|
case (11701):
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 112 translations.
|
* Contains 112 translations.
|
||||||
* Generated on: 2022-02-27 15:36:48
|
* Generated on: 2022-03-01 18:04:38
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
#include <fsfw/action/HasActionsIF.h>
|
#include <fsfw/action/HasActionsIF.h>
|
||||||
#include <fsfw/datapool/PoolReadGuard.h>
|
#include <fsfw/datapool/PoolReadGuard.h>
|
||||||
|
|
||||||
#if OBSW_ADIS1650X_LINUX_COM_IF == 1
|
#include "fsfw/FSFW.h"
|
||||||
|
|
||||||
|
#ifdef FSFW_OSAL_LINUX
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
@ -20,7 +22,7 @@ GyroADIS1650XHandler::GyroADIS1650XHandler(object_id_t objectId, object_id_t dev
|
|||||||
primaryDataset(this),
|
primaryDataset(this),
|
||||||
configDataset(this),
|
configDataset(this),
|
||||||
breakCountdown() {
|
breakCountdown() {
|
||||||
#if OBSW_ADIS1650X_LINUX_COM_IF == 1
|
#ifdef FSFW_OSAL_LINUX
|
||||||
SpiCookie *cookie = dynamic_cast<SpiCookie *>(comCookie);
|
SpiCookie *cookie = dynamic_cast<SpiCookie *>(comCookie);
|
||||||
if (cookie != nullptr) {
|
if (cookie != nullptr) {
|
||||||
cookie->setCallbackMode(&spiSendCallback, this);
|
cookie->setCallbackMode(&spiSendCallback, this);
|
||||||
@ -383,7 +385,7 @@ GyroADIS1650XHandler::BurstModes GyroADIS1650XHandler::getBurstMode() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if OBSW_ADIS1650X_LINUX_COM_IF == 1
|
#ifdef FSFW_OSAL_LINUX
|
||||||
|
|
||||||
ReturnValue_t GyroADIS1650XHandler::spiSendCallback(SpiComIF *comIf, SpiCookie *cookie,
|
ReturnValue_t GyroADIS1650XHandler::spiSendCallback(SpiComIF *comIf, SpiCookie *cookie,
|
||||||
const uint8_t *sendData, size_t sendLen,
|
const uint8_t *sendData, size_t sendLen,
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
||||||
#include "fsfw/globalfunctions/PeriodicOperationDivider.h"
|
#include "fsfw/globalfunctions/PeriodicOperationDivider.h"
|
||||||
|
|
||||||
#if OBSW_ADIS1650X_LINUX_COM_IF == 1
|
#ifdef FSFW_OSAL_LINUX
|
||||||
class SpiComIF;
|
class SpiComIF;
|
||||||
class SpiCookie;
|
class SpiCookie;
|
||||||
#endif
|
#endif
|
||||||
@ -65,7 +65,7 @@ class GyroADIS1650XHandler : public DeviceHandlerBase {
|
|||||||
|
|
||||||
BurstModes getBurstMode();
|
BurstModes getBurstMode();
|
||||||
|
|
||||||
#if OBSW_ADIS1650X_LINUX_COM_IF == 1
|
#ifdef FSFW_OSAL_LINUX
|
||||||
static ReturnValue_t spiSendCallback(SpiComIF *comIf, SpiCookie *cookie, const uint8_t *sendData,
|
static ReturnValue_t spiSendCallback(SpiComIF *comIf, SpiCookie *cookie, const uint8_t *sendData,
|
||||||
size_t sendLen, void *args);
|
size_t sendLen, void *args);
|
||||||
#endif
|
#endif
|
||||||
|
@ -11,7 +11,12 @@ ReturnValue_t NVMParameterBase::readJsonFile() {
|
|||||||
if (std::filesystem::exists(fullName)) {
|
if (std::filesystem::exists(fullName)) {
|
||||||
// Read JSON file content into object
|
// Read JSON file content into object
|
||||||
std::ifstream i(fullName);
|
std::ifstream i(fullName);
|
||||||
|
try {
|
||||||
i >> json;
|
i >> json;
|
||||||
|
} catch (nlohmann::json::exception& e) {
|
||||||
|
sif::warning << "Reading JSON file failed with error " << e.what() << std::endl;
|
||||||
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
}
|
}
|
||||||
return HasFileSystemIF::FILE_DOES_NOT_EXIST;
|
return HasFileSystemIF::FILE_DOES_NOT_EXIST;
|
||||||
@ -19,7 +24,12 @@ ReturnValue_t NVMParameterBase::readJsonFile() {
|
|||||||
|
|
||||||
ReturnValue_t NVMParameterBase::writeJsonFile() {
|
ReturnValue_t NVMParameterBase::writeJsonFile() {
|
||||||
std::ofstream o(fullName);
|
std::ofstream o(fullName);
|
||||||
|
try {
|
||||||
o << std::setw(4) << json << std::endl;
|
o << std::setw(4) << json << std::endl;
|
||||||
|
} catch (nlohmann::json::exception& e) {
|
||||||
|
sif::warning << "Writing JSON file failed with error " << e.what() << std::endl;
|
||||||
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
18
mission/memory/SdCardMountedIF.h
Normal file
18
mission/memory/SdCardMountedIF.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef MISSION_MEMORY_SDCARDMOUNTERIF_H_
|
||||||
|
#define MISSION_MEMORY_SDCARDMOUNTERIF_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include "definitions.h"
|
||||||
|
|
||||||
|
class SdCardMountedIF {
|
||||||
|
public:
|
||||||
|
virtual ~SdCardMountedIF(){};
|
||||||
|
virtual std::string getCurrentMountPrefix(sd::SdCard prefSdCardPtr = sd::SdCard::NONE) = 0;
|
||||||
|
virtual bool isSdCardMounted(sd::SdCard sdCard) = 0;
|
||||||
|
virtual ReturnValue_t getPreferredSdCard(sd::SdCard& sdCard) const = 0;
|
||||||
|
|
||||||
|
private:
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* MISSION_MEMORY_SDCARDMOUNTERIF_H_ */
|
Loading…
Reference in New Issue
Block a user