![]() |
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=0 |
| 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... | |
| virtual U8 * | getBuffAddr ()=0 |
| Get buffer address for data filling (non-const version) More... | |
| virtual const U8 * | getBuffAddr () const =0 |
| 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... | |
Protected Member Functions | |
| LinearBufferBase & | operator= (const LinearBufferBase &src) |
| Copy assignment operator. More... | |
| LinearBufferBase () | |
| Default constructor. More... | |
| LinearBufferBase (const LinearBufferBase &src) | |
| Copy constructor (protected) More... | |
| void | copyFrom (const LinearBufferBase &src) |
| Copy data from source buffer. More... | |
Protected Attributes | |
| Serializable::SizeType | m_serLoc |
| current offset in buffer of serialized data More... | |
| Serializable::SizeType | m_deserLoc |
| current offset for deserialization More... | |
Friends | |
| class | SerializeBufferBaseTester |
Definition at line 672 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 44 of file Serializable.cpp.
|
protected |
Default constructor.
Initializes a LinearBufferBase instance with default values. Sets the serialization and deserialization locations to zero.
Definition at line 42 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 46 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 689 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 707 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 594 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 626 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 297 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 311 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 502 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 458 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 471 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 492 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 514 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 521 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 558 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 562 of file Serializable.cpp.
|
pure virtual |
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.
Implemented in Fw::ExternalSerializeBuffer, Utils::HashBuffer, Fw::SerialBuffer, Fw::ParamBuffer, Fw::CmdArgBuffer, Fw::ComBuffer, Fw::LogBuffer, Fw::SmSignalBuffer, Fw::TlmBuffer, Drv::DataBuffer, Fw::StatementArgBuffer, and Fw::ActiveComponentExitSerializableBuffer.
|
pure virtual |
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.
Implemented in Fw::ExternalSerializeBuffer, Utils::HashBuffer, Fw::SerialBuffer, Fw::ParamBuffer, Fw::CmdArgBuffer, Fw::ComBuffer, Fw::LogBuffer, Fw::SmSignalBuffer, Fw::TlmBuffer, Drv::DataBuffer, Fw::StatementArgBuffer, and Fw::ActiveComponentExitSerializableBuffer.
| 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 727 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 732 of file Serializable.cpp.
|
overridepure virtual |
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.
Implemented in Fw::ExternalSerializeBuffer, Utils::HashBuffer, Fw::SerialBuffer, Fw::ParamBuffer, Fw::CmdArgBuffer, Fw::ComBuffer, Fw::LogBuffer, Fw::SmSignalBuffer, Fw::TlmBuffer, Drv::DataBuffer, Fw::StatementArgBuffer, and Fw::ActiveComponentExitSerializableBuffer.
|
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 678 of file Serializable.cpp.
|
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 684 of file Serializable.cpp.
|
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 651 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 644 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 638 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 59 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 608 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 603 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 66 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 78 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 197 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 190 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 204 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 221 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 229 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 233 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 262 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 258 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 284 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 612 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 655 of file Serializable.cpp.
|
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 668 of file Serializable.cpp.
|
friend |
Definition at line 673 of file Serializable.hpp.
|
protected |
current offset for deserialization
Definition at line 1377 of file Serializable.hpp.
|
protected |
current offset in buffer of serialized data
Definition at line 1376 of file Serializable.hpp.