F´ Flight Software - C/C++ Documentation
devel
A framework for building embedded system applications to NASA flight quality standards.
|
#include <Fw/Types/Serializable.hpp>
Public Member Functions | |
virtual | ~SerializeBufferBase () |
destructor More... | |
SerializeStatus | serialize (U8 val) |
serialize 8-bit unsigned int More... | |
SerializeStatus | serialize (I8 val) |
serialize 8-bit signed int More... | |
SerializeStatus | serialize (F32 val) |
serialize 32-bit floating point More... | |
SerializeStatus | serialize (bool val) |
serialize boolean More... | |
SerializeStatus | serialize (const void *val) |
serialize pointer (careful, only pointer value, not contents are serialized) More... | |
SerializeStatus | serialize (const U8 *buff, NATIVE_UINT_TYPE length, bool noLength) |
serialize data buffer More... | |
SerializeStatus | serialize (const U8 *buff, NATIVE_UINT_TYPE length) |
serialize data buffer More... | |
SerializeStatus | serialize (const U8 *buff, FwSizeType length, Serialization::t mode) |
serialize a byte buffer of a given length More... | |
SerializeStatus | serialize (const SerializeBufferBase &val) |
serialize a serialized buffer More... | |
SerializeStatus | serialize (const Serializable &val) |
serialize an object derived from serializable base class More... | |
SerializeStatus | serializeSize (const FwSizeType size) |
serialize a size value More... | |
SerializeStatus | deserialize (U8 &val) |
deserialize 8-bit unsigned int More... | |
SerializeStatus | deserialize (I8 &val) |
deserialize 8-bit signed int More... | |
SerializeStatus | deserialize (F32 &val) |
deserialize 32-bit floating point More... | |
SerializeStatus | deserialize (bool &val) |
deserialize boolean More... | |
SerializeStatus | deserialize (void *&val) |
deserialize point value (careful, pointer value only, not contents) More... | |
SerializeStatus | deserialize (U8 *buff, NATIVE_UINT_TYPE &length, bool noLength) |
deserialize data buffer More... | |
SerializeStatus | deserialize (U8 *buff, NATIVE_UINT_TYPE &length) |
deserialize data buffer More... | |
SerializeStatus | deserialize (U8 *buff, FwSizeType &length, Serialization::t mode) |
deserialize a byte buffer of a given length More... | |
SerializeStatus | deserialize (Serializable &val) |
deserialize an object derived from serializable base class More... | |
SerializeStatus | deserialize (SerializeBufferBase &val) |
serialize a serialized buffer More... | |
SerializeStatus | deserializeSize (FwSizeType &size) |
deserialize a size value More... | |
void | resetSer () |
reset to beginning of buffer to reuse for serialization More... | |
void | resetDeser () |
reset deserialization to beginning More... | |
SerializeStatus | moveSerToOffset (FwSizeType offset) |
Moves serialization to the specified offset. More... | |
SerializeStatus | moveDeserToOffset (FwSizeType offset) |
Moves deserialization to the specified offset. More... | |
SerializeStatus | serializeSkip (FwSizeType numBytesToSkip) |
Skips the number of specified bytes for serialization. More... | |
SerializeStatus | deserializeSkip (FwSizeType numBytesToSkip) |
Skips the number of specified bytes for deserialization. More... | |
virtual Serializable::SizeType | getBuffCapacity () const =0 |
returns capacity, not current size, of buffer More... | |
Serializable::SizeType | getBuffLength () const |
returns current buffer size More... | |
Serializable::SizeType | getBuffLeft () const |
returns how much deserialization buffer is left More... | |
virtual U8 * | getBuffAddr ()=0 |
gets buffer address for data filling More... | |
virtual const U8 * | getBuffAddr () const =0 |
gets buffer address for data reading, const version More... | |
const U8 * | getBuffAddrLeft () const |
gets address of remaining non-deserialized data. More... | |
U8 * | getBuffAddrSer () |
SerializeStatus | setBuff (const U8 *src, Serializable::SizeType length) |
sets buffer contents and size More... | |
SerializeStatus | setBuffLen (Serializable::SizeType length) |
sets buffer length manually after filling with data More... | |
SerializeStatus | copyRaw (SerializeBufferBase &dest, Serializable::SizeType size) |
directly copies buffer without looking for a size in the stream. More... | |
SerializeStatus | copyRawOffset (SerializeBufferBase &dest, Serializable::SizeType size) |
directly copies buffer without looking for a size in the stream. More... | |
Protected Member Functions | |
SerializeBufferBase & | operator= (const SerializeBufferBase &src) |
copy assignment operator More... | |
SerializeBufferBase () | |
default constructor More... | |
Definition at line 54 of file Serializable.hpp.
|
virtual |
destructor
Definition at line 41 of file Serializable.cpp.
|
protected |
default constructor
Definition at line 39 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::copyRaw | ( | SerializeBufferBase & | dest, |
Serializable::SizeType | size | ||
) |
directly copies buffer without looking for a size in the stream.
Definition at line 682 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::copyRawOffset | ( | SerializeBufferBase & | dest, |
Serializable::SizeType | size | ||
) |
directly copies buffer without looking for a size in the stream.
Definition at line 695 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::deserialize | ( | bool & | val | ) |
deserialize boolean
Definition at line 464 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::deserialize | ( | F32 & | val | ) |
deserialize 32-bit floating point
Definition at line 495 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::deserialize | ( | I8 & | val | ) |
deserialize 8-bit signed int
Definition at line 314 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::deserialize | ( | Serializable & | val | ) |
deserialize an object derived from serializable base class
Definition at line 556 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::deserialize | ( | SerializeBufferBase & | val | ) |
serialize a serialized buffer
Definition at line 560 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::deserialize | ( | U8 & | val | ) |
deserialize 8-bit unsigned int
Definition at line 300 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::deserialize | ( | U8 * | buff, |
FwSizeType & | length, | ||
Serialization::t | mode | ||
) |
deserialize a byte buffer of a given length
Deserialize bytes into buff
of length
bytes. If serializationMode
is set to INCLUDE_LENGTH
then the length is deserialized first followed by the bytes. Length may be omitted with OMIT_LENGTH
and in this case length
bytes will be deserialized. length
will be filled with the amount of data deserialized.
buff | buffer to hold deserialized data |
length | length of data to deserialize length is filled with deserialized length |
mode | deserialization type |
Definition at line 522 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::deserialize | ( | U8 * | buff, |
NATIVE_UINT_TYPE & | length | ||
) |
deserialize data buffer
Definition at line 507 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::deserialize | ( | U8 * | buff, |
NATIVE_UINT_TYPE & | length, | ||
bool | noLength | ||
) |
deserialize data buffer
Definition at line 514 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::deserialize | ( | void *& | val | ) |
deserialize point value (careful, pointer value only, not contents)
Definition at line 485 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::deserializeSize | ( | FwSizeType & | size | ) |
deserialize a size value
Definition at line 592 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::deserializeSkip | ( | FwSizeType | numBytesToSkip | ) |
Skips the number of specified bytes for deserialization.
Definition at line 624 of file Serializable.cpp.
|
pure virtual |
gets buffer address for data reading, const version
Implemented in Utils::HashBuffer, Fw::ExternalSerializeBuffer, Fw::SerialBuffer, Fw::TlmBuffer, Fw::SmSignalBuffer, Fw::ParamBuffer, Fw::LogBuffer, Fw::ActiveComponentExitSerializableBuffer, Fw::ComBuffer, Fw::CmdArgBuffer, and Drv::DataBuffer.
|
pure virtual |
gets buffer address for data filling
Implemented in Utils::HashBuffer, Fw::ExternalSerializeBuffer, Fw::SerialBuffer, Fw::TlmBuffer, Fw::SmSignalBuffer, Fw::ParamBuffer, Fw::LogBuffer, Fw::ActiveComponentExitSerializableBuffer, Fw::ComBuffer, Fw::CmdArgBuffer, and Drv::DataBuffer.
const U8 * Fw::SerializeBufferBase::getBuffAddrLeft | ( | ) | const |
gets address of remaining non-deserialized data.
gets address of end of serialization. Used to manually place data at the end
Definition at line 715 of file Serializable.cpp.
U8 * Fw::SerializeBufferBase::getBuffAddrSer | ( | ) |
gets address of end of serialization. DANGEROUS! Need to know max buffer size and adjust when done
Definition at line 720 of file Serializable.cpp.
|
pure virtual |
returns capacity, not current size, of buffer
Implemented in Utils::HashBuffer, Fw::ExternalSerializeBuffer, Fw::SerialBuffer, Fw::TlmBuffer, Fw::SmSignalBuffer, Fw::ParamBuffer, Fw::LogBuffer, Fw::ActiveComponentExitSerializableBuffer, Fw::ComBuffer, Fw::CmdArgBuffer, and Drv::DataBuffer.
Serializable::SizeType Fw::SerializeBufferBase::getBuffLeft | ( | ) | const |
returns how much deserialization buffer is left
Definition at line 676 of file Serializable.cpp.
Serializable::SizeType Fw::SerializeBufferBase::getBuffLength | ( | ) | const |
returns current buffer size
Definition at line 649 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::moveDeserToOffset | ( | FwSizeType | offset | ) |
Moves deserialization to the specified offset.
Definition at line 642 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::moveSerToOffset | ( | FwSizeType | offset | ) |
Moves serialization to the specified offset.
Definition at line 636 of file Serializable.cpp.
|
protected |
copy assignment operator
Definition at line 56 of file Serializable.cpp.
void Fw::SerializeBufferBase::resetDeser | ( | ) |
reset deserialization to beginning
Definition at line 606 of file Serializable.cpp.
void Fw::SerializeBufferBase::resetSer | ( | ) |
reset to beginning of buffer to reuse for serialization
Definition at line 601 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::serialize | ( | bool | val | ) |
serialize boolean
Definition at line 203 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::serialize | ( | const Serializable & | val | ) |
serialize an object derived from serializable base class
Definition at line 260 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::serialize | ( | const SerializeBufferBase & | val | ) |
serialize a serialized buffer
Definition at line 264 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::serialize | ( | const U8 * | buff, |
FwSizeType | length, | ||
Serialization::t | mode | ||
) |
serialize a byte buffer of a given length
Serialize bytes from buff
up to length
. If serializationMode
is set to INCLUDE_LENGTH
then the length is included as the first token. Length may be omitted with OMIT_LENGTH
.
buff | buffer to serialize |
length | length of data to serialize |
mode | serialization type |
Definition at line 237 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::serialize | ( | const U8 * | buff, |
NATIVE_UINT_TYPE | length | ||
) |
serialize data buffer
Definition at line 228 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::serialize | ( | const U8 * | buff, |
NATIVE_UINT_TYPE | length, | ||
bool | noLength | ||
) |
serialize data buffer
Definition at line 232 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::serialize | ( | const void * | val | ) |
serialize pointer (careful, only pointer value, not contents are serialized)
Definition at line 220 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::serialize | ( | F32 | val | ) |
serialize 32-bit floating point
Definition at line 196 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::serialize | ( | I8 | val | ) |
serialize 8-bit signed int
Definition at line 75 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::serialize | ( | U8 | val | ) |
serialize 8-bit unsigned int
Definition at line 63 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::serializeSize | ( | const FwSizeType | size | ) |
serialize a size value
Definition at line 287 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::serializeSkip | ( | FwSizeType | numBytesToSkip | ) |
Skips the number of specified bytes for serialization.
Definition at line 610 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::setBuff | ( | const U8 * | src, |
Serializable::SizeType | length | ||
) |
sets buffer contents and size
Definition at line 653 of file Serializable.cpp.
SerializeStatus Fw::SerializeBufferBase::setBuffLen | ( | Serializable::SizeType | length | ) |
sets buffer length manually after filling with data
Definition at line 666 of file Serializable.cpp.