![]() |
F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
|
#include <Fw/Types/Serializable.hpp>
Public Member Functions | |
| virtual | ~LinearBufferBase () |
| Destructor. More... | |
| SerializeStatus | serializeFrom (U8 val, Endianness mode=Endianness::BIG) override |
| Serialize an 8-bit unsigned integer value. More... | |
| SerializeStatus | serializeFrom (I8 val, Endianness mode=Endianness::BIG) override |
| Serialize an 8-bit signed integer value. More... | |
| SerializeStatus | serializeFrom (F32 val, Endianness mode=Endianness::BIG) override |
| Serialize a 32-bit floating point value. More... | |
| SerializeStatus | serializeFrom (F64 val, Endianness mode=Endianness::BIG) override |
| Serialize a 64-bit floating point value. More... | |
| SerializeStatus | serializeFrom (bool val, Endianness mode=Endianness::BIG) override |
| Serialize a boolean value. More... | |
| SerializeStatus | serializeFrom (const void *val, Endianness mode=Endianness::BIG) override |
| Serialize a pointer value. More... | |
| SerializeStatus | serializeFrom (const U8 *buff, FwSizeType length, Endianness endianMode=Endianness::BIG) override |
| Serialize a data buffer. More... | |
| SerializeStatus | serializeFrom (const U8 *buff, FwSizeType length, Serialization::t lengthMode, Endianness endianMode=Endianness::BIG) override |
| Serialize a byte buffer with optional length prefix. More... | |
| SerializeStatus | serializeFrom (const LinearBufferBase &val, Endianness mode=Endianness::BIG) override |
| Serialize another LinearBufferBase object. More... | |
| SerializeStatus | serializeFrom (const Serializable &val, Endianness mode=Endianness::BIG) override |
| Serialize a Serializable object. More... | |
| SerializeStatus | serializeSize (const FwSizeType size, Endianness mode=Endianness::BIG) override |
| Serialize a size value. More... | |
| SerializeStatus | deserializeTo (U8 &val, Endianness mode=Endianness::BIG) override |
| Deserialize an 8-bit unsigned integer value. More... | |
| SerializeStatus | deserializeTo (I8 &val, Endianness mode=Endianness::BIG) override |
| Deserialize an 8-bit signed integer value. More... | |
| SerializeStatus | deserializeTo (F32 &val, Endianness mode=Endianness::BIG) override |
| Deserialize a 32-bit floating point value. More... | |
| SerializeStatus | deserializeTo (F64 &val, Endianness mode=Endianness::BIG) override |
| Deserialize a 64-bit floating point value. More... | |
| SerializeStatus | deserializeTo (bool &val, Endianness mode=Endianness::BIG) override |
| Deserialize a boolean value. More... | |
| SerializeStatus | deserializeTo (void *&val, Endianness mode=Endianness::BIG) override |
| Deserialize a pointer value. More... | |
| SerializeStatus | deserializeTo (U8 *buff, FwSizeType &length, Endianness endianMode=Endianness::BIG) override |
| Deserialize a data buffer. More... | |
| SerializeStatus | deserializeTo (U8 *buff, FwSizeType &length, Serialization::t lengthMode, Endianness endianMode=Endianness::BIG) override |
| Deserialize a byte buffer with optional length prefix. More... | |
| SerializeStatus | deserializeTo (Serializable &val, Endianness mode=Endianness::BIG) override |
| Deserialize a Serializable object. More... | |
| SerializeStatus | deserializeTo (LinearBufferBase &val, Endianness mode=Endianness::BIG) override |
| Deserialize a LinearBufferBase object. More... | |
| SerializeStatus | deserializeSize (FwSizeType &size, Endianness mode=Endianness::BIG) override |
| Deserialize a size value. More... | |
| DEPRECATED (SerializeStatus serialize(const LinearBufferBase &val), "Use serializeFrom(const SerialBufferBase& val) instead") | |
| DEPRECATED (SerializeStatus deserialize(LinearBufferBase &val), "Use deserializeTo(SerialBufferBase& val) instead") | |
| void | resetSer () override |
| Reset serialization pointer to beginning of buffer. More... | |
| void | resetDeser () override |
| Reset deserialization pointer to beginning of buffer. More... | |
| SerializeStatus | moveSerToOffset (FwSizeType offset) override |
| Move serialization pointer to specified offset. More... | |
| SerializeStatus | moveDeserToOffset (FwSizeType offset) override |
| Move deserialization pointer to specified offset. More... | |
| SerializeStatus | serializeSkip (FwSizeType numBytesToSkip) override |
| Skip specified number of bytes during serialization. More... | |
| SerializeStatus | deserializeSkip (FwSizeType numBytesToSkip) override |
| Skip specified number of bytes during deserialization. More... | |
| DEPRECATED (Serializable::SizeType getBuffCapacity() const, "Use getCapacity() instead") | |
| DEPRECATED (Serializable::SizeType getBuffLength() const, "Use getSize() instead") | |
| DEPRECATED (Serializable::SizeType getBuffLeft(), "Use getDeserializeSizeLeft() instead") | |
| Serializable::SizeType | getCapacity () const override |
| Get buffer capacity. More... | |
| Serializable::SizeType | getSize () const override |
| Get current buffer size. More... | |
| Serializable::SizeType | getDeserializeSizeLeft () const override |
| Get remaining deserialization buffer size. More... | |
| Serializable::SizeType | getSerializeSizeLeft () const override |
| Get remaining serialization buffer size. More... | |
| U8 * | getBuffAddr () |
| Get buffer address for data filling (non-const version) More... | |
| const U8 * | getBuffAddr () const |
| Get buffer address for data reading (const version) More... | |
| const U8 * | getBuffAddrLeft () const |
| Get address of remaining non-deserialized data. More... | |
| U8 * | getBuffAddrSer () |
| Get address of end of serialization (DANGEROUS!) More... | |
| SerializeStatus | setBuff (const U8 *src, Serializable::SizeType length) override |
| Set buffer contents from external source. More... | |
| SerializeStatus | setBuffLen (Serializable::SizeType length) override |
| Set buffer length manually. More... | |
| SerializeStatus | copyRaw (SerialBufferBase &dest, Serializable::SizeType size) override |
| Copy raw bytes from this buffer to destination and advance source offset. More... | |
| SerializeStatus | copyRawOffset (SerialBufferBase &dest, Serializable::SizeType size) override |
| Append raw bytes to destination from this buffer and advance source offset. More... | |
| DEPRECATED (SerializeStatus serialize(U8 val), "Use serializeFrom(U8 val) instead") | |
| DEPRECATED (SerializeStatus serialize(I8 val), "Use serializeFrom(I8 val) instead") | |
| DEPRECATED (SerializeStatus serialize(F32 val), "Use serializeFrom(F32 val) instead") | |
| DEPRECATED (SerializeStatus serialize(F64 val), "Use serializeFrom(F64 val) instead") | |
| DEPRECATED (SerializeStatus serialize(bool val), "Use serializeFrom(bool val) instead") | |
| DEPRECATED (SerializeStatus serialize(const void *val), "Use serializeFrom(const void* val) instead") | |
| DEPRECATED (SerializeStatus serialize(const U8 *buff, FwSizeType length, bool noLength), "Use serialize(const U8* buff, FwSizeType length, Serialization::t mode) instead") | |
| DEPRECATED (SerializeStatus serialize(const U8 *buff, FwSizeType length), "Use serializeFrom(const U8* buff, FwSizeType length) instead") | |
| DEPRECATED (SerializeStatus serialize(const U8 *buff, FwSizeType length, Serialization::t mode), "Use serializeFrom(const U8* buff, FwSizeType length, Serialization::t mode) instead") | |
| DEPRECATED (SerializeStatus serialize(const Serializable &val), "Use serializeFrom(const Serializable& val) instead") | |
| DEPRECATED (SerializeStatus deserialize(U8 &val), "Use deserializeTo(U8& val) instead") | |
| DEPRECATED (SerializeStatus deserialize(I8 &val), "Use deserializeTo(I8& val) instead") | |
| DEPRECATED (SerializeStatus deserialize(F32 &val), "Use deserializeTo(F32& val) instead") | |
| DEPRECATED (SerializeStatus deserialize(F64 &val), "Use deserializeTo(F64& val) instead") | |
| DEPRECATED (SerializeStatus deserialize(bool &val), "Use deserializeTo(bool& val) instead") | |
| DEPRECATED (SerializeStatus deserialize(void *&val), "Use deserializeTo(void*& val) instead") | |
| DEPRECATED (SerializeStatus deserialize(U8 *buff, FwSizeType &length, bool noLength), "Use deserialize(U8* buff, FwSizeType& length, Serialization::t mode) instead") | |
| DEPRECATED (SerializeStatus deserialize(U8 *buff, FwSizeType &length), "Use deserializeTo(U8* buff, FwSizeType& length) instead") | |
| DEPRECATED (SerializeStatus deserialize(U8 *buff, FwSizeType &length, Serialization::t mode), "Use deserializeTo(U8* buff, FwSizeType& length, Serialization::t mode) instead") | |
| DEPRECATED (SerializeStatus deserialize(Serializable &val), "Use deserializeTo(Serializable& val) instead") | |
Public Member Functions inherited from Fw::SerialBufferBase | |
| virtual | ~SerialBufferBase () |
| Virtual destructor. More... | |
Static Public Member Functions | |
| static constexpr Serializable::SizeType | STATIC_SERIALIZED_SIZE (Serializable::SizeType maxSize) |
| Get the static serialized size of a buffer This is the max size of the buffer data plus the size of the stored size. More... | |
Protected Member Functions | |
| LinearBufferBase & | operator= (const LinearBufferBase &src) |
| Copy assignment operator. More... | |
| LinearBufferBase ()=delete | |
| LinearBufferBase (U8 *buffAddr, Serializable::SizeType capacity) | |
| Storage constructor. More... | |
| LinearBufferBase (const LinearBufferBase &src) | |
| Copy constructor (protected) More... | |
| void | copyFrom (const LinearBufferBase &src) |
| Copy data from source buffer. More... | |
| Serializable::SizeType | getSerLoc () const |
| Serializable::SizeType | getDeserLoc () const |
| void | setSerLoc (Serializable::SizeType loc) |
| void | setDeserLoc (Serializable::SizeType loc) |
| void | setBuffAddrInternal (U8 *addr) |
| void | setCapacityInternal (Serializable::SizeType capacity) |
Friends | |
| class | LinearBufferBaseTester |
Definition at line 667 of file Serializable.hpp.
|
virtual |
Destructor.
Destroys a LinearBufferBase instance. This is a virtual destructor that allows proper cleanup of derived classes.
Definition at line 46 of file Serializable.cpp.
|
protecteddelete |
There is no default constructor: every derived class must supply its storage during construction
|
protected |
Storage constructor.
Initializes a LinearBufferBase instance with the buffer storage that the derived class provides. Using the constructor makes it a compile-time error for a derived class to forget to setup its storage.
| buffAddr | Pointer to the buffer address (may be nullptr) |
| capacity | Capacity of the buffer storage in bytes |
Definition at line 40 of file Serializable.cpp.
|
protected |
Copy constructor (protected)
Creates a copy of another LinearBufferBase instance. This constructor is protected and intended for use only by derived classes or internal implementation details.
| src | Reference to the source LinearBufferBase to copy from |
|
protected |
Copy data from source buffer.
Copies the contents from another LinearBufferBase instance to this one. This includes copying the buffer data, serialization location, and deserialization location.
| src | Reference to the source LinearBufferBase to copy data from |
Definition at line 48 of file Serializable.cpp.
|
overridevirtual |
Copy raw bytes from this buffer to destination and advance source offset.
This method copies exactly size bytes from the current position in this buffer to the destination buffer. It advances the source buffer's position by the number of bytes copied.
| dest | Destination buffer to receive the copied data |
| size | Number of bytes to copy |
Implements Fw::SerialBufferBase.
Definition at line 734 of file Serializable.cpp.
|
overridevirtual |
Append raw bytes to destination from this buffer and advance source offset.
This method appends exactly size bytes from the current position in this buffer to the destination buffer. It uses Serialization::OMIT_LENGTH mode, meaning no length token is written. The source buffer's position is advanced by the number of bytes copied.
| dest | Destination buffer to append data to |
| size | Number of bytes to append |
Implements Fw::SerialBufferBase.
Definition at line 756 of file Serializable.cpp.
| Fw::LinearBufferBase::DEPRECATED | ( | SerializeStatus | serializeconst LinearBufferBase &val, |
| "Use serializeFrom(const SerialBufferBase& val) instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | SerializeStatus | deserializeLinearBufferBase &val, |
| "Use deserializeTo(SerialBufferBase& val) instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | Serializable::SizeType getBuffCapacity() | const, |
| "Use getCapacity() instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | Serializable::SizeType getBuffLength() | const, |
| "Use getSize() instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | Serializable::SizeType | getBuffLeft(), |
| "Use getDeserializeSizeLeft() instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | SerializeStatus | serializeU8 val, |
| "Use serializeFrom(U8 val) instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | SerializeStatus | serializeI8 val, |
| "Use serializeFrom(I8 val) instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | SerializeStatus | serializeF32 val, |
| "Use serializeFrom(F32 val) instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | SerializeStatus | serializeF64 val, |
| "Use serializeFrom(F64 val) instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | SerializeStatus | serializebool val, |
| "Use serializeFrom(bool val) instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | SerializeStatus | serializeconst void *val, |
| "Use serializeFrom(const void* val) instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | SerializeStatus | serializeconst U8 *buff, FwSizeType length, bool noLength, |
| "Use serialize(const U8* buff, FwSizeType length, Serialization::t mode) instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | SerializeStatus | serializeconst U8 *buff, FwSizeType length, |
| "Use serializeFrom(const U8* buff, FwSizeType length) instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | SerializeStatus | serializeconst U8 *buff, FwSizeType length, Serialization::t mode, |
| "Use serializeFrom(const U8* buff, FwSizeType length, Serialization::t mode) instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | SerializeStatus | serializeconst Serializable &val, |
| "Use serializeFrom(const Serializable& val) instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | SerializeStatus | deserializeU8 &val, |
| "Use deserializeTo(U8& val) instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | SerializeStatus | deserializeI8 &val, |
| "Use deserializeTo(I8& val) instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | SerializeStatus | deserializeF32 &val, |
| "Use deserializeTo(F32& val) instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | SerializeStatus | deserializeF64 &val, |
| "Use deserializeTo(F64& val) instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | SerializeStatus | deserializebool &val, |
| "Use deserializeTo(bool& val) instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | SerializeStatus | deserializevoid *&val, |
| "Use deserializeTo(void*& val) instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | SerializeStatus | deserializeU8 *buff, FwSizeType &length, bool noLength, |
| "Use deserialize(U8* buff, FwSizeType& length, Serialization::t mode) instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | SerializeStatus | deserializeU8 *buff, FwSizeType &length, |
| "Use deserializeTo(U8* buff, FwSizeType& length) instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | SerializeStatus | deserializeU8 *buff, FwSizeType &length, Serialization::t mode, |
| "Use deserializeTo(U8* buff, FwSizeType& length, Serialization::t mode) instead" | |||
| ) |
| Fw::LinearBufferBase::DEPRECATED | ( | SerializeStatus | deserializeSerializable &val, |
| "Use deserializeTo(Serializable& val) instead" | |||
| ) |
|
overridevirtual |
Deserialize a size value.
This method reads a size value (typically used for buffer sizes) from the deserialization buffer. The endianness of the deserialization can be controlled via the mode parameter.
| size | Reference to store the deserialized size value |
| mode | Endianness mode for deserialization (default is Endianness::BIG) |
Implements Fw::SerialBufferBase.
Definition at line 636 of file Serializable.cpp.
|
overridevirtual |
Skip specified number of bytes during deserialization.
This method advances the deserialization pointer by the specified number of bytes without reading any data. This can be used to skip over data in the buffer that is not needed or to advance to the next relevant data segment.
| numBytesToSkip | Number of bytes to skip during deserialization |
Implements Fw::SerialBufferBase.
Definition at line 668 of file Serializable.cpp.
|
overridevirtual |
Deserialize an 8-bit unsigned integer value.
This method reads an 8-bit unsigned integer value from the deserialization buffer and stores it in the provided reference. The endianness of the deserialization can be controlled via the mode parameter.
| val | Reference to store the deserialized 8-bit unsigned integer value |
| mode | Endianness mode for deserialization (default is Endianness::BIG) |
Implements Fw::SerialBufferBase.
Definition at line 318 of file Serializable.cpp.
|
overridevirtual |
Deserialize an 8-bit signed integer value.
This method reads an 8-bit signed integer value from the deserialization buffer and stores it in the provided reference. The endianness of the deserialization can be controlled via the mode parameter.
| val | Reference to store the deserialized 8-bit signed integer value |
| mode | Endianness mode for deserialization (default is Endianness::BIG) |
Implements Fw::SerialBufferBase.
Definition at line 334 of file Serializable.cpp.
|
overridevirtual |
Deserialize a 32-bit floating point value.
This method reads a 32-bit floating point value from the deserialization buffer and stores it in the provided reference. The endianness of the deserialization can be controlled via the mode parameter.
| val | Reference to store the deserialized 32-bit floating point value |
| mode | Endianness mode for deserialization (default is Endianness::BIG) |
Implements Fw::SerialBufferBase.
Definition at line 533 of file Serializable.cpp.
|
overridevirtual |
Deserialize a 64-bit floating point value.
This method reads a 64-bit floating point value from the deserialization buffer and stores it in the provided reference. The endianness of the deserialization can be controlled via the mode parameter.
| val | Reference to store the deserialized 64-bit floating point value |
| mode | Endianness mode for deserialization (default is Endianness::BIG) |
Implements Fw::SerialBufferBase.
Definition at line 486 of file Serializable.cpp.
|
overridevirtual |
Deserialize a boolean value.
This method reads a boolean value from the deserialization buffer and stores it in the provided reference. The endianness of the deserialization can be controlled via the mode parameter.
| val | Reference to store the deserialized boolean value |
| mode | Endianness mode for deserialization (default is Endianness::BIG) |
Implements Fw::SerialBufferBase.
Definition at line 499 of file Serializable.cpp.
|
overridevirtual |
Deserialize a pointer value.
This method reads a pointer value from the deserialization buffer and stores it in the provided reference. Note that only the pointer value itself is deserialized, not the contents it points to. The endianness of the deserialization can be controlled via the mode parameter.
| val | Reference to store the deserialized pointer value |
| mode | Endianness mode for deserialization (default is Endianness::BIG) |
Implements Fw::SerialBufferBase.
Definition at line 523 of file Serializable.cpp.
|
overridevirtual |
Deserialize a data buffer.
This method reads a buffer of bytes from the deserialization buffer and stores them in the provided buffer. The endianness of the deserialization can be controlled via the endianMode parameter.
| buff | Pointer to the buffer where deserialized data will be stored |
| length | Reference to store the actual number of bytes deserialized |
| endianMode | Endianness mode for deserialization (default is Endianness::BIG) |
Implements Fw::SerialBufferBase.
Definition at line 545 of file Serializable.cpp.
|
overridevirtual |
Deserialize a byte buffer with optional length prefix.
This method reads a buffer of bytes from the deserialization buffer and stores them in the provided buffer. If lengthMode indicates that a length prefix was included, it will be read from the buffer first. The endianness of the deserialization can be controlled via the endianMode parameter.
| buff | Pointer to the buffer where deserialized data will be stored |
| length | Reference to store the actual number of bytes deserialized |
| lengthMode | Specifies whether length was included in serialization (INCLUDE_LENGTH or OMIT_LENGTH) |
| endianMode | Endianness mode for deserialization (default is Endianness::BIG) |
Implements Fw::SerialBufferBase.
Definition at line 554 of file Serializable.cpp.
|
overridevirtual |
Deserialize a Serializable object.
This method reads data from the deserialization buffer and reconstructs a Serializable object from it. The endianness of the deserialization can be controlled via the mode parameter.
| val | Reference to the Serializable object that will be populated with deserialized data |
| mode | Endianness mode for deserialization (default is Endianness::BIG) |
Implements Fw::SerialBufferBase.
Definition at line 598 of file Serializable.cpp.
|
overridevirtual |
Deserialize a LinearBufferBase object.
This method reads data from the deserialization buffer and reconstructs a LinearBufferBase object from it. The endianness of the deserialization can be controlled via the mode parameter.
| val | Reference to the LinearBufferBase object that will be populated with deserialized data |
| mode | Endianness mode for deserialization (default is Endianness::BIG) |
Implements Fw::SerialBufferBase.
Definition at line 602 of file Serializable.cpp.
|
inline |
Get buffer address for data filling (non-const version)
This method returns a pointer to the buffer's data area where data can be written. This is the non-const version of the method, allowing the buffer contents to be modified.
Definition at line 1201 of file Serializable.hpp.
|
inline |
Get buffer address for data reading (const version)
This method returns a const pointer to the buffer's data area where data can be read. This is the const version of the method, preventing modification of the buffer contents.
Definition at line 1210 of file Serializable.hpp.
| const U8 * Fw::LinearBufferBase::getBuffAddrLeft | ( | ) | const |
Get address of remaining non-deserialized data.
gets address of end of serialization. Used to manually place data at the end
This method returns a const pointer to the portion of the buffer that has not yet been deserialized. This can be used to examine remaining data or to determine how much data is left to process.
Definition at line 780 of file Serializable.cpp.
| U8 * Fw::LinearBufferBase::getBuffAddrSer | ( | ) |
Get address of end of serialization (DANGEROUS!)
This method returns a pointer to the current end of serialized data in the buffer. This is a dangerous operation as it requires knowledge of the maximum buffer size and proper adjustment when done.
Definition at line 787 of file Serializable.cpp.
|
inlineoverridevirtual |
Get buffer capacity.
This method returns the total capacity of the buffer, which is the maximum amount of data that can be stored in the buffer. This is not the same as the current size, which indicates how much data is currently in the buffer.
Implements Fw::SerialBufferBase.
Definition at line 1164 of file Serializable.hpp.
|
overridevirtual |
Get remaining deserialization buffer size.
This method returns the amount of data that remains to be deserialized from the buffer. It indicates how much data is left starting from the current deserialization pointer to the end of the buffer.
Implements Fw::SerialBufferBase.
Definition at line 722 of file Serializable.cpp.
|
inlineprotected |
Definition at line 1390 of file Serializable.hpp.
|
overridevirtual |
Get remaining serialization buffer size.
This method returns the amount of space available for serialization in the buffer. It indicates how much data can still be written to the buffer starting from the current serialization pointer to the end of the buffer's capacity.
Implements Fw::SerialBufferBase.
Definition at line 728 of file Serializable.cpp.
|
inlineprotected |
Definition at line 1389 of file Serializable.hpp.
|
overridevirtual |
Get current buffer size.
This method returns the current size of the buffer, which indicates how much data is currently stored in the buffer. This may be less than or equal to the buffer's capacity.
Implements Fw::SerialBufferBase.
Definition at line 694 of file Serializable.cpp.
|
overridevirtual |
Move deserialization pointer to specified offset.
This method moves the deserialization pointer to the specified offset within the buffer. This allows for skipping over data or positioning the deserializer at a specific location in the buffer.
| offset | The offset to move the deserialization pointer to |
Implements Fw::SerialBufferBase.
Definition at line 687 of file Serializable.cpp.
|
overridevirtual |
Move serialization pointer to specified offset.
This method moves the serialization pointer to the specified offset within the buffer. This allows for skipping over data or positioning the serializer at a specific location in the buffer.
| offset | The offset to move the serialization pointer to |
Implements Fw::SerialBufferBase.
Definition at line 681 of file Serializable.cpp.
|
protected |
Copy assignment operator.
Assigns the contents of another LinearBufferBase instance to this one. This includes copying the buffer data, serialization location, and deserialization location from the source to this instance.
| src | Reference to the source LinearBufferBase to copy from |
Definition at line 63 of file Serializable.cpp.
|
overridevirtual |
Reset deserialization pointer to beginning of buffer.
This method resets the deserialization pointer to the beginning of the buffer, allowing the buffer to be reused for new deserialization operations. The buffer contents are not modified, but the pointer is reset to allow reading from the start of the data.
Implements Fw::SerialBufferBase.
Definition at line 650 of file Serializable.cpp.
|
overridevirtual |
Reset serialization pointer to beginning of buffer.
This method resets the serialization pointer to the beginning of the buffer, allowing the buffer to be reused for new serialization operations. Any data that was previously serialized in the buffer will be overwritten.
Implements Fw::SerialBufferBase.
Definition at line 645 of file Serializable.cpp.
|
overridevirtual |
Serialize an 8-bit unsigned integer value.
This method serializes a single 8-bit unsigned integer value into the buffer. The endianness of the serialization can be controlled via the mode parameter.
NOTE: The 'mode' argument here for endianness has no effect as there is no concept of endianness for an U8. It has been left in for compatibility.
| val | The 8-bit unsigned integer value to serialize |
| mode | Endianness mode for serialization (default is Endianness::BIG) |
Implements Fw::SerialBufferBase.
Definition at line 70 of file Serializable.cpp.
|
overridevirtual |
Serialize an 8-bit signed integer value.
This method serializes a single 8-bit signed integer value into the buffer. The endianness of the serialization can be controlled via the mode parameter.
NOTE: The 'mode' argument here for endianness has no effect as there is no concept of endianness for an I8. It has been left in for compatibility.
| val | The 8-bit signed integer value to serialize |
| mode | Endianness mode for serialization (default is Endianness::BIG) |
Implements Fw::SerialBufferBase.
Definition at line 83 of file Serializable.cpp.
|
overridevirtual |
Serialize a 32-bit floating point value.
This method serializes a single 32-bit floating point value into the buffer. The endianness of the serialization can be controlled via the mode parameter.
| val | The 32-bit floating point value to serialize |
| mode | Endianness mode for serialization (default is Endianness::BIG) |
Implements Fw::SerialBufferBase.
Definition at line 205 of file Serializable.cpp.
|
overridevirtual |
Serialize a 64-bit floating point value.
This method serializes a single 64-bit floating point value into the buffer. The endianness of the serialization can be controlled via the mode parameter.
| val | The 64-bit floating point value to serialize |
| mode | Endianness mode for serialization (default is Endianness::BIG) |
Implements Fw::SerialBufferBase.
Definition at line 198 of file Serializable.cpp.
|
overridevirtual |
Serialize a boolean value.
This method serializes a single boolean value into the buffer. The endianness of the serialization can be controlled via the mode parameter.
| val | The boolean value to serialize |
| mode | Endianness mode for serialization (default is Endianness::BIG) |
Implements Fw::SerialBufferBase.
Definition at line 212 of file Serializable.cpp.
|
overridevirtual |
Serialize a pointer value.
This method serializes a pointer value into the buffer. Note that only the pointer value itself is serialized, not the contents it points to. The endianness of the serialization can be controlled via the mode parameter.
| val | The pointer value to serialize |
| mode | Endianness mode for serialization (default is Endianness::BIG) |
Implements Fw::SerialBufferBase.
Definition at line 230 of file Serializable.cpp.
|
overridevirtual |
Serialize a data buffer.
This method serializes a buffer of bytes into the serialization buffer. The endianness of the serialization can be controlled via the endianMode parameter.
| buff | Pointer to the buffer containing data to serialize |
| length | Number of bytes to serialize from the buffer |
| endianMode | Endianness mode for serialization (default is Endianness::BIG) |
Implements Fw::SerialBufferBase.
Definition at line 238 of file Serializable.cpp.
|
overridevirtual |
Serialize a byte buffer with optional length prefix.
This method serializes a buffer of bytes into the serialization buffer. If lengthMode is set to INCLUDE_LENGTH, the length is included as the first token. The endianness of the serialization can be controlled via the endianMode parameter.
| buff | Pointer to the buffer containing data to serialize |
| length | Number of bytes to serialize from the buffer |
| lengthMode | Specifies whether to include length in serialization (INCLUDE_LENGTH or OMIT_LENGTH) |
| endianMode | Endianness mode for serialization (default is Endianness::BIG) |
Implements Fw::SerialBufferBase.
Definition at line 245 of file Serializable.cpp.
|
overridevirtual |
Serialize another LinearBufferBase object.
This method serializes the contents of another LinearBufferBase object into this buffer. The endianness of the serialization can be controlled via the mode parameter.
| val | Reference to the LinearBufferBase object to serialize |
| mode | Endianness mode for serialization (default is Endianness::BIG) |
Implements Fw::SerialBufferBase.
Definition at line 280 of file Serializable.cpp.
|
overridevirtual |
Serialize a Serializable object.
This method serializes an object derived from the Serializable base class into this buffer. The endianness of the serialization can be controlled via the mode parameter.
| val | Reference to the Serializable object to serialize |
| mode | Endianness mode for serialization (default is Endianness::BIG) |
Implements Fw::SerialBufferBase.
Definition at line 275 of file Serializable.cpp.
|
overridevirtual |
Serialize a size value.
This method serializes a size value (typically used for buffer sizes) into this buffer. The endianness of the serialization can be controlled via the mode parameter.
| size | The size value to serialize |
| mode | Endianness mode for serialization (default is Endianness::BIG) |
Implements Fw::SerialBufferBase.
Definition at line 305 of file Serializable.cpp.
|
overridevirtual |
Skip specified number of bytes during serialization.
This method advances the serialization pointer by the specified number of bytes without writing any data. This can be used to reserve space in the buffer or skip over data that will be written later.
| numBytesToSkip | Number of bytes to skip during serialization |
Implements Fw::SerialBufferBase.
Definition at line 654 of file Serializable.cpp.
|
overridevirtual |
Set buffer contents from external source.
This method sets the contents of the buffer from an external source. It copies the specified number of bytes from the source pointer into the buffer and updates the buffer size accordingly.
| src | Pointer to the external data source |
| length | Number of bytes to copy from the source |
Implements Fw::SerialBufferBase.
Definition at line 698 of file Serializable.cpp.
|
inlineprotected |
Definition at line 1396 of file Serializable.hpp.
|
overridevirtual |
Set buffer length manually.
This method manually sets the length of the buffer without modifying its contents. This can be used after filling the buffer with data through other means to indicate how much valid data is in the buffer.
| length | The new length to set for the buffer |
Implements Fw::SerialBufferBase.
Definition at line 712 of file Serializable.cpp.
|
inlineprotected |
Definition at line 1397 of file Serializable.hpp.
|
inlineprotected |
Definition at line 1392 of file Serializable.hpp.
|
inlineprotected |
Definition at line 1391 of file Serializable.hpp.
|
inlinestatic |
Get the static serialized size of a buffer This is the max size of the buffer data plus the size of the stored size.
| maxSize | The maximum buffer data size |
Definition at line 684 of file Serializable.hpp.
|
friend |
Definition at line 668 of file Serializable.hpp.