replaced serializeIF serialize sizes with size_t
This commit is contained in:
@ -272,7 +272,7 @@ ReturnValue_t DataPoolAdmin::sendParameter(MessageQueueId_t to, uint32_t id,
|
||||
return result;
|
||||
}
|
||||
|
||||
uint32_t storeElementSize = 0;
|
||||
size_t storeElementSize = 0;
|
||||
|
||||
result = wrapper->serialize(&storeElement, &storeElementSize,
|
||||
serializedSize, true);
|
||||
|
@ -36,7 +36,7 @@ ReturnValue_t DataPoolParameterWrapper::set(uint8_t domainId,
|
||||
}
|
||||
|
||||
ReturnValue_t DataPoolParameterWrapper::serialize(uint8_t** buffer,
|
||||
uint32_t* size, const uint32_t max_size, bool bigEndian) const {
|
||||
size_t* size, const size_t max_size, bool bigEndian) const {
|
||||
ReturnValue_t result;
|
||||
|
||||
result = SerializeAdapter<Type>::serialize(&type, buffer, size, max_size,
|
||||
|
@ -11,8 +11,8 @@ public:
|
||||
|
||||
ReturnValue_t set(uint8_t domainId, uint16_t parameterId);
|
||||
|
||||
virtual ReturnValue_t serialize(uint8_t** buffer, uint32_t* size,
|
||||
const uint32_t max_size, bool bigEndian) const;
|
||||
virtual ReturnValue_t serialize(uint8_t** buffer, size_t* size,
|
||||
const size_t max_size, bool bigEndian) const;
|
||||
|
||||
virtual uint32_t getSerializedSize() const;
|
||||
|
||||
|
@ -106,8 +106,8 @@ uint8_t DataSet::lockDataPool() {
|
||||
return ::dataPool.lockDataPool();
|
||||
}
|
||||
|
||||
ReturnValue_t DataSet::serialize(uint8_t** buffer, uint32_t* size,
|
||||
const uint32_t max_size, bool bigEndian) const {
|
||||
ReturnValue_t DataSet::serialize(uint8_t** buffer, size_t* size,
|
||||
const size_t max_size, bool bigEndian) const {
|
||||
ReturnValue_t result = RETURN_FAILED;
|
||||
for (uint16_t count = 0; count < fill_count; count++) {
|
||||
result = registeredVariables[count]->serialize(buffer, size, max_size,
|
||||
|
@ -121,8 +121,8 @@ public:
|
||||
* @param bigEndian
|
||||
* @return
|
||||
*/
|
||||
ReturnValue_t serialize(uint8_t** buffer, uint32_t* size,
|
||||
const uint32_t max_size, bool bigEndian) const;
|
||||
ReturnValue_t serialize(uint8_t** buffer, size_t* size,
|
||||
const size_t max_size, bool bigEndian) const;
|
||||
|
||||
uint32_t getSerializedSize() const;
|
||||
|
||||
|
@ -126,8 +126,8 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
virtual ReturnValue_t serialize(uint8_t** buffer, uint32_t* size,
|
||||
const uint32_t max_size, bool bigEndian) const {
|
||||
virtual ReturnValue_t serialize(uint8_t** buffer, size_t* size,
|
||||
const size_t max_size, bool bigEndian) const {
|
||||
return SerializeAdapter<T>::serialize(&value, buffer, size, max_size,
|
||||
bigEndian);
|
||||
}
|
||||
|
@ -111,8 +111,8 @@ ReturnValue_t PoolRawAccess::getEntryEndianSafe(uint8_t* buffer,
|
||||
}
|
||||
|
||||
|
||||
ReturnValue_t PoolRawAccess::serialize(uint8_t** buffer, uint32_t* size,
|
||||
const uint32_t max_size, bool bigEndian) const {
|
||||
ReturnValue_t PoolRawAccess::serialize(uint8_t** buffer, size_t* size,
|
||||
const size_t max_size, bool bigEndian) const {
|
||||
if (typeSize + *size <= max_size) {
|
||||
if (bigEndian) {
|
||||
#ifndef BYTE_ORDER_SYSTEM
|
||||
|
@ -81,8 +81,8 @@ public:
|
||||
* @return - @c RETURN_OK if serialization was successfull
|
||||
* - @c SerializeIF::BUFFER_TOO_SHORT if range check failed
|
||||
*/
|
||||
ReturnValue_t serialize(uint8_t** buffer, uint32_t* size,
|
||||
const uint32_t max_size, bool bigEndian) const;
|
||||
ReturnValue_t serialize(uint8_t** buffer, size_t* size,
|
||||
const size_t max_size, bool bigEndian) const;
|
||||
|
||||
/**
|
||||
* With this method, the content can be set from a big endian buffer safely.
|
||||
|
@ -14,14 +14,15 @@
|
||||
PoolRawAccessHelper::PoolRawAccessHelper(uint32_t * poolIdBuffer_,
|
||||
uint8_t numberOfParameters_):
|
||||
poolIdBuffer(reinterpret_cast<uint8_t * >(poolIdBuffer_)),
|
||||
numberOfParameters(numberOfParameters_), validBufferIndex(0), validBufferIndexBit(1){
|
||||
numberOfParameters(numberOfParameters_), validBufferIndex(0),
|
||||
validBufferIndexBit(1) {
|
||||
}
|
||||
|
||||
PoolRawAccessHelper::~PoolRawAccessHelper() {
|
||||
}
|
||||
|
||||
ReturnValue_t PoolRawAccessHelper::serialize(uint8_t **buffer, uint32_t *size,
|
||||
const uint32_t max_size, bool bigEndian) {
|
||||
ReturnValue_t PoolRawAccessHelper::serialize(uint8_t **buffer, size_t *size,
|
||||
const size_t max_size, bool bigEndian) {
|
||||
SerializationArgs serializationArgs = {buffer, size, max_size, bigEndian};
|
||||
ReturnValue_t result;
|
||||
int32_t remainingParametersSize = numberOfParameters * 4;
|
||||
@ -39,8 +40,8 @@ ReturnValue_t PoolRawAccessHelper::serialize(uint8_t **buffer, uint32_t *size,
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t PoolRawAccessHelper::serializeWithValidityMask(uint8_t ** buffer, uint32_t * size,
|
||||
const uint32_t max_size, bool bigEndian) {
|
||||
ReturnValue_t PoolRawAccessHelper::serializeWithValidityMask(uint8_t ** buffer,
|
||||
size_t * size, const size_t max_size, bool bigEndian) {
|
||||
ReturnValue_t result;
|
||||
SerializationArgs argStruct = {buffer, size, max_size, bigEndian};
|
||||
int32_t remainingParametersSize = numberOfParameters * 4;
|
||||
|
@ -41,8 +41,8 @@ public:
|
||||
* @return @c RETURN_OK On success
|
||||
* @c RETURN_FAILED on failure
|
||||
*/
|
||||
ReturnValue_t serialize(uint8_t ** buffer, uint32_t * size,
|
||||
const uint32_t max_size, bool bigEndian);
|
||||
ReturnValue_t serialize(uint8_t ** buffer, size_t * size,
|
||||
const size_t max_size, bool bigEndian);
|
||||
|
||||
/**
|
||||
* Serializes data pool entries into provided buffer with the validity mask buffer
|
||||
@ -54,8 +54,8 @@ public:
|
||||
* @return @c RETURN_OK On success
|
||||
* @c RETURN_FAILED on failure
|
||||
*/
|
||||
ReturnValue_t serializeWithValidityMask(uint8_t ** buffer, uint32_t * size,
|
||||
const uint32_t max_size, bool bigEndian);
|
||||
ReturnValue_t serializeWithValidityMask(uint8_t ** buffer, size_t * size,
|
||||
const size_t max_size, bool bigEndian);
|
||||
|
||||
|
||||
private:
|
||||
@ -68,7 +68,7 @@ private:
|
||||
|
||||
struct SerializationArgs {
|
||||
uint8_t ** buffer;
|
||||
uint32_t * size;
|
||||
size_t * size;
|
||||
const uint32_t max_size;
|
||||
bool bigEndian;
|
||||
};
|
||||
|
@ -193,8 +193,8 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
virtual ReturnValue_t serialize(uint8_t** buffer, uint32_t* size,
|
||||
const uint32_t max_size, bool bigEndian) const {
|
||||
virtual ReturnValue_t serialize(uint8_t** buffer, size_t* size,
|
||||
const size_t max_size, bool bigEndian) const {
|
||||
return SerializeAdapter<T>::serialize(&value, buffer, size, max_size,
|
||||
bigEndian);
|
||||
}
|
||||
|
@ -197,8 +197,8 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
virtual ReturnValue_t serialize(uint8_t** buffer, uint32_t* size,
|
||||
const uint32_t max_size, bool bigEndian) const {
|
||||
virtual ReturnValue_t serialize(uint8_t** buffer, size_t* size,
|
||||
const size_t max_size, bool bigEndian) const {
|
||||
uint16_t i;
|
||||
ReturnValue_t result;
|
||||
for (i = 0; i < vector_size; i++) {
|
||||
|
Reference in New Issue
Block a user