F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
PrmBuffer.hpp
Go to the documentation of this file.
1 /*
2  * PrmBuffer.hpp
3  *
4  * Created on: Sep 10, 2012
5  * Author: ppandian
6  */
7 
8 /*
9  * Description:
10  * This object contains the ParamBuffer type, used for storing parameters
11  */
12 #ifndef FW_PRM_BUFFER_HPP
13 #define FW_PRM_BUFFER_HPP
14 
15 #include <Fw/FPrimeBasicTypes.hpp>
17 
18 #include "Fw/Types/StringBase.hpp"
19 
20 namespace Fw {
21 
23  "param string must fit into param buffer");
24 
25 class ParamBuffer final : public LinearBufferBase {
26  public:
28 
29  ParamBuffer(const U8* args, FwSizeType size);
30  ParamBuffer();
31  ParamBuffer(const ParamBuffer& other);
32  virtual ~ParamBuffer();
33  ParamBuffer& operator=(const ParamBuffer& other);
34 
35  DEPRECATED(FwSizeType getBuffCapacity() const, "Use getCapacity() instead");
36  FwSizeType getCapacity() const; // !< returns capacity, not current size, of buffer
37 
38  U8* getBuffAddr();
39  const U8* getBuffAddr() const;
40 
41  private:
42  U8 m_bufferData[FW_PARAM_BUFFER_MAX_SIZE]; // command argument buffer
43 };
44 
45 } // namespace Fw
46 
47 #endif
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
DEPRECATED(FwSizeType getBuffCapacity() const, "Use getCapacity() instead")
static constexpr Serializable::SizeType STATIC_SERIALIZED_SIZE(Serializable::SizeType maxSize)
Get the static serialized size of a buffer This is the max size of the buffer data plus the size of t...
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
Declares F Prime string base class.
Implementation of malloc based allocator.
static constexpr SizeType BUFFER_SIZE(SizeType maxLength)
Get the size of a null-terminated string buffer.
virtual ~ParamBuffer()
Definition: PrmBuffer.cpp:13