include replacements
This commit is contained in:
@ -1,45 +1,45 @@
|
||||
#include <framework/tmtcpacket/pus/TmPacketMinimal.h>
|
||||
#include <stddef.h>
|
||||
#include <time.h>
|
||||
#include <framework/tmtcpacket/pus/PacketTimestampInterpreterIF.h>
|
||||
|
||||
TmPacketMinimal::TmPacketMinimal(const uint8_t* set_data) : SpacePacketBase( set_data ) {
|
||||
this->tm_data = (TmPacketMinimalPointer*)set_data;
|
||||
}
|
||||
|
||||
TmPacketMinimal::~TmPacketMinimal() {
|
||||
}
|
||||
|
||||
uint8_t TmPacketMinimal::getService() {
|
||||
return tm_data->data_field.service_type;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
return timestampInterpreter->getPacketTime(this, timestamp);
|
||||
}
|
||||
|
||||
ReturnValue_t TmPacketMinimal::getPacketTimeRaw(const uint8_t** timePtr, uint32_t* size) {
|
||||
if (timestampInterpreter == NULL) {
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
return timestampInterpreter->getPacketTimeRaw(this, timePtr, size);
|
||||
}
|
||||
|
||||
void TmPacketMinimal::setInterpretTimestampObject(PacketTimestampInterpreterIF* interpreter) {
|
||||
if (TmPacketMinimal::timestampInterpreter == NULL) {
|
||||
TmPacketMinimal::timestampInterpreter = interpreter;
|
||||
}
|
||||
}
|
||||
|
||||
PacketTimestampInterpreterIF* TmPacketMinimal::timestampInterpreter = NULL;
|
||||
#include "../../tmtcpacket/pus/TmPacketMinimal.h"
|
||||
#include <stddef.h>
|
||||
#include <time.h>
|
||||
#include "../../tmtcpacket/pus/PacketTimestampInterpreterIF.h"
|
||||
|
||||
TmPacketMinimal::TmPacketMinimal(const uint8_t* set_data) : SpacePacketBase( set_data ) {
|
||||
this->tm_data = (TmPacketMinimalPointer*)set_data;
|
||||
}
|
||||
|
||||
TmPacketMinimal::~TmPacketMinimal() {
|
||||
}
|
||||
|
||||
uint8_t TmPacketMinimal::getService() {
|
||||
return tm_data->data_field.service_type;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
return timestampInterpreter->getPacketTime(this, timestamp);
|
||||
}
|
||||
|
||||
ReturnValue_t TmPacketMinimal::getPacketTimeRaw(const uint8_t** timePtr, uint32_t* size) {
|
||||
if (timestampInterpreter == NULL) {
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
return timestampInterpreter->getPacketTimeRaw(this, timePtr, size);
|
||||
}
|
||||
|
||||
void TmPacketMinimal::setInterpretTimestampObject(PacketTimestampInterpreterIF* interpreter) {
|
||||
if (TmPacketMinimal::timestampInterpreter == NULL) {
|
||||
TmPacketMinimal::timestampInterpreter = interpreter;
|
||||
}
|
||||
}
|
||||
|
||||
PacketTimestampInterpreterIF* TmPacketMinimal::timestampInterpreter = NULL;
|
||||
|
Reference in New Issue
Block a user