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  FwSizeType getBuffCapacity() const; // !< returns capacity, not current size, of buffer
40  U8* getBuffAddr();
41  const U8* getBuffAddr() const;
42 
43  private:
44  U8 m_bufferData[FW_PARAM_BUFFER_MAX_SIZE]; // command argument buffer
45 };
46 
47 } // namespace Fw
48 
49 #endif
U8 * getBuffAddr()
gets buffer address for data filling
Definition: PrmBuffer.cpp:38
PlatformSizeType FwSizeType
ParamBuffer & operator=(const ParamBuffer &other)
Definition: PrmBuffer.cpp:20
FwSizeStoreType FwBuffSizeType
Definitions for ISF type serial IDs.
#define FW_PARAM_STRING_MAX_SIZE
Max size of parameter string type.
Definition: FpConfig.h:232
#define FW_PARAM_BUFFER_MAX_SIZE
Definition: FpConfig.h:227
FwSizeType getBuffCapacity() const
returns capacity, not current size, of buffer
Definition: PrmBuffer.cpp:30
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
static constexpr SizeType BUFFER_SIZE(SizeType maxLength)
Get the size of a null-terminated string buffer.
Definition: StringBase.hpp:42
Parameter Buffer type id.
Definition: SerIds.hpp:51
Declares F Prime string base class.
virtual ~ParamBuffer()
Definition: PrmBuffer.cpp:13