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::SerializeBufferBase& buffer
101  ) const;
102 
105  Fw::SerializeBufferBase& buffer
106  );
107 
109  FwSizeType serializedSize() const;
110 
111 #if FW_SERIALIZABLE_TO_STRING
112 
114  void toString(
115  Fw::StringBase& sb
116  ) const;
117 
118 #endif
119 
120  // ----------------------------------------------------------------------
121  // Getter functions
122  // ----------------------------------------------------------------------
123 
125  U16 get_globalVcId() const
126  {
127  return this->m_globalVcId;
128  }
129 
132  {
133  return this->m_masterFrameCount;
134  }
135 
138  {
139  return this->m_virtualFrameCount;
140  }
141 
144  {
145  return this->m_dataFieldStatus;
146  }
147 
148  // ----------------------------------------------------------------------
149  // Setter functions
150  // ----------------------------------------------------------------------
151 
153  void set(
154  U16 globalVcId,
155  U8 masterFrameCount,
156  U8 virtualFrameCount,
157  U16 dataFieldStatus
158  );
159 
161  void set_globalVcId(U16 globalVcId);
162 
164  void set_masterFrameCount(U8 masterFrameCount);
165 
167  void set_virtualFrameCount(U8 virtualFrameCount);
168 
170  void set_dataFieldStatus(U16 dataFieldStatus);
171 
172  protected:
173 
174  // ----------------------------------------------------------------------
175  // Member variables
176  // ----------------------------------------------------------------------
177 
182 
183  };
184 
185  }
186 
187 }
188 
189 #endif
void set_globalVcId(U16 globalVcId)
Set member globalVcId.
U16 get_globalVcId() const
Get member globalVcId.
PlatformSizeType FwSizeType
The size of the serial representation.
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.
Fw::SerializeStatus serializeTo(Fw::SerializeBufferBase &buffer) const
Serialization.
TMHeader & operator=(const TMHeader &obj)
Copy assignment operator.
U8 get_virtualFrameCount() const
Get member virtualFrameCount.
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.
forward declaration
RateGroupDivider component implementation.
void set_masterFrameCount(U8 masterFrameCount)
Set member masterFrameCount.
U16 get_dataFieldStatus() const
Get member dataFieldStatus.
Fw::SerializeStatus deserializeFrom(Fw::SerializeBufferBase &buffer)
Deserialization.