F´ Flight Software - C/C++ Documentation NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CmdArgBuffer.cpp
Go to the documentation of this file.
2#include <Fw/Types/Assert.hpp>
3
4namespace Fw {
5
7 SerializeStatus stat = this->setBuff(args,size);
8 FW_ASSERT(FW_SERIALIZE_OK == stat,static_cast<NATIVE_INT_TYPE>(stat));
9 }
10
13
16
18 SerializeStatus stat = this->setBuff(other.m_bufferData,other.getBuffLength());
19 FW_ASSERT(FW_SERIALIZE_OK == stat,static_cast<NATIVE_INT_TYPE>(stat));
20 }
21
23 if(this == &other) {
24 return *this;
25 }
26
27 SerializeStatus stat = this->setBuff(other.m_bufferData,other.getBuffLength());
28 FW_ASSERT(FW_SERIALIZE_OK == stat,static_cast<NATIVE_INT_TYPE>(stat));
29 return *this;
30 }
31
33 return sizeof(this->m_bufferData);
34 }
35
37 return this->m_bufferData;
38 }
39
41 return this->m_bufferData;
42 }
43
44}
45
#define FW_ASSERT(...)
Definition Assert.hpp:7
PlatformIntType NATIVE_INT_TYPE
Definition BasicTypes.h:51
uint8_t U8
8-bit unsigned integer
Definition BasicTypes.h:26
PlatformUIntType NATIVE_UINT_TYPE
Definition BasicTypes.h:52
U8 * getBuffAddr()
return address of buffer (non const version)
CmdArgBuffer & operator=(const CmdArgBuffer &other)
Equal operator.
NATIVE_UINT_TYPE getBuffCapacity() const
return capacity of buffer (how much it can hold)
virtual ~CmdArgBuffer()
destructor
CmdArgBuffer()
default constructor
SerializeStatus setBuff(const U8 *src, NATIVE_UINT_TYPE length)
sets buffer contents and size
NATIVE_UINT_TYPE getBuffLength() const
returns current buffer size
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.