F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
Fw::SerializeBufferBase Class Referenceabstract

#include <Fw/Types/Serializable.hpp>

Inheritance diagram for Fw::SerializeBufferBase:
Drv::DataBuffer Fw::ActiveComponentExitSerializableBuffer Fw::CmdArgBuffer Fw::ComBuffer Fw::ExternalSerializeBuffer Fw::LogBuffer Fw::ParamBuffer Fw::SerialBuffer Fw::SmSignalBuffer Fw::TlmBuffer Utils::HashBuffer

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 U8getBuffAddr ()=0
 gets buffer address for data filling More...
 
virtual const U8getBuffAddr () const =0
 gets buffer address for data reading, const version More...
 
const U8getBuffAddrLeft () const
 gets address of remaining non-deserialized data. More...
 
U8getBuffAddrSer ()
 
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

SerializeBufferBaseoperator= (const SerializeBufferBase &src)
 copy assignment operator More...
 
 SerializeBufferBase ()
 default constructor More...
 

Detailed Description

Definition at line 54 of file Serializable.hpp.

Constructor & Destructor Documentation

◆ ~SerializeBufferBase()

Fw::SerializeBufferBase::~SerializeBufferBase ( )
virtual

destructor

Definition at line 41 of file Serializable.cpp.

◆ SerializeBufferBase()

Fw::SerializeBufferBase::SerializeBufferBase ( )
protected

default constructor

Definition at line 39 of file Serializable.cpp.

Member Function Documentation

◆ copyRaw()

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.

◆ copyRawOffset()

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.

◆ deserialize() [1/10]

SerializeStatus Fw::SerializeBufferBase::deserialize ( bool &  val)

deserialize boolean

Definition at line 464 of file Serializable.cpp.

◆ deserialize() [2/10]

SerializeStatus Fw::SerializeBufferBase::deserialize ( F32 val)

deserialize 32-bit floating point

Definition at line 495 of file Serializable.cpp.

◆ deserialize() [3/10]

SerializeStatus Fw::SerializeBufferBase::deserialize ( I8 val)

deserialize 8-bit signed int

Definition at line 314 of file Serializable.cpp.

◆ deserialize() [4/10]

SerializeStatus Fw::SerializeBufferBase::deserialize ( Serializable val)

deserialize an object derived from serializable base class

Definition at line 556 of file Serializable.cpp.

◆ deserialize() [5/10]

SerializeStatus Fw::SerializeBufferBase::deserialize ( SerializeBufferBase val)

serialize a serialized buffer

Definition at line 560 of file Serializable.cpp.

◆ deserialize() [6/10]

SerializeStatus Fw::SerializeBufferBase::deserialize ( U8 val)

deserialize 8-bit unsigned int

Definition at line 300 of file Serializable.cpp.

◆ deserialize() [7/10]

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.

Parameters
buffbuffer to hold deserialized data
lengthlength of data to deserialize length is filled with deserialized length
modedeserialization type
Returns
status of serialization

Definition at line 522 of file Serializable.cpp.

◆ deserialize() [8/10]

SerializeStatus Fw::SerializeBufferBase::deserialize ( U8 buff,
NATIVE_UINT_TYPE length 
)

deserialize data buffer

Definition at line 507 of file Serializable.cpp.

◆ deserialize() [9/10]

SerializeStatus Fw::SerializeBufferBase::deserialize ( U8 buff,
NATIVE_UINT_TYPE length,
bool  noLength 
)

deserialize data buffer

Definition at line 514 of file Serializable.cpp.

◆ deserialize() [10/10]

SerializeStatus Fw::SerializeBufferBase::deserialize ( void *&  val)

deserialize point value (careful, pointer value only, not contents)

Definition at line 485 of file Serializable.cpp.

◆ deserializeSize()

SerializeStatus Fw::SerializeBufferBase::deserializeSize ( FwSizeType size)

deserialize a size value

Definition at line 592 of file Serializable.cpp.

◆ deserializeSkip()

SerializeStatus Fw::SerializeBufferBase::deserializeSkip ( FwSizeType  numBytesToSkip)

Skips the number of specified bytes for deserialization.

Definition at line 624 of file Serializable.cpp.

◆ getBuffAddr() [1/2]

virtual const U8* Fw::SerializeBufferBase::getBuffAddr ( ) const
pure virtual

◆ getBuffAddr() [2/2]

virtual U8* Fw::SerializeBufferBase::getBuffAddr ( )
pure virtual

◆ getBuffAddrLeft()

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.

◆ getBuffAddrSer()

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.

◆ getBuffCapacity()

virtual Serializable::SizeType Fw::SerializeBufferBase::getBuffCapacity ( ) const
pure virtual

◆ getBuffLeft()

Serializable::SizeType Fw::SerializeBufferBase::getBuffLeft ( ) const

returns how much deserialization buffer is left

Definition at line 676 of file Serializable.cpp.

◆ getBuffLength()

Serializable::SizeType Fw::SerializeBufferBase::getBuffLength ( ) const

returns current buffer size

Definition at line 649 of file Serializable.cpp.

◆ moveDeserToOffset()

SerializeStatus Fw::SerializeBufferBase::moveDeserToOffset ( FwSizeType  offset)

Moves deserialization to the specified offset.

Definition at line 642 of file Serializable.cpp.

◆ moveSerToOffset()

SerializeStatus Fw::SerializeBufferBase::moveSerToOffset ( FwSizeType  offset)

Moves serialization to the specified offset.

Definition at line 636 of file Serializable.cpp.

◆ operator=()

SerializeBufferBase & Fw::SerializeBufferBase::operator= ( const SerializeBufferBase src)
protected

copy assignment operator

Definition at line 56 of file Serializable.cpp.

◆ resetDeser()

void Fw::SerializeBufferBase::resetDeser ( )

reset deserialization to beginning

Definition at line 606 of file Serializable.cpp.

◆ resetSer()

void Fw::SerializeBufferBase::resetSer ( )

reset to beginning of buffer to reuse for serialization

Definition at line 601 of file Serializable.cpp.

◆ serialize() [1/10]

SerializeStatus Fw::SerializeBufferBase::serialize ( bool  val)

serialize boolean

Definition at line 203 of file Serializable.cpp.

◆ serialize() [2/10]

SerializeStatus Fw::SerializeBufferBase::serialize ( const Serializable val)

serialize an object derived from serializable base class

Definition at line 260 of file Serializable.cpp.

◆ serialize() [3/10]

SerializeStatus Fw::SerializeBufferBase::serialize ( const SerializeBufferBase val)

serialize a serialized buffer

Definition at line 264 of file Serializable.cpp.

◆ serialize() [4/10]

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.

Parameters
buffbuffer to serialize
lengthlength of data to serialize
modeserialization type
Returns
status of serialization

Definition at line 237 of file Serializable.cpp.

◆ serialize() [5/10]

SerializeStatus Fw::SerializeBufferBase::serialize ( const U8 buff,
NATIVE_UINT_TYPE  length 
)

serialize data buffer

Definition at line 228 of file Serializable.cpp.

◆ serialize() [6/10]

SerializeStatus Fw::SerializeBufferBase::serialize ( const U8 buff,
NATIVE_UINT_TYPE  length,
bool  noLength 
)

serialize data buffer

Definition at line 232 of file Serializable.cpp.

◆ serialize() [7/10]

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.

◆ serialize() [8/10]

SerializeStatus Fw::SerializeBufferBase::serialize ( F32  val)

serialize 32-bit floating point

Definition at line 196 of file Serializable.cpp.

◆ serialize() [9/10]

SerializeStatus Fw::SerializeBufferBase::serialize ( I8  val)

serialize 8-bit signed int

Definition at line 75 of file Serializable.cpp.

◆ serialize() [10/10]

SerializeStatus Fw::SerializeBufferBase::serialize ( U8  val)

serialize 8-bit unsigned int

Definition at line 63 of file Serializable.cpp.

◆ serializeSize()

SerializeStatus Fw::SerializeBufferBase::serializeSize ( const FwSizeType  size)

serialize a size value

Definition at line 287 of file Serializable.cpp.

◆ serializeSkip()

SerializeStatus Fw::SerializeBufferBase::serializeSkip ( FwSizeType  numBytesToSkip)

Skips the number of specified bytes for serialization.

Definition at line 610 of file Serializable.cpp.

◆ setBuff()

SerializeStatus Fw::SerializeBufferBase::setBuff ( const U8 src,
Serializable::SizeType  length 
)

sets buffer contents and size

Definition at line 653 of file Serializable.cpp.

◆ setBuffLen()

SerializeStatus Fw::SerializeBufferBase::setBuffLen ( Serializable::SizeType  length)

sets buffer length manually after filling with data

Definition at line 666 of file Serializable.cpp.


The documentation for this class was generated from the following files: