ScexDeviceHandler
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Irini Kosmidou
2022-05-19 11:56:59 +02:00
parent b4e1451501
commit e8882b11cf
4 changed files with 113 additions and 24 deletions

View File

@ -35,6 +35,7 @@ ReturnValue_t ScexHelper::deSerialize(const uint8_t** buffer, size_t* size,
payloadLen = (**buffer << 8) | *(*buffer + 1);
*buffer += 2;
payloadStart = *buffer;
totalPacketLen = payloadLen + scex::HEADER_LEN + scex::CRC_LEN;
if (totalPacketLen >= *size) {
return STREAM_TOO_SHORT;

View File

@ -41,6 +41,7 @@ class ScexHelper : public HasReturnvaluesIF, public SerializeIF {
int packetCounter = 0;
int totalPacketCounter = 0;
uint16_t payloadLen = 0;
const uint8_t *payloadStart = 0;
size_t totalPacketLen = 0;
};