F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
PrmBuffer.hpp
Go to the documentation of this file.
1/*
2 * Cmd.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 <FpConfig.hpp>
17#include <Fw/Cfg/SerIds.hpp>
18
20
21
22namespace Fw {
23
25 "param string must fit into param buffer");
26
28 public:
29
30 enum {
33 };
34
35 ParamBuffer(const U8 *args, NATIVE_UINT_TYPE size);
37 ParamBuffer(const ParamBuffer& other);
38 virtual ~ParamBuffer();
39 ParamBuffer& operator=(const ParamBuffer& other);
40
41 NATIVE_UINT_TYPE getBuffCapacity() const; // !< returns capacity, not current size, of buffer
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}
50
51#endif
uint8_t U8
8-bit unsigned integer
Definition BasicTypes.h:30
PlatformUIntType NATIVE_UINT_TYPE
Definition BasicTypes.h:56
FwSizeStoreType FwBuffSizeType
Definition FpConfig.h:452
#define FW_PARAM_BUFFER_MAX_SIZE
Definition FpConfig.h:334
#define FW_PARAM_STRING_MAX_SIZE
Max size of parameter string type.
Definition FpConfig.h:339
C++-compatible configuration header for fprime configuration.
Definitions for ISF type serial IDs.
Declares F Prime string base class.
virtual ~ParamBuffer()
Definition PrmBuffer.cpp:14
NATIVE_UINT_TYPE getBuffCapacity() const
returns capacity, not current size, of buffer
Definition PrmBuffer.cpp:32
ParamBuffer & operator=(const ParamBuffer &other)
Definition PrmBuffer.cpp:22
U8 * getBuffAddr()
gets buffer address for data filling
Definition PrmBuffer.cpp:40
static constexpr SizeType BUFFER_SIZE(SizeType maxLength)
Get the size of a null-terminated string buffer.
@ FW_TYPEID_PRM_BUFF
Parameter Buffer type id.
Definition SerIds.hpp:51