F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
SmSignalBuffer.hpp
Go to the documentation of this file.
1 /*
2  * SmSignalBuffer.hpp
3  *
4  */
5 
6 /*
7  * Description:
8  * This object contains the SmSignalBuffer type, used for attaching data to state machine signals
9  */
10 #ifndef FW_SM_SIGNAL_BUFFER_HPP
11 #define FW_SM_SIGNAL_BUFFER_HPP
12 
13 #include <Fw/FPrimeBasicTypes.hpp>
15 
16 namespace Fw {
17 
18 class SmSignalBuffer final : public SerializeBufferBase {
19  public:
20  enum {
22  SERIALIZED_SIZE = FW_COM_BUFFER_MAX_SIZE + sizeof(FwSizeStoreType) // size of buffer + storage of size word
23  };
24 
25  SmSignalBuffer(const U8* args, Serializable::SizeType size);
27  SmSignalBuffer(const SmSignalBuffer& other);
28  virtual ~SmSignalBuffer();
30 
31  Serializable::SizeType getBuffCapacity() const; // !< returns capacity, not current size, of buffer
32  U8* getBuffAddr();
33  const U8* getBuffAddr() const;
34 
35  private:
36  U8 m_bufferData[FW_SM_SIGNAL_BUFFER_MAX_SIZE]; // packet data buffer
37 };
38 
39 } // namespace Fw
40 
41 #endif
U16 FwSizeStoreType
The type used to serialize a size value.
FwSizeType SizeType
#define FW_COM_BUFFER_MAX_SIZE
Definition: FpConfig.h:170
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
SmSignalBuffer & operator=(const SmSignalBuffer &other)
#define FW_SM_SIGNAL_BUFFER_MAX_SIZE
Definition: FpConfig.h:175
U8 * getBuffAddr()
gets buffer address for data filling
Serializable::SizeType getBuffCapacity() const
returns capacity, not current size, of buffer