F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
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>
17 
18 namespace Fw {
19 
20 class CmdArgBuffer final : public LinearBufferBase {
21  public:
22  enum {
25  };
26 
27  CmdArgBuffer(const U8* args, FwSizeType size);
28  CmdArgBuffer();
29  CmdArgBuffer(const CmdArgBuffer& other);
30  virtual ~CmdArgBuffer();
31  CmdArgBuffer& operator=(const CmdArgBuffer& other);
32 
33  DEPRECATED(FwSizeType getBuffCapacity() const, "Use getCapacity() instead");
34  FwSizeType getCapacity() const;
35 
36  U8* getBuffAddr();
37  const U8* getBuffAddr() const;
38 
39  private:
40  U8 m_bufferData[FW_CMD_ARG_BUFFER_MAX_SIZE];
41 };
42 
43 } // namespace Fw
44 
45 #endif
PlatformSizeType FwSizeType
virtual ~CmdArgBuffer()
destructor
U8 * getBuffAddr()
return address of buffer (non const version)
FwSizeType getCapacity() const
return capacity of buffer (how much it can hold)
size when serialized. Buffer + size of buffer
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
CmdArgBuffer()
default constructor
CmdArgBuffer & operator=(const CmdArgBuffer &other)
Equal operator.
Implementation of malloc based allocator.