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  DEPRECATED(Serializable::SizeType getBuffCapacity() const, "Use getCapacity() instead");
32  Serializable::SizeType getCapacity() const; // !< returns capacity, not current size, of buffer
33 
34  U8* getBuffAddr();
35  const U8* getBuffAddr() const;
36 
37  private:
38  U8 m_bufferData[FW_SM_SIGNAL_BUFFER_MAX_SIZE]; // packet data buffer
39 };
40 
41 } // namespace Fw
42 
43 #endif
U16 FwSizeStoreType
The type used to serialize a size value.
FwSizeType SizeType
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
SmSignalBuffer & operator=(const SmSignalBuffer &other)
Serializable::SizeType getCapacity() const
Get buffer capacity.
U8 * getBuffAddr()
Get buffer address for data filling (non-const version)
Implementation of malloc based allocator.
DEPRECATED(Serializable::SizeType getBuffCapacity() const, "Use getCapacity() instead")