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 
108 #if FW_SERIALIZABLE_TO_STRING
109 
111  void toString(
112  Fw::StringBase& sb
113  ) const;
114 
115 #endif
116 
117  // ----------------------------------------------------------------------
118  // Getter functions
119  // ----------------------------------------------------------------------
120 
122  U16 getglobalVcId() const
123  {
124  return this->m_globalVcId;
125  }
126 
129  {
130  return this->m_masterFrameCount;
131  }
132 
135  {
136  return this->m_virtualFrameCount;
137  }
138 
140  U16 getdataFieldStatus() const
141  {
142  return this->m_dataFieldStatus;
143  }
144 
145  // ----------------------------------------------------------------------
146  // Setter functions
147  // ----------------------------------------------------------------------
148 
150  void set(
151  U16 globalVcId,
152  U8 masterFrameCount,
153  U8 virtualFrameCount,
154  U16 dataFieldStatus
155  );
156 
158  void setglobalVcId(U16 globalVcId);
159 
161  void setmasterFrameCount(U8 masterFrameCount);
162 
164  void setvirtualFrameCount(U8 virtualFrameCount);
165 
167  void setdataFieldStatus(U16 dataFieldStatus);
168 
169  protected:
170 
171  // ----------------------------------------------------------------------
172  // Member variables
173  // ----------------------------------------------------------------------
174 
179 
180  };
181 
182  }
183 
184 }
185 
186 #endif
U16 getdataFieldStatus() const
Get member dataFieldStatus.
bool operator==(const TMHeader &obj) const
Equality operator.
void setmasterFrameCount(U8 masterFrameCount)
Set member masterFrameCount.
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
Deserialization.
The size of the serial representation.
TMHeader()
Constructor (default value)
SerializeStatus
forward declaration for string
bool operator!=(const TMHeader &obj) const
Inequality operator.
void setglobalVcId(U16 globalVcId)
Set member globalVcId.
U8 getmasterFrameCount() const
Get member masterFrameCount.
U16 getglobalVcId() const
Get member globalVcId.
U8 getvirtualFrameCount() const
Get member virtualFrameCount.
void setdataFieldStatus(U16 dataFieldStatus)
Set member dataFieldStatus.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:56
forward declaration
RateGroupDivider component implementation.
TMHeader & operator=(const TMHeader &obj)
Copy assignment operator.
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const
Serialization.
void setvirtualFrameCount(U8 virtualFrameCount)
Set member virtualFrameCount.
Describes the frame header format for a Telemetry (TM) Transfer Frame header.