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

#include <Fw/Cmd/CmdArgBuffer.hpp>

Inheritance diagram for Fw::CmdArgBuffer:
Fw::SerializeBufferBase

Public Types

enum  { SERIALIZED_TYPE_ID = FW_TYPEID_CMD_BUFF , SERIALIZED_SIZE = FW_CMD_ARG_BUFFER_MAX_SIZE + sizeof(I32) }
 

Public Member Functions

 CmdArgBuffer (const U8 *args, NATIVE_UINT_TYPE size)
 buffer source constructor More...
 
 CmdArgBuffer ()
 default constructor More...
 
 CmdArgBuffer (const CmdArgBuffer &other)
 other arg buffer constructor More...
 
virtual ~CmdArgBuffer ()
 destructor More...
 
CmdArgBufferoperator= (const CmdArgBuffer &other)
 Equal operator. More...
 
NATIVE_UINT_TYPE getBuffCapacity () const
 return capacity of buffer (how much it can hold) More...
 
U8getBuffAddr ()
 return address of buffer (non const version) More...
 
const U8getBuffAddr () const
 return address of buffer (const version) 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...
 

Additional Inherited Members

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

Detailed Description

Definition at line 21 of file CmdArgBuffer.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
SERIALIZED_TYPE_ID 

type id for CmdArgBuffer

SERIALIZED_SIZE 

size when serialized. Buffer + size of buffer

Definition at line 24 of file CmdArgBuffer.hpp.

Constructor & Destructor Documentation

◆ CmdArgBuffer() [1/3]

Fw::CmdArgBuffer::CmdArgBuffer ( const U8 args,
NATIVE_UINT_TYPE  size 
)

buffer source constructor

Definition at line 6 of file CmdArgBuffer.cpp.

◆ CmdArgBuffer() [2/3]

Fw::CmdArgBuffer::CmdArgBuffer ( )

default constructor

Definition at line 11 of file CmdArgBuffer.cpp.

◆ CmdArgBuffer() [3/3]

Fw::CmdArgBuffer::CmdArgBuffer ( const CmdArgBuffer other)

other arg buffer constructor

Definition at line 17 of file CmdArgBuffer.cpp.

◆ ~CmdArgBuffer()

Fw::CmdArgBuffer::~CmdArgBuffer ( )
virtual

destructor

Definition at line 14 of file CmdArgBuffer.cpp.

Member Function Documentation

◆ getBuffAddr() [1/2]

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

return address of buffer (non const version)

Implements Fw::SerializeBufferBase.

Definition at line 40 of file CmdArgBuffer.cpp.

◆ getBuffAddr() [2/2]

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

return address of buffer (const version)

Implements Fw::SerializeBufferBase.

Definition at line 36 of file CmdArgBuffer.cpp.

◆ getBuffCapacity()

NATIVE_UINT_TYPE Fw::CmdArgBuffer::getBuffCapacity ( ) const
virtual

return capacity of buffer (how much it can hold)

Implements Fw::SerializeBufferBase.

Definition at line 32 of file CmdArgBuffer.cpp.

◆ operator=()

CmdArgBuffer & Fw::CmdArgBuffer::operator= ( const CmdArgBuffer other)

Equal operator.

Definition at line 22 of file CmdArgBuffer.cpp.


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