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>
16 #include <Fw/Types/SerIds.hpp>
18 
19 #include "Fw/Types/StringBase.hpp"
20 
21 namespace Fw {
22 
24  "param string must fit into param buffer");
25 
26 class ParamBuffer final : public SerializeBufferBase {
27  public:
28  enum {
31  };
32 
33  ParamBuffer(const U8* args, FwSizeType size);
34  ParamBuffer();
35  ParamBuffer(const ParamBuffer& other);
36  virtual ~ParamBuffer();
37  ParamBuffer& operator=(const ParamBuffer& other);
38 
39  DEPRECATED(FwSizeType getBuffCapacity() const, "Use getCapacity() instead");
40  FwSizeType getCapacity() const; // !< returns capacity, not current size, of buffer
41 
42  U8* getBuffAddr();
43  const U8* getBuffAddr() const;
44 
45  private:
46  U8 m_bufferData[FW_PARAM_BUFFER_MAX_SIZE]; // command argument buffer
47 };
48 
49 } // namespace Fw
50 
51 #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
FwSizeStoreType FwBuffSizeType
DEPRECATED(FwSizeType getBuffCapacity() const, "Use getCapacity() instead")
Definitions for ISF type serial IDs.
Parameter Buffer type id.
Definition: SerIds.hpp:51
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