Compare commits

...

1 Commits

Author SHA1 Message Date
a508a02120 Branch on top of the V0.0.1 release tag. Changes made to TimeStamper,
TmPacketBase and TmPacketMinimal to suit ESBO protocol
2022-01-17 15:52:49 +01:00
5 changed files with 8 additions and 8 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

@ -100,7 +100,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;

View File

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

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);