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 LinearBufferBase {
19  public:
21 
22  SmSignalBuffer(const U8* args, Serializable::SizeType size);
24  SmSignalBuffer(const SmSignalBuffer& other);
25  virtual ~SmSignalBuffer();
27 
28  DEPRECATED(Serializable::SizeType getBuffCapacity() const, "Use getCapacity() instead");
29  Serializable::SizeType getCapacity() const; // !< returns capacity, not current size, of buffer
30 
31  U8* getBuffAddr();
32  const U8* getBuffAddr() const;
33 
34  private:
35  U8 m_bufferData[FW_SM_SIGNAL_BUFFER_MAX_SIZE]; // packet data buffer
36 };
37 
38 } // namespace Fw
39 
40 #endif
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...
FwSizeType SizeType
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
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")