F´ Flight Software - C/C++ Documentation NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
Utils::HashBuffer Class Reference

A container class for holding a hash buffer. More...

#include <Utils/Hash/HashBuffer.hpp>

Inheritance diagram for Utils::HashBuffer:
Fw::SerializeBufferBase

Public Member Functions

 HashBuffer (const U8 *args, NATIVE_UINT_TYPE size)
 
 HashBuffer (const HashBuffer &other)
 
 HashBuffer ()
 
virtual ~HashBuffer ()
 
HashBufferoperator= (const HashBuffer &other)
 
bool operator== (const HashBuffer &other) const
 
bool operator!= (const HashBuffer &other) const
 
NATIVE_UINT_TYPE getBuffCapacity () const
 
U8getBuffAddr ()
 
const U8getBuffAddr () const
 gets buffer address for data reading, const version
 
- Public Member Functions inherited from Fw::SerializeBufferBase
SerializeBufferBaseoperator= (const SerializeBufferBase &src)
 equal operator
 
virtual ~SerializeBufferBase ()
 destructor
 
SerializeStatus serialize (U8 val)
 serialize 8-bit unsigned int
 
SerializeStatus serialize (I8 val)
 serialize 8-bit signed int
 
SerializeStatus serialize (F32 val)
 serialize 32-bit floating point
 
SerializeStatus serialize (bool val)
 serialize boolean
 
SerializeStatus serialize (const void *val)
 serialize pointer (careful, only pointer value, not contents are serialized)
 
SerializeStatus serialize (const U8 *buff, NATIVE_UINT_TYPE length, bool noLength=false)
 serialize data buffer
 
SerializeStatus serialize (const SerializeBufferBase &val)
 serialize a serialized buffer
 
SerializeStatus serialize (const Serializable &val)
 serialize an object derived from serializable base class
 
SerializeStatus deserialize (U8 &val)
 deserialize 8-bit unsigned int
 
SerializeStatus deserialize (I8 &val)
 deserialize 8-bit signed int
 
SerializeStatus deserialize (F32 &val)
 deserialize 32-bit floating point
 
SerializeStatus deserialize (bool &val)
 deserialize boolean
 
SerializeStatus deserialize (void *&val)
 deserialize point value (careful, pointer value only, not contents)
 
SerializeStatus deserialize (U8 *buff, NATIVE_UINT_TYPE &length, bool noLength=false)
 deserialize data buffer
 
SerializeStatus deserialize (Serializable &val)
 deserialize an object derived from serializable base class
 
SerializeStatus deserialize (SerializeBufferBase &val)
 serialize a serialized buffer
 
void resetSer ()
 reset to beginning of buffer to reuse for serialization
 
void resetDeser ()
 reset deserialization to beginning
 
SerializeStatus deserializeSkip (NATIVE_UINT_TYPE numBytesToSkip)
 Skips the number of specified bytes for deserialization.
 
virtual NATIVE_UINT_TYPE getBuffCapacity () const =0
 returns capacity, not current size, of buffer
 
NATIVE_UINT_TYPE getBuffLength () const
 returns current buffer size
 
NATIVE_UINT_TYPE getBuffLeft () const
 returns how much deserialization buffer is left
 
virtual U8getBuffAddr ()=0
 gets buffer address for data filling
 
virtual const U8getBuffAddr () const =0
 gets buffer address for data reading, const version
 
const U8getBuffAddrLeft () const
 gets address of remaining non-deserialized data.
 
U8getBuffAddrSer ()
 gets address of end of serialization. DANGEROUS! Need to know max buffer size and adjust when done
 
SerializeStatus setBuff (const U8 *src, NATIVE_UINT_TYPE length)
 sets buffer contents and size
 
SerializeStatus setBuffLen (NATIVE_UINT_TYPE length)
 sets buffer length manually after filling with data
 
SerializeStatus copyRaw (SerializeBufferBase &dest, NATIVE_UINT_TYPE size)
 directly copies buffer without looking for a size in the stream.
 
SerializeStatus copyRawOffset (SerializeBufferBase &dest, NATIVE_UINT_TYPE size)
 directly copies buffer without looking for a size in the stream.
 

Additional Inherited Members

- Protected Member Functions inherited from Fw::SerializeBufferBase
 SerializeBufferBase ()
 default constructor
 

Detailed Description

A container class for holding a hash buffer.

Definition at line 26 of file HashBuffer.hpp.

Constructor & Destructor Documentation

◆ HashBuffer() [1/3]

Utils::HashBuffer::HashBuffer ( const U8 args,
NATIVE_UINT_TYPE  size 
)

Construct a HashBuffer object

Definition at line 9 of file HashBufferCommon.cpp.

◆ HashBuffer() [2/3]

Utils::HashBuffer::HashBuffer ( const HashBuffer other)

Definition at line 17 of file HashBufferCommon.cpp.

◆ HashBuffer() [3/3]

Utils::HashBuffer::HashBuffer ( )

Definition at line 6 of file HashBufferCommon.cpp.

◆ ~HashBuffer()

Utils::HashBuffer::~HashBuffer ( )
virtual

Destroy a HashBuffer object

Definition at line 14 of file HashBufferCommon.cpp.

Member Function Documentation

◆ getBuffAddr() [1/2]

U8 * Utils::HashBuffer::getBuffAddr ( )
virtual

Get a pointer to the buffer within the hash buffer

Implements Fw::SerializeBufferBase.

Definition at line 48 of file HashBufferCommon.cpp.

◆ getBuffAddr() [2/2]

const U8 * Utils::HashBuffer::getBuffAddr ( ) const
virtual

gets buffer address for data reading, const version

Implements Fw::SerializeBufferBase.

Definition at line 44 of file HashBufferCommon.cpp.

◆ getBuffCapacity()

NATIVE_UINT_TYPE Utils::HashBuffer::getBuffCapacity ( ) const
virtual

Get the total buffer length of a hash buffer

Implements Fw::SerializeBufferBase.

Definition at line 52 of file HashBufferCommon.cpp.

◆ operator!=()

bool Utils::HashBuffer::operator!= ( const HashBuffer other) const

Compare two hash buffers for inequality

Definition at line 40 of file HashBufferCommon.cpp.

◆ operator=()

HashBuffer & Utils::HashBuffer::operator= ( const HashBuffer other)

Assign a hash buffer from another hash buffer

Definition at line 22 of file HashBufferCommon.cpp.

◆ operator==()

bool Utils::HashBuffer::operator== ( const HashBuffer other) const

Compare two hash buffers for equality

Definition at line 32 of file HashBufferCommon.cpp.


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