F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
TMHeaderSerializableAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title TMHeaderSerializableAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for TMHeader struct
5 // ======================================================================
6 
7 #ifndef Svc_Ccsds_TMHeaderSerializableAc_HPP
8 #define Svc_Ccsds_TMHeaderSerializableAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
13 #include "Fw/Types/String.hpp"
14 
15 namespace Svc {
16 
17  namespace Ccsds {
18 
20  class TMHeader :
21  public Fw::Serializable
22  {
23 
24  public:
25 
26  // ----------------------------------------------------------------------
27  // Constants
28  // ----------------------------------------------------------------------
29 
30  enum {
33  sizeof(U16) +
34  sizeof(U8) +
35  sizeof(U8) +
36  sizeof(U16)
37  };
38 
39  public:
40 
41  // ----------------------------------------------------------------------
42  // Constructors
43  // ----------------------------------------------------------------------
44 
46  TMHeader();
47 
49  TMHeader(
50  U16 globalVcId,
51  U8 masterFrameCount,
52  U8 virtualFrameCount,
53  U16 dataFieldStatus
54  );
55 
57  TMHeader(
58  const TMHeader& obj
59  );
60 
61  public:
62 
63  // ----------------------------------------------------------------------
64  // Operators
65  // ----------------------------------------------------------------------
66 
69  const TMHeader& obj
70  );
71 
73  bool operator==(
74  const TMHeader& obj
75  ) const;
76 
78  bool operator!=(
79  const TMHeader& obj
80  ) const;
81 
82 #ifdef BUILD_UT
83 
85  friend std::ostream& operator<<(
86  std::ostream& os,
87  const TMHeader& obj
88  );
89 
90 #endif
91 
92  public:
93 
94  // ----------------------------------------------------------------------
95  // Member functions
96  // ----------------------------------------------------------------------
97 
100  Fw::SerialBufferBase& buffer,
102  ) const;
103 
106  Fw::SerialBufferBase& buffer,
108  );
109 
111  FwSizeType serializedSize() const;
112 
113 #if FW_SERIALIZABLE_TO_STRING
114 
116  void toString(
117  Fw::StringBase& sb
118  ) const;
119 
120 #endif
121 
122  // ----------------------------------------------------------------------
123  // Getter functions
124  // ----------------------------------------------------------------------
125 
127  U16 get_globalVcId() const
128  {
129  return this->m_globalVcId;
130  }
131 
134  {
135  return this->m_masterFrameCount;
136  }
137 
140  {
141  return this->m_virtualFrameCount;
142  }
143 
146  {
147  return this->m_dataFieldStatus;
148  }
149 
150  // ----------------------------------------------------------------------
151  // Setter functions
152  // ----------------------------------------------------------------------
153 
155  void set(
156  U16 globalVcId,
157  U8 masterFrameCount,
158  U8 virtualFrameCount,
159  U16 dataFieldStatus
160  );
161 
163  void set_globalVcId(U16 globalVcId);
164 
166  void set_masterFrameCount(U8 masterFrameCount);
167 
169  void set_virtualFrameCount(U8 virtualFrameCount);
170 
172  void set_dataFieldStatus(U16 dataFieldStatus);
173 
174  protected:
175 
176  // ----------------------------------------------------------------------
177  // Member variables
178  // ----------------------------------------------------------------------
179 
184 
185  };
186 
187  }
188 
189 }
190 
191 #endif
void set_globalVcId(U16 globalVcId)
Set member globalVcId.
U16 get_globalVcId() const
Get member globalVcId.
PlatformSizeType FwSizeType
SerializeStatus
forward declaration for string
U8 get_masterFrameCount() const
Get member masterFrameCount.
Describes the frame header format for a Telemetry (TM) Transfer Frame header.
void set_dataFieldStatus(U16 dataFieldStatus)
Set member dataFieldStatus.
TMHeader & operator=(const TMHeader &obj)
Copy assignment operator.
U8 get_virtualFrameCount() const
Get member virtualFrameCount.
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialization.
bool operator==(const TMHeader &obj) const
Equality operator.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
bool operator!=(const TMHeader &obj) const
Inequality operator.
TMHeader()
Constructor (default value)
void set_virtualFrameCount(U8 virtualFrameCount)
Set member virtualFrameCount.
FwSizeType serializedSize() const
Get the dynamic serialized size of the struct.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialization.
The size of the serial representation.
RateGroupDivider component implementation.
Endianness
void set_masterFrameCount(U8 masterFrameCount)
Set member masterFrameCount.
U16 get_dataFieldStatus() const
Get member dataFieldStatus.
Big endian serialization.