size_t changes

This commit is contained in:
Robin Müller 2020-11-03 17:08:40 +01:00
parent d424d85f6d
commit 30947d3901

View File

@ -49,7 +49,7 @@ public:
} }
ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size, ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
Endianness streamEndianness) { Endianness streamEndianness) {
ReturnValue_t result = SerializeAdapter::deSerialize(&apid, ReturnValue_t result = SerializeAdapter::deSerialize(&apid,
buffer, size, streamEndianness); buffer, size, streamEndianness);
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != HasReturnvaluesIF::RETURN_OK) {
@ -139,8 +139,9 @@ public:
static bool isOlderThan(const TmPacketInformation* packet, const timeval* cmpTime){ static bool isOlderThan(const TmPacketInformation* packet, const timeval* cmpTime){
if(packet->isValid()){ if(packet->isValid()){
timeval packetTime = {0,0}; timeval packetTime = {0,0};
uint32_t foundlen = 0; size_t foundlen = 0;
CCSDSTime::convertFromCcsds(&packetTime,&packet->rawTimestamp[0],&foundlen,sizeof(rawTimestamp)); CCSDSTime::convertFromCcsds(&packetTime,&packet->rawTimestamp[0],
&foundlen,sizeof(rawTimestamp));
if(packetTime <= *cmpTime){ if(packetTime <= *cmpTime){
return true; return true;
} }
@ -151,8 +152,9 @@ public:
static bool isNewerThan(const TmPacketInformation* packet, const timeval* cmpTime){ static bool isNewerThan(const TmPacketInformation* packet, const timeval* cmpTime){
if(packet->isValid()){ if(packet->isValid()){
timeval packetTime = {0,0}; timeval packetTime = {0,0};
uint32_t foundlen = 0; size_t foundlen = 0;
CCSDSTime::convertFromCcsds(&packetTime,&packet->rawTimestamp[0],&foundlen,sizeof(rawTimestamp)); CCSDSTime::convertFromCcsds(&packetTime,&packet->rawTimestamp[0],
&foundlen,sizeof(rawTimestamp));
if(packetTime >= *cmpTime){ if(packetTime >= *cmpTime){
return true; return true;
} }
@ -204,8 +206,9 @@ public:
timeval getTime() const { timeval getTime() const {
timeval packetTime = {0,0}; timeval packetTime = {0,0};
uint32_t foundlen = 0; size_t foundlen = 0;
CCSDSTime::convertFromCcsds(&packetTime,&this->rawTimestamp[0],&foundlen,sizeof(rawTimestamp)); CCSDSTime::convertFromCcsds(&packetTime, &this->rawTimestamp[0],
&foundlen, sizeof(rawTimestamp));
return packetTime; return packetTime;
} }
@ -258,7 +261,7 @@ public:
}; };
ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size, ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
Endianness streamEndianness) { Endianness streamEndianness) {
ReturnValue_t result = SerializeAdapter::deSerialize(&apid, buffer, ReturnValue_t result = SerializeAdapter::deSerialize(&apid, buffer,
size, streamEndianness); size, streamEndianness);
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != HasReturnvaluesIF::RETURN_OK) {