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

External serialize buffer with no copy semantics. More...

#include <Fw/Types/Serializable.hpp>

Inheritance diagram for Fw::ExternalSerializeBuffer:
Fw::SerializeBufferBase Fw::ExternalSerializeBufferWithDataCopy Fw::ExternalSerializeBufferWithMemberCopy

Public Member Functions

 ExternalSerializeBuffer (U8 *buffPtr, Serializable::SizeType size)
 construct with external buffer More...
 
 ExternalSerializeBuffer ()
 default constructor More...
 
 ~ExternalSerializeBuffer ()
 
void setExtBuffer (U8 *buffPtr, Serializable::SizeType size)
 
void clear ()
 clear external buffer More...
 
 ExternalSerializeBuffer (const ExternalSerializeBuffer &src)=delete
 deleted copy constructor More...
 
Serializable::SizeType getBuffCapacity () const
 returns capacity, not current size, of buffer More...
 
U8getBuffAddr ()
 gets buffer address for data filling More...
 
const U8getBuffAddr () const
 gets buffer address for data reading, const version More...
 
ExternalSerializeBufferoperator= (const SerializeBufferBase &src)=delete
 deleted copy assignment operator More...
 
- Public Member Functions inherited from Fw::SerializeBufferBase
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...
 
Serializable::SizeType getBuffLength () const
 returns current buffer size More...
 
Serializable::SizeType getBuffLeft () const
 returns how much deserialization buffer is left 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 Attributes

U8m_buff
 pointer to external buffer More...
 
Serializable::SizeType m_buffSize
 size of external buffer More...
 

Additional Inherited Members

- Protected Member Functions inherited from Fw::SerializeBufferBase
SerializeBufferBaseoperator= (const SerializeBufferBase &src)
 copy assignment operator More...
 
 SerializeBufferBase ()
 default constructor More...
 

Detailed Description

External serialize buffer with no copy semantics.

Definition at line 208 of file Serializable.hpp.

Constructor & Destructor Documentation

◆ ExternalSerializeBuffer() [1/3]

Fw::ExternalSerializeBuffer::ExternalSerializeBuffer ( U8 buffPtr,
Serializable::SizeType  size 
)

construct with external buffer

Definition at line 758 of file Serializable.cpp.

◆ ExternalSerializeBuffer() [2/3]

Fw::ExternalSerializeBuffer::ExternalSerializeBuffer ( )

default constructor

Definition at line 762 of file Serializable.cpp.

◆ ~ExternalSerializeBuffer()

Fw::ExternalSerializeBuffer::~ExternalSerializeBuffer ( )
inline

destructor

Definition at line 212 of file Serializable.hpp.

◆ ExternalSerializeBuffer() [3/3]

Fw::ExternalSerializeBuffer::ExternalSerializeBuffer ( const ExternalSerializeBuffer src)
delete

deleted copy constructor

Member Function Documentation

◆ clear()

void Fw::ExternalSerializeBuffer::clear ( )

clear external buffer

Definition at line 773 of file Serializable.cpp.

◆ getBuffAddr() [1/2]

U8 * Fw::ExternalSerializeBuffer::getBuffAddr ( )
virtual

gets buffer address for data filling

Implements Fw::SerializeBufferBase.

Definition at line 784 of file Serializable.cpp.

◆ getBuffAddr() [2/2]

const U8 * Fw::ExternalSerializeBuffer::getBuffAddr ( ) const
virtual

gets buffer address for data reading, const version

Implements Fw::SerializeBufferBase.

Definition at line 788 of file Serializable.cpp.

◆ getBuffCapacity()

Serializable::SizeType Fw::ExternalSerializeBuffer::getBuffCapacity ( ) const
virtual

returns capacity, not current size, of buffer

Implements Fw::SerializeBufferBase.

Definition at line 780 of file Serializable.cpp.

◆ operator=()

ExternalSerializeBuffer& Fw::ExternalSerializeBuffer::operator= ( const SerializeBufferBase src)
delete

deleted copy assignment operator

◆ setExtBuffer()

void Fw::ExternalSerializeBuffer::setExtBuffer ( U8 buffPtr,
Serializable::SizeType  size 
)

Set the external buffer This action also resets the serialization and deserialization pointers

Definition at line 766 of file Serializable.cpp.

Member Data Documentation

◆ m_buff

U8* Fw::ExternalSerializeBuffer::m_buff
protected

pointer to external buffer

Definition at line 229 of file Serializable.hpp.

◆ m_buffSize

Serializable::SizeType Fw::ExternalSerializeBuffer::m_buffSize
protected

size of external buffer

Definition at line 230 of file Serializable.hpp.


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