pdec ad frame config, wip
This commit is contained in:
parent
60c99fdbfb
commit
a13ae7abcc
2
fsfw
2
fsfw
@ -1 +1 @@
|
||||
Subproject commit 01cc619e67b84cef514b045377771ff1e11caf80
|
||||
Subproject commit dac2d210b597adfaf45bd5ae6a4c027599927601
|
@ -1,4 +1,5 @@
|
||||
#include "PdecConfig.h"
|
||||
#include "pdecconfigdefs.h"
|
||||
|
||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||
|
||||
@ -74,11 +75,14 @@ void PdecConfig::writeFrameHeaderFirstOctet() {
|
||||
word |= (SPACECRAFT_ID << 16);
|
||||
word |= (VIRTUAL_CHANNEL << 10);
|
||||
word |= (DUMMY_BITS << 8);
|
||||
word |= positiveWindow;
|
||||
word |= localParameterHandler.getValue(pdecconfigdefs::paramkeys::POSITIVE_WINDOW,
|
||||
pdecconfigdefs::defaultvalue::positiveWindow);
|
||||
*(memoryBaseAddress + FRAME_HEADER_OFFSET) = word;
|
||||
}
|
||||
|
||||
void PdecConfig::writeFrameHeaderSecondOctet() {
|
||||
uint8_t negativeWindow = localParameterHandler.getValue(pdecconfigdefs::paramkeys::NEGATIVE_WINDOW,
|
||||
pdecconfigdefs::defaultvalue::negativeWindow);
|
||||
uint32_t word = 0;
|
||||
word = 0;
|
||||
word |= (negativeWindow << 24);
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef LINUX_OBC_PDECCONFIG_H_
|
||||
#define LINUX_OBC_PDECCONFIG_H_
|
||||
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
|
||||
#include "bsp_q7s/memory/LocalParameterHandler.h"
|
||||
#include "bsp_q7s/fs/SdCardManager.h"
|
||||
@ -49,6 +49,7 @@ class PdecConfig {
|
||||
uint8_t getNegativeWindow();
|
||||
|
||||
private:
|
||||
|
||||
// TC transfer frame configuration parameters
|
||||
static const uint8_t VERSION_ID = 0;
|
||||
// BD Frames
|
||||
@ -95,13 +96,6 @@ class PdecConfig {
|
||||
bool enableTcAbortIrq = 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 writeFrameHeaderSecondOctet();
|
||||
void writeMapConfig();
|
||||
|
20
linux/ipcore/pdecconfigdefs.h
Normal file
20
linux/ipcore/pdecconfigdefs.h
Normal 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
2
tmtc
@ -1 +1 @@
|
||||
Subproject commit a3a3aaa8836b425c923eb97e49ed29b452377bf6
|
||||
Subproject commit 8d036bcd4fed1211ad5b15ddae7b42e61e22fcfd
|
Loading…
Reference in New Issue
Block a user