replaced getSerializedSize returnvalue with size_t

This commit is contained in:
Robin Müller 2020-04-05 21:54:11 +02:00
parent 7079c9c56d
commit 87852e5f2a
40 changed files with 44 additions and 44 deletions

View File

@ -72,7 +72,7 @@ ReturnValue_t ActionHelper::reportData(MessageQueueId_t reportTo,
CommandMessage reply;
store_address_t storeAddress;
uint8_t *dataPtr;
uint32_t maxSize = data->getSerializedSize();
size_t maxSize = data->getSerializedSize();
if (maxSize == 0) {
//No error, there's simply nothing to report.
return HasReturnvaluesIF::RETURN_OK;

View File

@ -20,7 +20,7 @@ ReturnValue_t CommandActionHelper::commandAction(object_id_t commandTo,
}
store_address_t storeId;
uint8_t* storePointer;
uint32_t maxSize = data->getSerializedSize();
size_t maxSize = data->getSerializedSize();
ReturnValue_t result = ipcStore->getFreeElement(&storeId, maxSize,
&storePointer);
if (result != HasReturnvaluesIF::RETURN_OK) {

View File

@ -188,7 +188,7 @@ public:
return result;
}
virtual uint32_t getSerializedSize() const {
virtual size_t getSerializedSize() const {
uint32_t printSize = sizeof(_size);
uint32_t i = 0;

View File

@ -159,7 +159,7 @@ public:
uint32_t maxNrOfIndices = floor(static_cast<double>(size)/static_cast<double>(bytesPerBlock));
//Calculate the Size needeed for the index itself
uint32_t serializedSize = 0;
size_t serializedSize = 0;
if(additionalInfo!=NULL) {
serializedSize += additionalInfo->getSerializedSize();
}
@ -548,9 +548,9 @@ public:
* Get the serialized Size of the index
* @return The serialized size of the index
*/
uint32_t getSerializedSize() const {
size_t getSerializedSize() const {
uint32_t size = 0;
size_t size = 0;
if(additionalInfo!=NULL){
size += additionalInfo->getSerializedSize();
}

View File

@ -69,7 +69,7 @@ ReturnValue_t DataPoolParameterWrapper::serialize(uint8_t** buffer,
}
//same as ParameterWrapper
uint32_t DataPoolParameterWrapper::getSerializedSize() const {
size_t DataPoolParameterWrapper::getSerializedSize() const {
uint32_t serializedSize = 0;
serializedSize += type.getSerializedSize();
serializedSize += sizeof(rows);

View File

@ -14,7 +14,7 @@ public:
virtual ReturnValue_t serialize(uint8_t** buffer, size_t* size,
const size_t max_size, bool bigEndian) const;
virtual uint32_t getSerializedSize() const;
virtual size_t getSerializedSize() const;
virtual ReturnValue_t deSerialize(const uint8_t** buffer, int32_t* size,
bool bigEndian);

View File

@ -119,8 +119,8 @@ ReturnValue_t DataSet::serialize(uint8_t** buffer, size_t* size,
return result;
}
uint32_t DataSet::getSerializedSize() const {
uint32_t size = 0;
size_t DataSet::getSerializedSize() const {
size_t size = 0;
for (uint16_t count = 0; count < fill_count; count++) {
size += registeredVariables[count]->getSerializedSize();
}

View File

@ -124,7 +124,7 @@ public:
ReturnValue_t serialize(uint8_t** buffer, size_t* size,
const size_t max_size, bool bigEndian) const;
uint32_t getSerializedSize() const;
virtual size_t getSerializedSize() const;
ReturnValue_t deSerialize(const uint8_t** buffer, int32_t* size,
bool bigEndian);

View File

@ -132,7 +132,7 @@ public:
bigEndian);
}
virtual uint32_t getSerializedSize() const {
virtual size_t getSerializedSize() const {
return SerializeAdapter<T>::getSerializedSize(&value);
}

View File

@ -193,7 +193,7 @@ uint16_t PoolRawAccess::getSizeTillEnd() const {
}
uint32_t PoolRawAccess::getSerializedSize() const {
size_t PoolRawAccess::getSerializedSize() const {
return typeSize;
}

View File

@ -125,7 +125,7 @@ public:
*/
uint16_t getSizeTillEnd() const;
uint32_t getSerializedSize() const;
size_t getSerializedSize() const;
ReturnValue_t deSerialize(const uint8_t** buffer, int32_t* size,
bool bigEndian);

View File

@ -199,7 +199,7 @@ public:
bigEndian);
}
virtual uint32_t getSerializedSize() const {
virtual size_t getSerializedSize() const {
return SerializeAdapter<T>::getSerializedSize(&value);
}

View File

@ -211,7 +211,7 @@ public:
return result;
}
virtual uint32_t getSerializedSize() const {
virtual size_t getSerializedSize() const {
return vector_size * SerializeAdapter<T>::getSerializedSize(value);
}

View File

@ -26,7 +26,7 @@ ReturnValue_t DeviceTmReportingWrapper::serialize(uint8_t** buffer,
return data->serialize(buffer, size, max_size, bigEndian);
}
uint32_t DeviceTmReportingWrapper::getSerializedSize() const {
size_t DeviceTmReportingWrapper::getSerializedSize() const {
return sizeof(objectId) + sizeof(ActionId_t) + data->getSerializedSize();
}

View File

@ -14,7 +14,7 @@ public:
virtual ReturnValue_t serialize(uint8_t** buffer, size_t* size,
const size_t max_size, bool bigEndian) const;
virtual uint32_t getSerializedSize() const;
virtual size_t getSerializedSize() const;
virtual ReturnValue_t deSerialize(const uint8_t** buffer, int32_t* size,
bool bigEndian);

View File

@ -15,7 +15,7 @@ public:
const size_t max_size, bool bigEndian) const {
return rangeMatcher.serialize(buffer, size, max_size, bigEndian);
}
uint32_t getSerializedSize() const {
size_t getSerializedSize() const {
return rangeMatcher.getSerializedSize();
}
ReturnValue_t deSerialize(const uint8_t** buffer, int32_t* size,

View File

@ -81,7 +81,7 @@ ReturnValue_t Type::serialize(uint8_t** buffer, size_t* size,
}
uint32_t Type::getSerializedSize() const {
size_t Type::getSerializedSize() const {
uint8_t dontcare = 0;
return 2 * SerializeAdapter<uint8_t>::getSerializedSize(&dontcare);
}

View File

@ -42,7 +42,7 @@ public:
virtual ReturnValue_t serialize(uint8_t** buffer, size_t* size,
const size_t max_size, bool bigEndian) const;
virtual uint32_t getSerializedSize() const;
virtual size_t getSerializedSize() const;
virtual ReturnValue_t deSerialize(const uint8_t** buffer, int32_t* size,
bool bigEndian);

View File

@ -86,7 +86,7 @@ public:
return result;
}
uint32_t getSerializedSize() const {
size_t getSerializedSize() const {
//Analogous to serialize!
uint32_t size = 1; //One for count
iterator iter = this->begin();

View File

@ -40,7 +40,7 @@ public:
return SerializeAdapter<bool>::serialize(&inverted, buffer, size, max_size, bigEndian);
}
uint32_t getSerializedSize() const {
size_t getSerializedSize() const {
return sizeof(lowerBound) + sizeof(upperBound) + sizeof(bool);
}

View File

@ -17,7 +17,7 @@ ReturnValue_t LimitViolationReporter::sendLimitViolationReport(const SerializeIF
}
store_address_t storeId;
uint8_t* dataTarget = NULL;
uint32_t maxSize = data->getSerializedSize();
size_t maxSize = data->getSerializedSize();
if (maxSize > MonitoringIF::VIOLATION_REPORT_MAX_SIZE) {
return MonitoringIF::INVALID_SIZE;
}

View File

@ -77,7 +77,7 @@ ReturnValue_t ParameterWrapper::serialize(uint8_t** buffer, size_t* size,
return result;
}
uint32_t ParameterWrapper::getSerializedSize() const {
size_t ParameterWrapper::getSerializedSize() const {
uint32_t serializedSize = 0;
serializedSize += type.getSerializedSize();
serializedSize += sizeof(rows);

View File

@ -28,7 +28,7 @@ public:
virtual ReturnValue_t serialize(uint8_t** buffer, size_t* size,
const size_t max_size, bool bigEndian) const;
virtual uint32_t getSerializedSize() const;
virtual size_t getSerializedSize() const;
virtual ReturnValue_t deSerialize(const uint8_t** buffer, int32_t* size,
bool bigEndian);

View File

@ -100,7 +100,7 @@ ReturnValue_t Fuse::serialize(uint8_t** buffer, size_t* size,
}
uint32_t Fuse::getSerializedSize() const {
uint32_t size = 0;
size_t size = 0;
for (DeviceList::const_iterator iter = devices.begin();
iter != devices.end(); iter++) {
size += (*iter)->getSerializedSize();

View File

@ -28,7 +28,7 @@ ReturnValue_t PowerComponent::serialize(uint8_t** buffer, size_t* size,
bigEndian);
}
uint32_t PowerComponent::getSerializedSize() const {
size_t PowerComponent::getSerializedSize() const {
return sizeof(min) + sizeof(max);
}

View File

@ -22,7 +22,7 @@ public:
ReturnValue_t serialize(uint8_t** buffer, size_t* size,
const size_t max_size, bool bigEndian) const;
uint32_t getSerializedSize() const;
size_t getSerializedSize() const;
ReturnValue_t deSerialize(const uint8_t** buffer, int32_t* size,
bool bigEndian);

View File

@ -41,7 +41,7 @@ public:
return result;
}
virtual uint32_t getSerializedSize() const {
virtual size_t getSerializedSize() const {
return getSerializedSize(adaptee);
}

View File

@ -54,7 +54,7 @@ ReturnValue_t SerialBufferAdapter<count_t>::serialize(uint8_t** buffer, size_t*
}
template<typename count_t>
uint32_t SerialBufferAdapter<count_t>::getSerializedSize() const {
size_t SerialBufferAdapter<count_t>::getSerializedSize() const {
if (m_serialize_length) {
return m_buffer_length + AutoSerializeAdapter::getSerializedSize(&m_buffer_length);
} else {

View File

@ -43,7 +43,7 @@ public:
virtual ReturnValue_t serialize(uint8_t** buffer, size_t* size,
const size_t max_size, bool bigEndian) const;
virtual uint32_t getSerializedSize() const;
virtual size_t getSerializedSize() const;
virtual ReturnValue_t deSerialize(const uint8_t** buffer, int32_t* size,
bool bigEndian);

View File

@ -37,7 +37,7 @@ public:
return SerialArrayListAdapter<BUFFER_TYPE, count_t>::serialize(this, buffer, size, max_size, bigEndian);
}
uint32_t getSerializedSize() const {
size_t getSerializedSize() const {
return SerialArrayListAdapter<BUFFER_TYPE, count_t>::getSerializedSize(this);
}
ReturnValue_t deSerialize(const uint8_t** buffer, int32_t* size,

View File

@ -88,7 +88,7 @@ public:
}
return result;
}
virtual uint32_t getSerializedSize() const {
virtual size_t getSerializedSize() const {
if (printCount) {
return SerialLinkedListAdapter<T>::getSerializedSize()
+ sizeof(count_t);

View File

@ -37,7 +37,7 @@ public:
return SerializeAdapter<T>::serialize(&entry, buffer, size, max_size, bigEndian);
}
uint32_t getSerializedSize() const {
size_t getSerializedSize() const {
return SerializeAdapter<T>::getSerializedSize(&entry);
}

View File

@ -40,7 +40,7 @@ public:
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;
virtual size_t getSerializedSize() const = 0;
virtual ReturnValue_t deSerialize(const uint8_t** buffer, int32_t* size,
bool bigEndian) = 0;

View File

@ -601,7 +601,7 @@ void Subsystem::transitionFailed(ReturnValue_t failureCode,
void Subsystem::sendSerializablesAsCommandMessage(Command_t command,
SerializeIF** elements, uint8_t count) {
ReturnValue_t result;
uint32_t maxSize = 0;
size_t maxSize = 0;
for (uint8_t i = 0; i < count; i++) {
maxSize += elements[i]->getSerializedSize();
}

View File

@ -49,7 +49,7 @@ public:
}
virtual uint32_t getSerializedSize() const {
virtual size_t getSerializedSize() const {
return sizeof(value1) + sizeof(value2) + sizeof(value3) + sizeof(value4);
}

View File

@ -44,7 +44,7 @@ public:
}
uint32_t getSerializedSize() const {
size_t getSerializedSize() const {
return sizeof(apid) + sizeof(ssc);
}
@ -244,7 +244,7 @@ public:
return adapter.serialize(buffer,size,max_size,bigEndian);
}
uint32_t getSerializedSize() const {
size_t getSerializedSize() const {
uint32_t size = 0;
size += AutoSerializeAdapter::getSerializedSize(&apid);
size += AutoSerializeAdapter::getSerializedSize(&sourceSequenceCount);

View File

@ -27,7 +27,7 @@ public:
return SerializeAdapter<uint16_t>::serialize(&apid, buffer,
size, max_size, bigEndian);
}
uint32_t getSerializedSize() const {
size_t getSerializedSize() const {
return SerializeAdapter<uint16_t>::getSerializedSize(&apid);
}
ReturnValue_t deSerialize(const uint8_t** buffer, int32_t* size,

View File

@ -27,7 +27,7 @@ public:
return SerializeAdapter<uint8_t>::serialize(&service, buffer,
size, max_size, bigEndian);
}
uint32_t getSerializedSize() const {
size_t getSerializedSize() const {
return SerializeAdapter<uint8_t>::getSerializedSize(&service);
}
ReturnValue_t deSerialize(const uint8_t** buffer, int32_t* size,

View File

@ -25,7 +25,7 @@ public:
return SerializeAdapter<uint8_t>::serialize(&subService, buffer, size,
max_size, bigEndian);
}
uint32_t getSerializedSize() const {
size_t getSerializedSize() const {
return SerializeAdapter<uint8_t>::getSerializedSize(&subService);
}
ReturnValue_t deSerialize(const uint8_t** buffer, int32_t* size,

View File

@ -42,7 +42,7 @@ TmPacketStored::TmPacketStored(uint16_t apid, uint8_t service,
if (!checkAndSetStore()) {
return;
}
uint32_t sourceDataSize = 0;
size_t sourceDataSize = 0;
if (content != NULL) {
sourceDataSize += content->getSerializedSize();
}