![]()  | 
  
    F´ Flight Software - C/C++ Documentation
    devel
    
   A framework for building embedded system applications to NASA flight quality standards. 
   | 
 
A variable-length serializable buffer. More...
#include <Fw/Types/SerialBuffer.hpp>
  
Public Member Functions | |
| SerialBuffer (U8 *const data, const U32 capacity) | |
| NATIVE_UINT_TYPE | getBuffCapacity () const | 
| returns capacity, not current size, of buffer  More... | |
| U8 * | getBuffAddr () | 
| gets buffer address for data filling  More... | |
| const U8 * | getBuffAddr () const | 
| gets buffer address for data reading, const version  More... | |
| void | fill () | 
| Fill the buffer to capacity with preexisting data.  More... | |
| SerializeStatus | pushBytes (const U8 *const addr, const NATIVE_UINT_TYPE n) | 
| Push n bytes onto the buffer.  More... | |
| SerializeStatus | popBytes (U8 *const addr, NATIVE_UINT_TYPE n) | 
| Pop n bytes off the buffer.  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 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... | |
Additional Inherited Members | |
  Protected Member Functions inherited from Fw::SerializeBufferBase | |
| SerializeBufferBase & | operator= (const SerializeBufferBase &src) | 
| copy assignment operator  More... | |
| SerializeBufferBase () | |
| default constructor  More... | |
A variable-length serializable buffer.
Definition at line 24 of file SerialBuffer.hpp.
| Fw::SerialBuffer::SerialBuffer | ( | U8 *const | data, | 
| const U32 | capacity | ||
| ) | 
Construct a SerialBuffer
| data | Pointer to the data | 
| capacity | The buffer capacity | 
Definition at line 18 of file SerialBuffer.cpp.
| void Fw::SerialBuffer::fill | ( | ) | 
Fill the buffer to capacity with preexisting data.
Definition at line 32 of file SerialBuffer.cpp.
      
  | 
  virtual | 
gets buffer address for data filling
Implements Fw::SerializeBufferBase.
Definition at line 24 of file SerialBuffer.cpp.
      
  | 
  virtual | 
gets buffer address for data reading, const version
Implements Fw::SerializeBufferBase.
Definition at line 28 of file SerialBuffer.cpp.
      
  | 
  virtual | 
returns capacity, not current size, of buffer
Implements Fw::SerializeBufferBase.
Definition at line 20 of file SerialBuffer.cpp.
| SerializeStatus Fw::SerialBuffer::popBytes | ( | U8 *const | addr, | 
| NATIVE_UINT_TYPE | n | ||
| ) | 
Pop n bytes off the buffer.
| addr | Address of bytes to pop | 
| n | Number of bytes to pop | 
Definition at line 42 of file SerialBuffer.cpp.
| SerializeStatus Fw::SerialBuffer::pushBytes | ( | const U8 *const | addr, | 
| const NATIVE_UINT_TYPE | n | ||
| ) | 
Push n bytes onto the buffer.
| addr | Address of bytes to push | 
| n | Number of bytes | 
Definition at line 37 of file SerialBuffer.cpp.