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>
16 #include <Fw/Types/SerIds.hpp>
18 
19 namespace Fw {
20 
21 class CmdArgBuffer final : public LinearBufferBase {
22  public:
23  enum {
27  };
28 
29  CmdArgBuffer(const U8* args, FwSizeType size);
30  CmdArgBuffer();
31  CmdArgBuffer(const CmdArgBuffer& other);
32  virtual ~CmdArgBuffer();
33  CmdArgBuffer& operator=(const CmdArgBuffer& other);
34 
35  DEPRECATED(FwSizeType getBuffCapacity() const, "Use getCapacity() instead");
36  FwSizeType getCapacity() const;
37 
38  U8* getBuffAddr();
39  const U8* getBuffAddr() const;
40 
41  private:
42  U8 m_bufferData[FW_CMD_ARG_BUFFER_MAX_SIZE];
43 };
44 
45 } // namespace Fw
46 
47 #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)
DEPRECATED(FwSizeType getBuffCapacity() const, "Use getCapacity() instead")
Definitions for ISF type serial IDs.
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...
Command Buffer type id.
Definition: SerIds.hpp:45
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
CmdArgBuffer()
default constructor
size when serialized. Buffer + size of buffer
CmdArgBuffer & operator=(const CmdArgBuffer &other)
Equal operator.
Implementation of malloc based allocator.
type id for CmdArgBuffer