Merge branch 'mueller/expand-serialize-if' into mueller/refactor-tmtc-stack
This commit is contained in:
commit
c9d37e8d62
@ -90,6 +90,32 @@ class SerializeIF {
|
||||
*/
|
||||
virtual ReturnValue_t deSerialize(const uint8_t **buffer, size_t *size,
|
||||
Endianness streamEndianness) = 0;
|
||||
|
||||
/**
|
||||
* Helper method which can be used if serialization should be performed without any additional
|
||||
* pointer arithmetic on a passed buffer pointer
|
||||
* @param buffer
|
||||
* @param maxSize
|
||||
* @param streamEndianness
|
||||
* @return
|
||||
*/
|
||||
virtual ReturnValue_t serialize(uint8_t* buffer, size_t maxSize, Endianness streamEndianness) {
|
||||
size_t tmpSize = 0;
|
||||
return serialize(&buffer, &tmpSize, maxSize, streamEndianness);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper methods which can be used if deserialization should be performed without any additional
|
||||
* pointer arithmetic on a passed buffer pointer
|
||||
* @param buffer
|
||||
* @param maxSize
|
||||
* @param streamEndianness
|
||||
* @return
|
||||
*/
|
||||
virtual ReturnValue_t deSerialize(const uint8_t* buffer, size_t maxSize,
|
||||
Endianness streamEndianness) {
|
||||
return deSerialize(&buffer, &maxSize, streamEndianness);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* FSFW_SERIALIZE_SERIALIZEIF_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user