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 //! This is a mission-specific constant and determines the total
//! size reserved for timestamps. //! size reserved for timestamps.
//! TODO: Default define in FSFWConfig ? //! 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, virtual ReturnValue_t addTimeStamp(uint8_t* buffer,
const uint8_t maxSize) = 0; const uint8_t maxSize) = 0;
virtual ~TimeStamperIF() {} 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.version_type_ack = 0b00010000;
tmData->data_field.service_type = service; tmData->data_field.service_type = service;
tmData->data_field.service_subtype = subservice; tmData->data_field.service_subtype = subservice;
tmData->data_field.subcounter = packetSubcounter; //tmData->data_field.subcounter = packetSubcounter;
//Timestamp packet //Timestamp packet
if (checkAndSetStamper()) { if (checkAndSetStamper()) {
timeStamper->addTimeStamp(tmData->data_field.time, timeStamper->addTimeStamp(tmData->data_field.time,

View File

@ -21,7 +21,7 @@ struct PUSTmDataFieldHeader {
uint8_t version_type_ack; uint8_t version_type_ack;
uint8_t service_type; uint8_t service_type;
uint8_t service_subtype; uint8_t service_subtype;
uint8_t subcounter; // uint8_t subcounter;
// uint8_t destination; // uint8_t destination;
uint8_t time[TimeStamperIF::MISSION_TIMESTAMP_SIZE]; uint8_t time[TimeStamperIF::MISSION_TIMESTAMP_SIZE];
}; };
@ -58,7 +58,7 @@ public:
sizeof(PUSTmDataFieldHeader) + 2); sizeof(PUSTmDataFieldHeader) + 2);
//! Maximum size of a TM Packet in this mission. //! Maximum size of a TM Packet in this mission.
//! TODO: Make this dependant on a config variable. //! 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. //! First byte of secondary header for PUS-A packets.
//! TODO: Maybe also support PUS-C via config? //! TODO: Maybe also support PUS-C via config?
static const uint8_t VERSION_NUMBER_BYTE_PUS_A = 0b00010000; static const uint8_t VERSION_NUMBER_BYTE_PUS_A = 0b00010000;

View File

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

View File

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