overload vs override clarification for GCC13; Also, cmake-format
This commit is contained in:
parent
be3a57a795
commit
26e97ddf89
@ -51,8 +51,9 @@ class VarLenField : public SerializeIF {
|
|||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
using SerializeIF::deSerialize; // we overloaded above, so this is needed to uncofuse the
|
||||||
|
// compiler
|
||||||
ReturnValue_t deSerialize(const uint8_t **buffer, size_t *size,
|
ReturnValue_t deSerialize(const uint8_t **buffer, size_t *size,
|
||||||
Endianness streamEndianness) override;
|
Endianness streamEndianness) override;
|
||||||
|
|
||||||
|
@ -23,6 +23,8 @@ class EntityIdTlv : public TlvIF {
|
|||||||
*/
|
*/
|
||||||
ReturnValue_t deSerialize(cfdp::Tlv& tlv, Endianness endianness);
|
ReturnValue_t deSerialize(cfdp::Tlv& tlv, Endianness endianness);
|
||||||
|
|
||||||
|
using SerializeIF::deSerialize; // we overloaded this function, so this is needed to unconfuse
|
||||||
|
// the compiler
|
||||||
ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
||||||
Endianness streamEndianness) override;
|
Endianness streamEndianness) override;
|
||||||
|
|
||||||
|
@ -29,6 +29,8 @@ class FilestoreResponseTlv : public cfdp::FilestoreTlvBase {
|
|||||||
*/
|
*/
|
||||||
ReturnValue_t deSerialize(const cfdp::Tlv& tlv, Endianness endianness);
|
ReturnValue_t deSerialize(const cfdp::Tlv& tlv, Endianness endianness);
|
||||||
|
|
||||||
|
using SerializeIF::deSerialize; // we overloaded this function, so this is needed to unconfuse
|
||||||
|
// the compiler
|
||||||
ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
||||||
Endianness streamEndianness) override;
|
Endianness streamEndianness) override;
|
||||||
|
|
||||||
|
@ -155,8 +155,8 @@ class FixedMap : public SerializeIF {
|
|||||||
|
|
||||||
uint32_t maxSize() const { return theMap.maxSize(); }
|
uint32_t maxSize() const { return theMap.maxSize(); }
|
||||||
|
|
||||||
virtual ReturnValue_t serialize(uint8_t** buffer, size_t* size, size_t maxSize,
|
ReturnValue_t serialize(uint8_t** buffer, size_t* size, size_t maxSize,
|
||||||
Endianness streamEndianness) const {
|
Endianness streamEndianness) const override {
|
||||||
ReturnValue_t result =
|
ReturnValue_t result =
|
||||||
SerializeAdapter::serialize(&this->_size, buffer, size, maxSize, streamEndianness);
|
SerializeAdapter::serialize(&this->_size, buffer, size, maxSize, streamEndianness);
|
||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
@ -170,7 +170,7 @@ class FixedMap : public SerializeIF {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual size_t getSerializedSize() const {
|
size_t getSerializedSize() const override {
|
||||||
uint32_t printSize = sizeof(_size);
|
uint32_t printSize = sizeof(_size);
|
||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
|
|
||||||
@ -182,8 +182,8 @@ class FixedMap : public SerializeIF {
|
|||||||
return printSize;
|
return printSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
||||||
Endianness streamEndianness) {
|
Endianness streamEndianness) override {
|
||||||
ReturnValue_t result =
|
ReturnValue_t result =
|
||||||
SerializeAdapter::deSerialize(&this->_size, buffer, size, streamEndianness);
|
SerializeAdapter::deSerialize(&this->_size, buffer, size, streamEndianness);
|
||||||
if (this->_size > theMap.maxSize()) {
|
if (this->_size > theMap.maxSize()) {
|
||||||
|
@ -64,7 +64,7 @@ class PoolDataSetBase : public PoolDataSetIF, public SerializeIF {
|
|||||||
* - @c SET_WAS_ALREADY_READ if read() is called twice without calling
|
* - @c SET_WAS_ALREADY_READ if read() is called twice without calling
|
||||||
* commit() in between
|
* commit() in between
|
||||||
*/
|
*/
|
||||||
virtual ReturnValue_t read(MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING,
|
ReturnValue_t read(MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING,
|
||||||
uint32_t lockTimeout = 20) override;
|
uint32_t lockTimeout = 20) override;
|
||||||
/**
|
/**
|
||||||
* @brief The commit call initializes writing back the registered variables.
|
* @brief The commit call initializes writing back the registered variables.
|
||||||
@ -84,7 +84,7 @@ class PoolDataSetBase : public PoolDataSetIF, public SerializeIF {
|
|||||||
* - @c COMMITING_WITHOUT_READING if set was not read yet and
|
* - @c COMMITING_WITHOUT_READING if set was not read yet and
|
||||||
* contains non write-only variables
|
* contains non write-only variables
|
||||||
*/
|
*/
|
||||||
virtual ReturnValue_t commit(MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING,
|
ReturnValue_t commit(MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING,
|
||||||
uint32_t lockTimeout = 20) override;
|
uint32_t lockTimeout = 20) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -92,7 +92,7 @@ class PoolDataSetBase : public PoolDataSetIF, public SerializeIF {
|
|||||||
* @param variable
|
* @param variable
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
virtual ReturnValue_t registerVariable(PoolVariableIF* variable) override;
|
ReturnValue_t registerVariable(PoolVariableIF* variable) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides the means to lock the underlying data structure to ensure
|
* Provides the means to lock the underlying data structure to ensure
|
||||||
|
@ -87,8 +87,8 @@ class LocalPoolVariable : public LocalPoolObjectBase {
|
|||||||
|
|
||||||
ReturnValue_t serialize(uint8_t** buffer, size_t* size, size_t maxSize,
|
ReturnValue_t serialize(uint8_t** buffer, size_t* size, size_t maxSize,
|
||||||
SerializeIF::Endianness streamEndianness) const override;
|
SerializeIF::Endianness streamEndianness) const override;
|
||||||
virtual size_t getSerializedSize() const override;
|
size_t getSerializedSize() const override;
|
||||||
virtual ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
||||||
SerializeIF::Endianness streamEndianness) override;
|
SerializeIF::Endianness streamEndianness) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -98,10 +98,10 @@ class LocalPoolVector : public LocalPoolObjectBase {
|
|||||||
T& operator[](size_t i);
|
T& operator[](size_t i);
|
||||||
const T& operator[](size_t i) const;
|
const T& operator[](size_t i) const;
|
||||||
|
|
||||||
virtual ReturnValue_t serialize(uint8_t** buffer, size_t* size, const size_t maxSize,
|
ReturnValue_t serialize(uint8_t** buffer, size_t* size, const size_t maxSize,
|
||||||
SerializeIF::Endianness streamEndiannes) const override;
|
SerializeIF::Endianness streamEndiannes) const override;
|
||||||
virtual size_t getSerializedSize() const override;
|
size_t getSerializedSize() const override;
|
||||||
virtual ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
||||||
SerializeIF::Endianness streamEndianness) override;
|
SerializeIF::Endianness streamEndianness) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -21,7 +21,6 @@ extern const char* translateEvents(Event event);
|
|||||||
|
|
||||||
class EventManager : public EventManagerIF, public ExecutableObjectIF, public SystemObject {
|
class EventManager : public EventManagerIF, public ExecutableObjectIF, public SystemObject {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
EventManager(object_id_t setObjectId, uint32_t eventQueueDepth);
|
EventManager(object_id_t setObjectId, uint32_t eventQueueDepth);
|
||||||
virtual ~EventManager();
|
virtual ~EventManager();
|
||||||
|
|
||||||
|
@ -44,12 +44,12 @@ class Type : public SerializeIF {
|
|||||||
|
|
||||||
static ActualType_t getActualType(uint8_t ptc, uint8_t pfc);
|
static ActualType_t getActualType(uint8_t ptc, uint8_t pfc);
|
||||||
|
|
||||||
virtual ReturnValue_t serialize(uint8_t **buffer, size_t *size, size_t maxSize,
|
ReturnValue_t serialize(uint8_t **buffer, size_t *size, size_t maxSize,
|
||||||
Endianness streamEndianness) const override;
|
Endianness streamEndianness) const override;
|
||||||
|
|
||||||
virtual size_t getSerializedSize() const override;
|
size_t getSerializedSize() const override;
|
||||||
|
|
||||||
virtual ReturnValue_t deSerialize(const uint8_t **buffer, size_t *size,
|
ReturnValue_t deSerialize(const uint8_t **buffer, size_t *size,
|
||||||
Endianness streamEndianness) override;
|
Endianness streamEndianness) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -54,7 +54,7 @@ class HousekeepingSnapshot : public SerializeIF {
|
|||||||
HousekeepingSnapshot(uint8_t* timeStamp, size_t timeStampSize, LocalPoolObjectBase* dataSetPtr)
|
HousekeepingSnapshot(uint8_t* timeStamp, size_t timeStampSize, LocalPoolObjectBase* dataSetPtr)
|
||||||
: timeStamp(timeStamp), timeStampSize(timeStampSize), updateData(dataSetPtr){};
|
: timeStamp(timeStamp), timeStampSize(timeStampSize), updateData(dataSetPtr){};
|
||||||
|
|
||||||
virtual ReturnValue_t serialize(uint8_t** buffer, size_t* size, size_t maxSize,
|
ReturnValue_t serialize(uint8_t** buffer, size_t* size, size_t maxSize,
|
||||||
Endianness streamEndianness) const {
|
Endianness streamEndianness) const {
|
||||||
if (timeStamp != nullptr) {
|
if (timeStamp != nullptr) {
|
||||||
/* Endianness will always be MACHINE, so we can simply use memcpy
|
/* Endianness will always be MACHINE, so we can simply use memcpy
|
||||||
@ -70,14 +70,14 @@ class HousekeepingSnapshot : public SerializeIF {
|
|||||||
return updateData->serialize(buffer, size, maxSize, streamEndianness);
|
return updateData->serialize(buffer, size, maxSize, streamEndianness);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual size_t getSerializedSize() const {
|
size_t getSerializedSize() const {
|
||||||
if (updateData == nullptr) {
|
if (updateData == nullptr) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return timeStampSize + updateData->getSerializedSize();
|
return timeStampSize + updateData->getSerializedSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
||||||
SerializeIF::Endianness streamEndianness) override {
|
SerializeIF::Endianness streamEndianness) override {
|
||||||
if (*size < timeStampSize) {
|
if (*size < timeStampSize) {
|
||||||
return SerializeIF::STREAM_TOO_SHORT;
|
return SerializeIF::STREAM_TOO_SHORT;
|
||||||
|
@ -32,9 +32,9 @@ class AbsLimitMonitor : public MonitorBase<T> {
|
|||||||
return returnvalue::OK; // We're not out of range.
|
return returnvalue::OK; // We're not out of range.
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ReturnValue_t getParameter(uint8_t domainId, uint16_t parameterId,
|
ReturnValue_t getParameter(uint8_t domainId, uint8_t parameterId,
|
||||||
ParameterWrapper *parameterWrapper,
|
ParameterWrapper *parameterWrapper, const ParameterWrapper *newValues,
|
||||||
const ParameterWrapper *newValues, uint16_t startAtIndex) {
|
uint16_t startAtIndex) override {
|
||||||
ReturnValue_t result = this->MonitorBase<T>::getParameter(
|
ReturnValue_t result = this->MonitorBase<T>::getParameter(
|
||||||
domainId, parameterId, parameterWrapper, newValues, startAtIndex);
|
domainId, parameterId, parameterWrapper, newValues, startAtIndex);
|
||||||
// We'll reuse the DOMAIN_ID of MonitorReporter,
|
// We'll reuse the DOMAIN_ID of MonitorReporter,
|
||||||
|
@ -13,6 +13,7 @@ class MonitoringMessage : public CommandMessage {
|
|||||||
static const Command_t LIMIT_VIOLATION_REPORT = MAKE_COMMAND_ID(10);
|
static const Command_t LIMIT_VIOLATION_REPORT = MAKE_COMMAND_ID(10);
|
||||||
virtual ~MonitoringMessage();
|
virtual ~MonitoringMessage();
|
||||||
static void setLimitViolationReport(CommandMessage* message, store_address_t storeId);
|
static void setLimitViolationReport(CommandMessage* message, store_address_t storeId);
|
||||||
|
using CommandMessage::clear;
|
||||||
static void clear(CommandMessage* message);
|
static void clear(CommandMessage* message);
|
||||||
static store_address_t getStoreId(const CommandMessage* message);
|
static store_address_t getStoreId(const CommandMessage* message);
|
||||||
static void setTypicalMessage(CommandMessage* message, Command_t type, store_address_t storeId);
|
static void setTypicalMessage(CommandMessage* message, Command_t type, store_address_t storeId);
|
||||||
|
@ -19,12 +19,12 @@ class CpuUsage : public SerializeIF {
|
|||||||
float timeRunning;
|
float timeRunning;
|
||||||
float percentUsage;
|
float percentUsage;
|
||||||
|
|
||||||
virtual ReturnValue_t serialize(uint8_t** buffer, size_t* size, size_t maxSize,
|
ReturnValue_t serialize(uint8_t** buffer, size_t* size, size_t maxSize,
|
||||||
Endianness streamEndianness) const override;
|
Endianness streamEndianness) const override;
|
||||||
|
|
||||||
virtual size_t getSerializedSize() const override;
|
size_t getSerializedSize() const override;
|
||||||
|
|
||||||
virtual ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
||||||
Endianness streamEndianness) override;
|
Endianness streamEndianness) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -40,12 +40,14 @@ class ParameterWrapper : public SerializeIF {
|
|||||||
ParameterWrapper(Type type, uint8_t rows, uint8_t columns, const void *data);
|
ParameterWrapper(Type type, uint8_t rows, uint8_t columns, const void *data);
|
||||||
virtual ~ParameterWrapper();
|
virtual ~ParameterWrapper();
|
||||||
|
|
||||||
virtual ReturnValue_t serialize(uint8_t **buffer, size_t *size, size_t maxSize,
|
ReturnValue_t serialize(uint8_t **buffer, size_t *size, size_t maxSize,
|
||||||
Endianness streamEndianness) const override;
|
Endianness streamEndianness) const override;
|
||||||
|
|
||||||
virtual size_t getSerializedSize() const override;
|
size_t getSerializedSize() const override;
|
||||||
|
|
||||||
virtual ReturnValue_t deSerialize(const uint8_t **buffer, size_t *size,
|
using SerializeIF::deSerialize; // we overloaded this function, so this is needed to unconfuse
|
||||||
|
// the compiler
|
||||||
|
ReturnValue_t deSerialize(const uint8_t **buffer, size_t *size,
|
||||||
Endianness streamEndianness) override;
|
Endianness streamEndianness) override;
|
||||||
|
|
||||||
virtual ReturnValue_t deSerialize(const uint8_t **buffer, size_t *size,
|
virtual ReturnValue_t deSerialize(const uint8_t **buffer, size_t *size,
|
||||||
|
@ -24,7 +24,7 @@ class EventReport : public SerializeIF { //!< [EXPORT] : [SUBSERVICE] 1, 2, 3,
|
|||||||
parameter1(parameter1_),
|
parameter1(parameter1_),
|
||||||
parameter2(parameter2_) {}
|
parameter2(parameter2_) {}
|
||||||
|
|
||||||
virtual ReturnValue_t serialize(uint8_t** buffer, size_t* size, size_t maxSize,
|
ReturnValue_t serialize(uint8_t** buffer, size_t* size, size_t maxSize,
|
||||||
SerializeIF::Endianness streamEndianness) const override {
|
SerializeIF::Endianness streamEndianness) const override {
|
||||||
ReturnValue_t result =
|
ReturnValue_t result =
|
||||||
SerializeAdapter::serialize(&reportId, buffer, size, maxSize, streamEndianness);
|
SerializeAdapter::serialize(&reportId, buffer, size, maxSize, streamEndianness);
|
||||||
@ -46,7 +46,7 @@ class EventReport : public SerializeIF { //!< [EXPORT] : [SUBSERVICE] 1, 2, 3,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual size_t getSerializedSize() const override {
|
size_t getSerializedSize() const override {
|
||||||
uint32_t size = 0;
|
uint32_t size = 0;
|
||||||
size += SerializeAdapter::getSerializedSize(&reportId);
|
size += SerializeAdapter::getSerializedSize(&reportId);
|
||||||
size += SerializeAdapter::getSerializedSize(&objectId);
|
size += SerializeAdapter::getSerializedSize(&objectId);
|
||||||
@ -55,7 +55,7 @@ class EventReport : public SerializeIF { //!< [EXPORT] : [SUBSERVICE] 1, 2, 3,
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
||||||
SerializeIF::Endianness streamEndianness) override {
|
SerializeIF::Endianness streamEndianness) override {
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
@ -16,8 +16,10 @@ class SerialArrayListAdapter : public SerializeIF {
|
|||||||
public:
|
public:
|
||||||
SerialArrayListAdapter(ArrayList<T, count_t>* adaptee) : adaptee(adaptee) {}
|
SerialArrayListAdapter(ArrayList<T, count_t>* adaptee) : adaptee(adaptee) {}
|
||||||
|
|
||||||
virtual ReturnValue_t serialize(uint8_t** buffer, size_t* size, size_t maxSize,
|
using SerializeIF::serialize; // we overload this function as well, so this is needed to uncofuse
|
||||||
Endianness streamEndianness) const {
|
// the compiler
|
||||||
|
ReturnValue_t serialize(uint8_t** buffer, size_t* size, size_t maxSize,
|
||||||
|
Endianness streamEndianness) const override {
|
||||||
return serialize(adaptee, buffer, size, maxSize, streamEndianness);
|
return serialize(adaptee, buffer, size, maxSize, streamEndianness);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,7 +36,7 @@ class SerialArrayListAdapter : public SerializeIF {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual size_t getSerializedSize() const { return getSerializedSize(adaptee); }
|
size_t getSerializedSize() const override { return getSerializedSize(adaptee); }
|
||||||
|
|
||||||
static uint32_t getSerializedSize(const ArrayList<T, count_t>* list) {
|
static uint32_t getSerializedSize(const ArrayList<T, count_t>* list) {
|
||||||
uint32_t printSize = sizeof(count_t);
|
uint32_t printSize = sizeof(count_t);
|
||||||
@ -47,8 +49,10 @@ class SerialArrayListAdapter : public SerializeIF {
|
|||||||
return printSize;
|
return printSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
using SerializeIF::deSerialize; // we overload this function as well, so this is needed to
|
||||||
Endianness streamEndianness) {
|
// uncofuse the compiler
|
||||||
|
ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
||||||
|
Endianness streamEndianness) override {
|
||||||
return deSerialize(adaptee, buffer, size, streamEndianness);
|
return deSerialize(adaptee, buffer, size, streamEndianness);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,9 @@ class SerialLinkedListAdapter : public SinglyLinkedList<T>, public SerializeIF {
|
|||||||
SerialLinkedListAdapter(bool printCount = false)
|
SerialLinkedListAdapter(bool printCount = false)
|
||||||
: SinglyLinkedList<T>(), printCount(printCount) {}
|
: SinglyLinkedList<T>(), printCount(printCount) {}
|
||||||
|
|
||||||
virtual ReturnValue_t serialize(uint8_t** buffer, size_t* size, size_t maxSize,
|
using SerializeIF::serialize; // we overloaded this function, so this is needed to unconfuse the
|
||||||
|
// compiler
|
||||||
|
ReturnValue_t serialize(uint8_t** buffer, size_t* size, size_t maxSize,
|
||||||
Endianness streamEndianness) const override {
|
Endianness streamEndianness) const override {
|
||||||
if (printCount) {
|
if (printCount) {
|
||||||
count_t mySize = SinglyLinkedList<T>::getSize();
|
count_t mySize = SinglyLinkedList<T>::getSize();
|
||||||
@ -68,7 +70,7 @@ class SerialLinkedListAdapter : public SinglyLinkedList<T>, public SerializeIF {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual size_t getSerializedSize() const override {
|
size_t getSerializedSize() const override {
|
||||||
if (printCount) {
|
if (printCount) {
|
||||||
return SerialLinkedListAdapter<T>::getSerializedSize() + sizeof(count_t);
|
return SerialLinkedListAdapter<T>::getSerializedSize() + sizeof(count_t);
|
||||||
} else {
|
} else {
|
||||||
@ -76,6 +78,8 @@ class SerialLinkedListAdapter : public SinglyLinkedList<T>, public SerializeIF {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
using SerializeIF::deSerialize; // we overloaded this function, so this is needed to unconfuse
|
||||||
|
// the compiler
|
||||||
static size_t getSerializedSize(const LinkedElement<T>* element) {
|
static size_t getSerializedSize(const LinkedElement<T>* element) {
|
||||||
size_t size = 0;
|
size_t size = 0;
|
||||||
while (element != nullptr) {
|
while (element != nullptr) {
|
||||||
@ -85,7 +89,7 @@ class SerialLinkedListAdapter : public SinglyLinkedList<T>, public SerializeIF {
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
||||||
Endianness streamEndianness) override {
|
Endianness streamEndianness) override {
|
||||||
return deSerialize(SinglyLinkedList<T>::start, buffer, size, streamEndianness);
|
return deSerialize(SinglyLinkedList<T>::start, buffer, size, streamEndianness);
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ class SerializeElement : public SerializeIF, public LinkedElement<SerializeIF> {
|
|||||||
|
|
||||||
size_t getSerializedSize() const override { return SerializeAdapter::getSerializedSize(&entry); }
|
size_t getSerializedSize() const override { return SerializeAdapter::getSerializedSize(&entry); }
|
||||||
|
|
||||||
virtual ReturnValue_t deSerialize(const uint8_t **buffer, size_t *size,
|
ReturnValue_t deSerialize(const uint8_t **buffer, size_t *size,
|
||||||
Endianness streamEndianness) override {
|
Endianness streamEndianness) override {
|
||||||
return SerializeAdapter::deSerialize(&entry, buffer, size, streamEndianness);
|
return SerializeAdapter::deSerialize(&entry, buffer, size, streamEndianness);
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,8 @@ class ModeListEntry : public SerializeIF, public LinkedElement<ModeListEntry> {
|
|||||||
uint8_t value3 = 0;
|
uint8_t value3 = 0;
|
||||||
uint8_t value4 = 0;
|
uint8_t value4 = 0;
|
||||||
|
|
||||||
virtual ReturnValue_t serialize(uint8_t** buffer, size_t* size, size_t maxSize,
|
ReturnValue_t serialize(uint8_t** buffer, size_t* size, size_t maxSize,
|
||||||
Endianness streamEndianness) const {
|
Endianness streamEndianness) const override {
|
||||||
ReturnValue_t result;
|
ReturnValue_t result;
|
||||||
|
|
||||||
result = SerializeAdapter::serialize(&value1, buffer, size, maxSize, streamEndianness);
|
result = SerializeAdapter::serialize(&value1, buffer, size, maxSize, streamEndianness);
|
||||||
@ -40,12 +40,12 @@ class ModeListEntry : public SerializeIF, public LinkedElement<ModeListEntry> {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual size_t getSerializedSize() const {
|
size_t getSerializedSize() const override {
|
||||||
return sizeof(value1) + sizeof(value2) + sizeof(value3) + sizeof(value4);
|
return sizeof(value1) + sizeof(value2) + sizeof(value3) + sizeof(value4);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
||||||
Endianness streamEndianness) {
|
Endianness streamEndianness) override {
|
||||||
ReturnValue_t result;
|
ReturnValue_t result;
|
||||||
|
|
||||||
result = SerializeAdapter::deSerialize(&value1, buffer, size, streamEndianness);
|
result = SerializeAdapter::deSerialize(&value1, buffer, size, streamEndianness);
|
||||||
|
Loading…
Reference in New Issue
Block a user