F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
PrmBuffer.cpp
Go to the documentation of this file.
1 #include <Fw/Prm/PrmBuffer.hpp>
2 #include <Fw/Types/Assert.hpp>
3 
4 namespace Fw {
5 
8  FW_ASSERT(FW_SERIALIZE_OK == stat, static_cast<FwAssertArgType>(stat));
9 }
10 
12 
14 
16  SerializeStatus stat = SerializeBufferBase::setBuff(other.m_bufferData, other.getSize());
17  FW_ASSERT(FW_SERIALIZE_OK == stat, static_cast<FwAssertArgType>(stat));
18 }
19 
21  if (this == &other) {
22  return *this;
23  }
24 
25  SerializeStatus stat = SerializeBufferBase::setBuff(other.m_bufferData, other.getSize());
26  FW_ASSERT(FW_SERIALIZE_OK == stat, static_cast<FwAssertArgType>(stat));
27  return *this;
28 }
29 
31  return sizeof(this->m_bufferData);
32 }
33 
34 FwSizeType ParamBuffer::getBuffCapacity() const {
35  return this->getCapacity();
36 }
37 
38 const U8* ParamBuffer::getBuffAddr() const {
39  return this->m_bufferData;
40 }
41 
43  return this->m_bufferData;
44 }
45 
46 } // namespace Fw
Serialization/Deserialization operation was successful.
U8 * getBuffAddr()
Get buffer address for data filling (non-const version)
Definition: PrmBuffer.cpp:42
FwSizeType getCapacity() const
Get buffer capacity.
Definition: PrmBuffer.cpp:30
PlatformSizeType FwSizeType
ParamBuffer & operator=(const ParamBuffer &other)
Definition: PrmBuffer.cpp:20
Serializable::SizeType getSize() const override
Get current buffer size.
SerializeStatus
forward declaration for string
SerializeStatus setBuff(const U8 *src, Serializable::SizeType length) override
Set buffer contents from external source.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
Implementation of malloc based allocator.
#define FW_ASSERT(...)
Definition: Assert.hpp:14
virtual ~ParamBuffer()
Definition: PrmBuffer.cpp:13