Modification to fsfw for ESBO TMTC interface: removal of subcounter from data field header in tmPacketBase and TmPacketMinimal,

changes to the maximum tm packet size in the tmPacketBase. Changed Time Stamp size to 6 bytes.
This commit is contained in:
taheran 2021-06-01 16:58:14 +02:00
parent 2f511523cb
commit 26d6b32ef6
5 changed files with 10 additions and 11 deletions

View File

@ -17,7 +17,7 @@ public:
//! This is a mission-specific constant and determines the total
//! size reserved for timestamps.
//! TODO: Default define in FSFWConfig ?
static const uint8_t MISSION_TIMESTAMP_SIZE = 8;
static const uint8_t MISSION_TIMESTAMP_SIZE = 6;
virtual ReturnValue_t addTimeStamp(uint8_t* buffer,
const uint8_t maxSize) = 0;
virtual ~TimeStamperIF() {}

View File

@ -104,7 +104,7 @@ void TmPacketBase::initializeTmPacket(uint16_t apid, uint8_t service,
tmData->data_field.version_type_ack = 0b00010000;
tmData->data_field.service_type = service;
tmData->data_field.service_subtype = subservice;
tmData->data_field.subcounter = packetSubcounter;
//tmData->data_field.subcounter = packetSubcounter;
//Timestamp packet
if (checkAndSetStamper()) {
timeStamper->addTimeStamp(tmData->data_field.time,

View File

@ -21,7 +21,7 @@ struct PUSTmDataFieldHeader {
uint8_t version_type_ack;
uint8_t service_type;
uint8_t service_subtype;
uint8_t subcounter;
// uint8_t subcounter;
// uint8_t destination;
uint8_t time[TimeStamperIF::MISSION_TIMESTAMP_SIZE];
};
@ -58,7 +58,7 @@ public:
sizeof(PUSTmDataFieldHeader) + 2);
//! Maximum size of a TM Packet in this mission.
//! TODO: Make this dependant on a config variable.
static const uint32_t MISSION_TM_PACKET_MAX_SIZE = 2048;
static const uint32_t MISSION_TM_PACKET_MAX_SIZE = 1024;
//! First byte of secondary header for PUS-A packets.
//! TODO: Maybe also support PUS-C via config?
static const uint8_t VERSION_NUMBER_BYTE_PUS_A = 0b00010000;
@ -165,8 +165,7 @@ protected:
* @param subservice PUS Subservice
* @param packetSubcounter Additional subcounter used.
*/
void initializeTmPacket(uint16_t apid, uint8_t service, uint8_t subservice,
uint8_t packetSubcounter);
void initializeTmPacket(uint16_t apid, uint8_t service, uint8_t subservice, uint8_t packetSubcounter);
/**
* With this method, the packet data pointer can be redirected to another

View File

@ -18,9 +18,9 @@ uint8_t TmPacketMinimal::getSubService() {
return tm_data->data_field.service_subtype;
}
uint8_t TmPacketMinimal::getPacketSubcounter() {
/*uint8_t TmPacketMinimal::getPacketSubcounter() {
return tm_data->data_field.subcounter;
}
}*/
ReturnValue_t TmPacketMinimal::getPacketTime(timeval* timestamp) {
if (timestampInterpreter == NULL) {

View File

@ -42,12 +42,12 @@ public:
* Returns the subcounter.
* @return the subcounter of the Data Field Header.
*/
uint8_t getPacketSubcounter();
// uint8_t getPacketSubcounter();
struct PUSTmMinimalHeader {
uint8_t version_type_ack;
uint8_t service_type;
uint8_t service_subtype;
uint8_t subcounter;
// uint8_t subcounter;
};
ReturnValue_t getPacketTime(timeval* timestamp);