PDEC Config Persistent #398

Merged
muellerr merged 21 commits from meier/pdec-config-persistent into develop 2023-02-27 18:33:52 +01:00
272 changed files with 6803 additions and 14021 deletions
Showing only changes of commit a13ae7abcc - Show all commits

2
fsfw

Submodule fsfw updated: 01cc619e67...dac2d210b5

View File

@ -1,4 +1,5 @@
#include "PdecConfig.h" #include "PdecConfig.h"
#include "pdecconfigdefs.h"
#include "fsfw/serviceinterface/ServiceInterface.h" #include "fsfw/serviceinterface/ServiceInterface.h"
@ -74,11 +75,14 @@ void PdecConfig::writeFrameHeaderFirstOctet() {
word |= (SPACECRAFT_ID << 16); word |= (SPACECRAFT_ID << 16);
word |= (VIRTUAL_CHANNEL << 10); word |= (VIRTUAL_CHANNEL << 10);
word |= (DUMMY_BITS << 8); word |= (DUMMY_BITS << 8);
word |= positiveWindow; word |= localParameterHandler.getValue(pdecconfigdefs::paramkeys::POSITIVE_WINDOW,
pdecconfigdefs::defaultvalue::positiveWindow);
*(memoryBaseAddress + FRAME_HEADER_OFFSET) = word; *(memoryBaseAddress + FRAME_HEADER_OFFSET) = word;
} }
void PdecConfig::writeFrameHeaderSecondOctet() { void PdecConfig::writeFrameHeaderSecondOctet() {
uint8_t negativeWindow = localParameterHandler.getValue(pdecconfigdefs::paramkeys::NEGATIVE_WINDOW,
pdecconfigdefs::defaultvalue::negativeWindow);
uint32_t word = 0; uint32_t word = 0;
word = 0; word = 0;
word |= (negativeWindow << 24); word |= (negativeWindow << 24);

View File

@ -1,7 +1,7 @@
#ifndef LINUX_OBC_PDECCONFIG_H_ #ifndef LINUX_OBC_PDECCONFIG_H_
#define LINUX_OBC_PDECCONFIG_H_ #define LINUX_OBC_PDECCONFIG_H_
#include <cstring> #include <string>
#include "bsp_q7s/memory/LocalParameterHandler.h" #include "bsp_q7s/memory/LocalParameterHandler.h"
#include "bsp_q7s/fs/SdCardManager.h" #include "bsp_q7s/fs/SdCardManager.h"
@ -49,6 +49,7 @@ class PdecConfig {
uint8_t getNegativeWindow(); uint8_t getNegativeWindow();
private: private:
// TC transfer frame configuration parameters // TC transfer frame configuration parameters
static const uint8_t VERSION_ID = 0; static const uint8_t VERSION_ID = 0;
// BD Frames // BD Frames
@ -95,13 +96,6 @@ class PdecConfig {
bool enableTcAbortIrq = true; bool enableTcAbortIrq = true;
bool enableNewFarIrq = true; bool enableNewFarIrq = true;
NVMParameterBase persistenParams;
// Parameters to control the FARM for AD frames
// Set here for future use
uint8_t positiveWindow = 10;
uint8_t negativeWindow = 151;
void writeFrameHeaderFirstOctet(); void writeFrameHeaderFirstOctet();
void writeFrameHeaderSecondOctet(); void writeFrameHeaderSecondOctet();
void writeMapConfig(); void writeMapConfig();

View File

@ -0,0 +1,20 @@
#ifndef LINUX_IPCORE_PDECCONFIGDEFS_H_
#define LINUX_IPCORE_PDECCONFIGDEFS_H_
#include <string>
namespace pdecconfigdefs {
namespace paramkeys {
static const std::string POSITIVE_WINDOW = "positive_window";
static const std::string NEGATIVE_WINDOW = "negattive_window";
}
namespace defaultvalue {
static const uint8_t positiveWindow = 10;
static const uint8_t negativeWindow = 151;
}
}
#endif /* LINUX_IPCORE_PDECCONFIGDEFS_H_ */

2
tmtc

Submodule tmtc updated: a3a3aaa883...8d036bcd4f