F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CmdArgBuffer.hpp
Go to the documentation of this file.
1 /*
2  *
3  *
4  * Created on: March 1, 2014
5  * Author: T. Canham
6  */
7 
8 /*
9  * Description:
10  * This object contains the CmdARgBuffer type, used for holding the serialized arguments of commands
11  */
12 #ifndef FW_CMD_ARG_BUFFER_HPP
13 #define FW_CMD_ARG_BUFFER_HPP
14 
15 #include <Fw/FPrimeBasicTypes.hpp>
16 #include <Fw/Types/SerIds.hpp>
18 
19 namespace Fw {
20 
21 class CmdArgBuffer final : public SerializeBufferBase {
22  public:
23  enum {
26  };
27 
28  CmdArgBuffer(const U8* args, FwSizeType size);
29  CmdArgBuffer();
30  CmdArgBuffer(const CmdArgBuffer& other);
31  virtual ~CmdArgBuffer();
32  CmdArgBuffer& operator=(const CmdArgBuffer& other);
33 
34  FwSizeType getBuffCapacity() const;
35  U8* getBuffAddr();
36  const U8* getBuffAddr() const;
37 
38  private:
39  U8 m_bufferData[FW_CMD_ARG_BUFFER_MAX_SIZE];
40 };
41 
42 } // namespace Fw
43 
44 #endif
FwSizeType getBuffCapacity() const
return capacity of buffer (how much it can hold)
PlatformSizeType FwSizeType
virtual ~CmdArgBuffer()
destructor
type id for CmdArgBuffer
U8 * getBuffAddr()
return address of buffer (non const version)
Definitions for ISF type serial IDs.
Command Buffer type id.
Definition: SerIds.hpp:45
#define FW_CMD_ARG_BUFFER_MAX_SIZE
Definition: FpConfig.h:181
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
CmdArgBuffer()
default constructor
CmdArgBuffer & operator=(const CmdArgBuffer &other)
Equal operator.
size when serialized. Buffer + size of buffer