replaced serializeIF serialize sizes with size_t

This commit is contained in:
Robin Müller 2020-04-05 17:58:39 +02:00
parent 06ae64d59c
commit 7079c9c56d
48 changed files with 118 additions and 109 deletions

View File

@ -67,7 +67,8 @@ void ActionHelper::prepareExecution(MessageQueueId_t commandedBy, ActionId_t act
}
}
ReturnValue_t ActionHelper::reportData(MessageQueueId_t reportTo, ActionId_t replyId, SerializeIF* data, bool hideSender) {
ReturnValue_t ActionHelper::reportData(MessageQueueId_t reportTo,
ActionId_t replyId, SerializeIF* data, bool hideSender) {
CommandMessage reply;
store_address_t storeAddress;
uint8_t *dataPtr;
@ -76,7 +77,7 @@ ReturnValue_t ActionHelper::reportData(MessageQueueId_t reportTo, ActionId_t rep
//No error, there's simply nothing to report.
return HasReturnvaluesIF::RETURN_OK;
}
uint32_t size = 0;
size_t size = 0;
ReturnValue_t result = ipcStore->getFreeElement(&storeAddress, maxSize,
&dataPtr);
if (result != HasReturnvaluesIF::RETURN_OK) {

View File

@ -26,7 +26,7 @@ ReturnValue_t CommandActionHelper::commandAction(object_id_t commandTo,
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
uint32_t size = 0;
size_t size = 0;
result = data->serialize(&storePointer, &size, maxSize, true);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;

View File

@ -173,8 +173,8 @@ public:
}
}
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 {
ReturnValue_t result = SerializeAdapter<uint32_t>::serialize(&this->_size,
buffer, size, max_size, bigEndian);
uint32_t i = 0;

View File

@ -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);

View File

@ -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,

View File

@ -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;

View File

@ -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,

View File

@ -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;

View File

@ -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);
}

View File

@ -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

View File

@ -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.

View File

@ -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;

View File

@ -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;
};

View File

@ -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);
}

View File

@ -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++) {

View File

@ -12,7 +12,7 @@ DeviceTmReportingWrapper::~DeviceTmReportingWrapper() {
}
ReturnValue_t DeviceTmReportingWrapper::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 = SerializeAdapter<object_id_t>::serialize(&objectId,
buffer, size, max_size, bigEndian);
if (result != HasReturnvaluesIF::RETURN_OK) {

View File

@ -11,8 +11,8 @@ public:
SerializeIF *data);
virtual ~DeviceTmReportingWrapper();
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;

View File

@ -11,8 +11,8 @@ class EventRangeMatcherBase: public SerializeableMatcherIF<EventMessage*> {
public:
EventRangeMatcherBase(T from, T till, bool inverted) : rangeMatcher(from, till, inverted) { }
virtual ~EventRangeMatcherBase() { }
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 {
return rangeMatcher.serialize(buffer, size, max_size, bigEndian);
}
uint32_t getSerializedSize() const {

View File

@ -59,8 +59,8 @@ uint8_t Type::getSize() const {
}
}
ReturnValue_t Type::serialize(uint8_t** buffer, uint32_t* size,
const uint32_t max_size, bool bigEndian) const {
ReturnValue_t Type::serialize(uint8_t** buffer, size_t* size,
const size_t max_size, bool bigEndian) const {
uint8_t ptc;
uint8_t pfc;
ReturnValue_t result = getPtcPfc(&ptc, &pfc);

View File

@ -39,8 +39,8 @@ public:
static ActualType_t getActualType(uint8_t ptc, uint8_t pfc);
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;

View File

@ -45,8 +45,8 @@ public:
return matchSubtree(iter, number);
}
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 {
iterator iter = this->begin();
uint8_t count = this->countRight(iter);
ReturnValue_t result = SerializeAdapter<uint8_t>::serialize(&count,

View File

@ -27,8 +27,8 @@ public:
}
}
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 {
ReturnValue_t result = SerializeAdapter<T>::serialize(&lowerBound, buffer, size, max_size, bigEndian);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;

View File

@ -65,7 +65,7 @@ bool HealthTable::hasHealth(object_id_t object) {
void HealthTable::printAll(uint8_t* pointer, uint32_t maxSize) {
mutex->lockMutex(MutexIF::NO_TIMEOUT);
uint32_t size = 0;
size_t size = 0;
uint16_t count = healthMap.size();
ReturnValue_t result = SerializeAdapter<uint16_t>::serialize(&count,
&pointer, &size, maxSize, true);

View File

@ -26,7 +26,7 @@ ReturnValue_t LimitViolationReporter::sendLimitViolationReport(const SerializeIF
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
uint32_t size = 0;
size_t size = 0;
result = data->serialize(&dataTarget, &size, maxSize, true);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;

View File

@ -94,7 +94,7 @@ ReturnValue_t ParameterHelper::sendParameter(MessageQueueId_t to, uint32_t id,
return result;
}
uint32_t storeElementSize = 0;
size_t storeElementSize = 0;
result = description->serialize(&storeElement, &storeElementSize,
serializedSize, true);

View File

@ -20,8 +20,8 @@ ParameterWrapper::ParameterWrapper(Type type, uint8_t rows, uint8_t columns,
ParameterWrapper::~ParameterWrapper() {
}
ReturnValue_t ParameterWrapper::serialize(uint8_t** buffer, uint32_t* size,
const uint32_t max_size, bool bigEndian) const {
ReturnValue_t ParameterWrapper::serialize(uint8_t** buffer, size_t* size,
const size_t max_size, bool bigEndian) const {
ReturnValue_t result;
result = SerializeAdapter<Type>::serialize(&type, buffer, size, max_size,
@ -88,8 +88,8 @@ uint32_t ParameterWrapper::getSerializedSize() const {
}
template<typename T>
ReturnValue_t ParameterWrapper::serializeData(uint8_t** buffer, uint32_t* size,
const uint32_t max_size, bool bigEndian) const {
ReturnValue_t ParameterWrapper::serializeData(uint8_t** buffer, size_t* size,
const size_t max_size, bool bigEndian) const {
const T *element = (const T*) readonlyData;
ReturnValue_t result;
uint16_t dataSize = columns * rows;

View File

@ -25,8 +25,8 @@ public:
const void *data);
virtual ~ParameterWrapper();
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;
@ -128,8 +128,8 @@ private:
const void *readonlyData;
template<typename T>
ReturnValue_t serializeData(uint8_t** buffer, uint32_t* size,
const uint32_t max_size, bool bigEndian) const;
ReturnValue_t serializeData(uint8_t** buffer, size_t* size,
const size_t max_size, bool bigEndian) const;
template<typename T>
ReturnValue_t deSerializeData(uint8_t startingRow, uint8_t startingColumn,

View File

@ -86,8 +86,8 @@ ReturnValue_t Fuse::check() {
return result;
}
ReturnValue_t Fuse::serialize(uint8_t** buffer, uint32_t* size,
const uint32_t max_size, bool bigEndian) const {
ReturnValue_t Fuse::serialize(uint8_t** buffer, size_t* size,
const size_t max_size, bool bigEndian) const {
ReturnValue_t result = RETURN_FAILED;
for (DeviceList::const_iterator iter = devices.begin();
iter != devices.end(); iter++) {

View File

@ -49,8 +49,8 @@ public:
uint8_t getFuseId() const;
ReturnValue_t initialize();
DeviceList devices;
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;
ReturnValue_t deSerialize(const uint8_t** buffer, int32_t* size,
bool bigEndian);

View File

@ -17,8 +17,8 @@ PowerComponent::PowerComponent(object_id_t setId, uint8_t moduleId, float min, f
twoSwitches), min(min), max(max), moduleId(moduleId) {
}
ReturnValue_t PowerComponent::serialize(uint8_t** buffer, uint32_t* size,
const uint32_t max_size, bool bigEndian) const {
ReturnValue_t PowerComponent::serialize(uint8_t** buffer, size_t* size,
const size_t max_size, bool bigEndian) const {
ReturnValue_t result = SerializeAdapter<float>::serialize(&min, buffer,
size, max_size, bigEndian);
if (result != HasReturnvaluesIF::RETURN_OK) {

View File

@ -19,8 +19,8 @@ public:
float getMin();
float getMax();
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;

View File

@ -21,13 +21,14 @@ public:
SerialArrayListAdapter(ArrayList<T, count_t> *adaptee) : adaptee(adaptee) {
}
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 serialize(adaptee, buffer, size, max_size, bigEndian);
}
static ReturnValue_t serialize(const ArrayList<T, count_t>* list, uint8_t** buffer, uint32_t* size,
const uint32_t max_size, bool bigEndian) {
static ReturnValue_t serialize(const ArrayList<T, count_t>* list,
uint8_t** buffer, size_t* size, const size_t max_size,
bool bigEndian) {
// Serialize length field first
ReturnValue_t result = SerializeAdapter<count_t>::serialize(&list->size,
buffer, size, max_size, bigEndian);

View File

@ -26,8 +26,8 @@ SerialBufferAdapter<count_t>::~SerialBufferAdapter() {
}
template<typename count_t>
ReturnValue_t SerialBufferAdapter<count_t>::serialize(uint8_t** buffer, uint32_t* size,
const uint32_t max_size, bool bigEndian) const {
ReturnValue_t SerialBufferAdapter<count_t>::serialize(uint8_t** buffer, size_t* size,
const size_t max_size, bool bigEndian) const {
uint32_t serializedLength = m_buffer_length;
if (m_serialize_length) {
serializedLength += AutoSerializeAdapter::getSerializedSize(

View File

@ -40,8 +40,8 @@ public:
virtual ~SerialBufferAdapter();
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;

View File

@ -32,8 +32,8 @@ public:
SerialFixedArrayListAdapter(Args... args) : FixedArrayList<BUFFER_TYPE, MAX_SIZE, count_t>(std::forward<Args>(args)...) {
}
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 {
return SerialArrayListAdapter<BUFFER_TYPE, count_t>::serialize(this, buffer, size, max_size, bigEndian);
}

View File

@ -63,8 +63,8 @@ public:
* @param bigEndian Specify endianness
* @return
*/
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 {
if (printCount) {
count_t mySize = SinglyLinkedList<T>::getSize();
ReturnValue_t result = SerializeAdapter<count_t>::serialize(&mySize,
@ -78,7 +78,7 @@ public:
}
static ReturnValue_t serialize(const LinkedElement<T>* element,
uint8_t** buffer, uint32_t* size, const uint32_t max_size,
uint8_t** buffer, size_t* size, const size_t max_size,
bool bigEndian) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
while ((result == HasReturnvaluesIF::RETURN_OK) && (element != NULL)) {

View File

@ -59,8 +59,8 @@ template<typename T, int>
class SerializeAdapter_ {
public:
static ReturnValue_t serialize(const T* object, uint8_t** buffer,
uint32_t* size, const uint32_t max_size, bool bigEndian) {
uint32_t ignoredSize = 0;
size_t* size, const size_t max_size, bool bigEndian) {
size_t ignoredSize = 0;
if (size == NULL) {
size = &ignoredSize;
}
@ -115,9 +115,9 @@ public:
template<typename T>
class SerializeAdapter_<T, 1> {
public:
ReturnValue_t serialize(const T* object, uint8_t** buffer, uint32_t* size,
const uint32_t max_size, bool bigEndian) const {
uint32_t ignoredSize = 0;
ReturnValue_t serialize(const T* object, uint8_t** buffer, size_t* size,
const size_t max_size, bool bigEndian) const {
size_t ignoredSize = 0;
if (size == NULL) {
size = &ignoredSize;
}
@ -137,7 +137,7 @@ template<typename T>
class SerializeAdapter {
public:
static ReturnValue_t serialize(const T* object, uint8_t** buffer,
uint32_t* size, const uint32_t max_size, bool bigEndian) {
size_t* size, const size_t max_size, bool bigEndian) {
SerializeAdapter_<T, IsDerivedFrom<T, SerializeIF>::Is> adapter;
return adapter.serialize(object, buffer, size, max_size, bigEndian);
}
@ -158,7 +158,7 @@ class AutoSerializeAdapter {
public:
template<typename T>
static ReturnValue_t serialize(const T* object, uint8_t** buffer,
uint32_t* size, const uint32_t max_size, bool bigEndian) {
size_t* size, const size_t max_size, bool bigEndian) {
SerializeAdapter_<T, IsDerivedFrom<T, SerializeIF>::Is> adapter;
return adapter.serialize(object, buffer, size, max_size, bigEndian);
}

View File

@ -29,9 +29,11 @@ public:
}
SerializeElement() : LinkedElement<SerializeIF>(this) {
}
T entry;
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 {
return SerializeAdapter<T>::serialize(&entry, buffer, size, max_size, bigEndian);
}

View File

@ -2,6 +2,7 @@
#define SERIALIZEIF_H_
#include <framework/returnvalues/HasReturnvaluesIF.h>
#include <cstddef>
/**
* @defgroup serialize Serialization
@ -36,8 +37,8 @@ public:
virtual ~SerializeIF() {
}
virtual ReturnValue_t serialize(uint8_t** buffer, uint32_t* size,
const uint32_t max_size, bool bigEndian) const = 0;
virtual ReturnValue_t serialize(uint8_t** buffer, size_t* size,
const size_t max_size, bool bigEndian) const = 0;
virtual uint32_t getSerializedSize() const = 0;

View File

@ -607,7 +607,7 @@ void Subsystem::sendSerializablesAsCommandMessage(Command_t command,
}
uint8_t *storeBuffer;
store_address_t address;
uint32_t size = 0;
size_t size = 0;
result = IPCStore->getFreeElement(&address, maxSize, &storeBuffer);
if (result != HasReturnvaluesIF::RETURN_OK) {

View File

@ -18,8 +18,8 @@ public:
uint8_t value3;
uint8_t value4;
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 {
ReturnValue_t result;

View File

@ -32,8 +32,8 @@ public:
}
uint16_t apid;
uint16_t ssc;
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 {
ReturnValue_t result = SerializeAdapter<uint16_t>::serialize(&apid,
buffer, size, max_size, bigEndian);
if (result != HasReturnvaluesIF::RETURN_OK) {
@ -218,8 +218,8 @@ public:
}
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 {
ReturnValue_t result = AutoSerializeAdapter::serialize(&apid,buffer,size,max_size,bigEndian);
if(result!=HasReturnvaluesIF::RETURN_OK){
return result;

View File

@ -22,9 +22,10 @@ public:
return false;
}
}
ReturnValue_t serialize(uint8_t** buffer, uint32_t* size,
const uint32_t max_size, bool bigEndian) const {
return SerializeAdapter<uint16_t>::serialize(&apid, buffer, size, max_size, bigEndian);
ReturnValue_t serialize(uint8_t** buffer, size_t* size,
const size_t max_size, bool bigEndian) const {
return SerializeAdapter<uint16_t>::serialize(&apid, buffer,
size, max_size, bigEndian);
}
uint32_t getSerializedSize() const {
return SerializeAdapter<uint16_t>::getSerializedSize(&apid);

View File

@ -22,9 +22,10 @@ public:
return false;
}
}
ReturnValue_t serialize(uint8_t** buffer, uint32_t* size,
const uint32_t max_size, bool bigEndian) const {
return SerializeAdapter<uint8_t>::serialize(&service, buffer, size, max_size, bigEndian);
ReturnValue_t serialize(uint8_t** buffer, size_t* size,
const size_t max_size, bool bigEndian) const {
return SerializeAdapter<uint8_t>::serialize(&service, buffer,
size, max_size, bigEndian);
}
uint32_t getSerializedSize() const {
return SerializeAdapter<uint8_t>::getSerializedSize(&service);

View File

@ -20,9 +20,10 @@ public:
return false;
}
}
ReturnValue_t serialize(uint8_t** buffer, uint32_t* size,
const uint32_t max_size, bool bigEndian) const {
return SerializeAdapter<uint8_t>::serialize(&subService, buffer, size, max_size, bigEndian);
ReturnValue_t serialize(uint8_t** buffer, size_t* size,
const size_t max_size, bool bigEndian) const {
return SerializeAdapter<uint8_t>::serialize(&subService, buffer, size,
max_size, bigEndian);
}
uint32_t getSerializedSize() const {
return SerializeAdapter<uint8_t>::getSerializedSize(&subService);

View File

@ -58,7 +58,7 @@ TmPacketStored::TmPacketStored(uint16_t apid, uint8_t service,
setData(p_data);
initializeTmPacket(apid, service, subservice, packetSubcounter);
uint8_t* putDataHere = getSourceData();
uint32_t size = 0;
size_t size = 0;
if (header != NULL) {
header->serialize(&putDataHere, &size, sourceDataSize, true);
}

View File

@ -235,7 +235,7 @@ void CommandingServiceBase::sendTmPacket(uint8_t subservice,
object_id_t objectId, const uint8_t *data, size_t dataLen) {
uint8_t buffer[sizeof(object_id_t)];
uint8_t* pBuffer = buffer;
uint32_t size = 0;
size_t size = 0;
SerializeAdapter<object_id_t>::serialize(&objectId, &pBuffer, &size,
sizeof(object_id_t), true);
TmPacketStored tmPacketStored(this->apid, this->service, subservice,

View File

@ -49,7 +49,7 @@ class PusSuccessReport {
private:
static const uint16_t MAX_SIZE = 7;
uint8_t reportBuffer[MAX_SIZE];
uint32_t reportSize;
size_t reportSize;
uint8_t * pBuffer;
public:
PusSuccessReport(uint16_t setPacketId, uint16_t setSequenceControl,
@ -63,7 +63,7 @@ class PusFailureReport {
private:
static const uint16_t MAX_SIZE = 16;
uint8_t reportBuffer[MAX_SIZE];
uint32_t reportSize;
size_t reportSize;
uint8_t * pBuffer;
public:
PusFailureReport(uint16_t setPacketId, uint16_t setSequenceControl,