From 9382eb03e6cfb0985d78587df3f4696e52ead038 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Wed, 11 Dec 2019 22:50:08 +0100 Subject: [PATCH] function to serialize pool ID buffers into dataset created --- datapool/DataSet.cpp | 6 ++++++ datapool/DataSet.h | 11 +++++++++++ datapool/PoolRawAccess.h | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/datapool/DataSet.cpp b/datapool/DataSet.cpp index b4725c73..55d8d670 100644 --- a/datapool/DataSet.cpp +++ b/datapool/DataSet.cpp @@ -148,3 +148,9 @@ ReturnValue_t DataSet::deSerialize(const uint8_t** buffer, int32_t* size, } return result; } + +ReturnValue_t DataSet::serializeRawFromIdBuffer(uint8_t ** buffer, uint32_t * size, + const uint32_t max_size, bool bigEndian, uint32_t * poolIdBuffer, + uint32_t poolIdSize) { + return RETURN_OK; +} diff --git a/datapool/DataSet.h b/datapool/DataSet.h index 982be692..deee8ca6 100644 --- a/datapool/DataSet.h +++ b/datapool/DataSet.h @@ -146,6 +146,14 @@ public: */ void setValid(uint8_t valid); + /** + * Serialize all registered pool variables into the provided buffer + * @param buffer + * @param size Is incremented by serialized size + * @param max_size + * @param bigEndian + * @return + */ ReturnValue_t serialize(uint8_t** buffer, uint32_t* size, const uint32_t max_size, bool bigEndian) const; @@ -154,6 +162,9 @@ public: ReturnValue_t deSerialize(const uint8_t** buffer, int32_t* size, bool bigEndian); + ReturnValue_t serializeRawFromIdBuffer(uint8_t ** buffer, uint32_t * size, + const uint32_t max_size, bool bigEndian, uint32_t * poolIdBuffer, + uint32_t poolIdSize); }; #endif /* DATASET_H_ */ diff --git a/datapool/PoolRawAccess.h b/datapool/PoolRawAccess.h index 7207518c..3735868f 100644 --- a/datapool/PoolRawAccess.h +++ b/datapool/PoolRawAccess.h @@ -10,7 +10,7 @@ * @details * This is necessary to have an access method for HK data, as the PID's alone do not * provide a type information. Please note that the the raw pool access read() and commit() - * calls are not thread-safe and therefore private. + * calls are not thread-safe. * Please supply a data set and use the data set read(), commit() calls for thread-safe * data pool access. * @ingroup data_pool