F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
SaMapArrayAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title SaMapArrayAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for SaMap array
5 // ======================================================================
6 
7 #ifndef SdlsCfg_SaMapArrayAc_HPP
8 #define SdlsCfg_SaMapArrayAc_HPP
9 
10 #include <initializer_list>
11 
12 #include "Fw/FPrimeBasicTypes.hpp"
15 #include "Fw/Types/String.hpp"
17 
18 namespace SdlsCfg {
19 
26  class SaMap :
27  public Fw::Serializable
28  {
29 
30  public:
31 
32  // ----------------------------------------------------------------------
33  // Types
34  // ----------------------------------------------------------------------
35 
38 
39  public:
40 
41  // ----------------------------------------------------------------------
42  // Constants
43  // ----------------------------------------------------------------------
44 
45  enum {
47  SIZE = 2,
52  };
53 
54  public:
55 
56  // ----------------------------------------------------------------------
57  // Constructors
58  // ----------------------------------------------------------------------
59 
61  SaMap();
62 
64  SaMap(
65  const ElementType (&a)[SIZE]
66  );
67 
69  explicit SaMap(
70  const ElementType& e
71  );
72 
74  SaMap(
75  const std::initializer_list<ElementType>& il
76  );
77 
79  SaMap(
80  const SaMap& obj
81  );
82 
83  public:
84 
85  // ----------------------------------------------------------------------
86  // Operators
87  // ----------------------------------------------------------------------
88 
91  const FwSizeType i
92  );
93 
95  const ElementType& operator[](
96  const FwSizeType i
97  ) const;
98 
100  SaMap& operator=(
101  const SaMap& obj
102  );
103 
105  SaMap& operator=(
106  const ElementType (&a)[SIZE]
107  );
108 
110  SaMap& operator=(
111  const std::initializer_list<ElementType>& il
112  );
113 
115  SaMap& operator=(
116  const ElementType& e
117  );
118 
120  bool operator==(
121  const SaMap& obj
122  ) const;
123 
125  bool operator!=(
126  const SaMap& obj
127  ) const;
128 
129 #ifdef BUILD_UT
130 
132  friend std::ostream& operator<<(
133  std::ostream& os,
134  const SaMap& obj
135  );
136 
137 #endif
138 
139  public:
140 
141  // ----------------------------------------------------------------------
142  // Public member functions
143  // ----------------------------------------------------------------------
144 
147  Fw::SerialBufferBase& buffer,
149  ) const;
150 
153  Fw::SerialBufferBase& buffer,
155  );
156 
158  FwSizeType serializedSize() const;
159 
160 #if FW_SERIALIZABLE_TO_STRING
161 
163  void toString(
164  Fw::StringBase& sb
165  ) const;
166 
167 #endif
168 
169  private:
170 
171  // ----------------------------------------------------------------------
172  // Member variables
173  // ----------------------------------------------------------------------
174 
176  ElementType elements[SIZE];
177 
178  };
179 
180 }
181 
182 #endif
bool operator!=(const SaMap &obj) const
Inequality operator.
PlatformSizeType FwSizeType
The serialized size of each element.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialization.
The size of the serial representation.
The size of the array.
FwSizeType serializedSize() const
Get the dynamic serialized size of the array.
Svc::Ccsds::SaMapEntry ElementType
The element type.
ElementType & operator[](const FwSizeType i)
Subscript operator.
A single security association index to port index mapping entry.
SerializeStatus
forward declaration for string
SaMap & operator=(const SaMap &obj)
Copy assignment operator (object)
The size of the serial representation.
bool operator==(const SaMap &obj) const
Equality operator.
Endianness
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialization.
Big endian serialization.
SaMap()
Constructor (default value)