F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FpySequencer_PushPrmDirectiveSerializableAc.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FpySequencer_PushPrmDirectiveSerializableAc.cpp
3 // \author Generated by fpp-to-cpp
4 // \brief cpp file for FpySequencer_PushPrmDirective struct
5 // ======================================================================
6 
7 #include "Fw/Types/Assert.hpp"
9 
10 namespace Svc {
11 
12  // ----------------------------------------------------------------------
13  // Constructors
14  // ----------------------------------------------------------------------
15 
18  Serializable(),
19  m_prmId()
20  {
21 
22  }
23 
26  Serializable(),
27  m_prmId(prmId)
28  {
29 
30  }
31 
34  Serializable(),
35  m_prmId(obj.m_prmId)
36  {
37 
38  }
39 
40  // ----------------------------------------------------------------------
41  // Operators
42  // ----------------------------------------------------------------------
43 
46  {
47  if (this == &obj) {
48  return *this;
49  }
50 
51  set(obj.m_prmId);
52  return *this;
53  }
54 
57  {
58  return (this->m_prmId == obj.m_prmId);
59  }
60 
63  {
64  return !(*this == obj);
65  }
66 
67 #ifdef BUILD_UT
68 
69  std::ostream& operator<<(std::ostream& os, const FpySequencer_PushPrmDirective& obj) {
70  Fw::String s;
71  obj.toString(s);
72  os << s.toChar();
73  return os;
74  }
75 
76 #endif
77 
78  // ----------------------------------------------------------------------
79  // Member functions
80  // ----------------------------------------------------------------------
81 
84  Fw::SerialBufferBase& buffer,
85  Fw::Endianness mode
86  ) const
87  {
88  Fw::SerializeStatus status;
89 
90  status = buffer.serializeFrom(this->m_prmId, mode);
91  if (status != Fw::FW_SERIALIZE_OK) {
92  return status;
93  }
94 
95  return status;
96  }
97 
100  Fw::SerialBufferBase& buffer,
101  Fw::Endianness mode
102  )
103  {
104  Fw::SerializeStatus status;
105 
106  status = buffer.deserializeTo(this->m_prmId, mode);
107  if (status != Fw::FW_SERIALIZE_OK) {
108  return status;
109  }
110 
111  return status;
112  }
113 
116  {
117  FwSizeType size = 0;
118  size += sizeof(FwPrmIdType);
119  return size;
120  }
121 
122 #if FW_SERIALIZABLE_TO_STRING
123 
124  void FpySequencer_PushPrmDirective ::
125  toString(Fw::StringBase& sb) const
126  {
127  Fw::String tmp;
128  sb = "( ";
129 
130  // Format prmId
131  sb += "prmId = ";
132  tmp.format("%" PRIu32 "", this->m_prmId);
133  sb += tmp;
134  sb += " )";
135  }
136 
137 #endif
138 
139  // ----------------------------------------------------------------------
140  // Setter functions
141  // ----------------------------------------------------------------------
142 
145  {
146  this->m_prmId = prmId;
147  }
148 
151  {
152  this->m_prmId = prmId;
153  }
154 
155 }
Serialization/Deserialization operation was successful.
bool operator!=(const FpySequencer_PushPrmDirective &obj) const
Inequality operator.
PlatformSizeType FwSizeType
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialization.
const char * toChar() const
Convert to a C-style char*.
Definition: String.hpp:50
FwIdType FwPrmIdType
The type of a parameter identifier.
virtual SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG)=0
Serialize an 8-bit unsigned integer value.
SerializeStatus
forward declaration for string
virtual SerializeStatus deserializeTo(U8 &val, Endianness mode=Endianness::BIG)=0
Deserialize an 8-bit unsigned integer value.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialization.
FwSizeType serializedSize() const
Get the dynamic serialized size of the struct.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
Definition: StringBase.cpp:39
bool operator==(const FpySequencer_PushPrmDirective &obj) const
Equality operator.
RateGroupDivider component implementation.
Endianness
FpySequencer_PushPrmDirective & operator=(const FpySequencer_PushPrmDirective &obj)
Copy assignment operator.