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 
30  class SaMap :
31  public Fw::Serializable
32  {
33 
34  public:
35 
36  // ----------------------------------------------------------------------
37  // Types
38  // ----------------------------------------------------------------------
39 
42 
43  public:
44 
45  // ----------------------------------------------------------------------
46  // Constants
47  // ----------------------------------------------------------------------
48 
49  enum {
51  SIZE = 2,
56  };
57 
58  public:
59 
60  // ----------------------------------------------------------------------
61  // Constructors
62  // ----------------------------------------------------------------------
63 
65  SaMap();
66 
68  SaMap(
69  const ElementType (&a)[SIZE]
70  );
71 
73  explicit SaMap(
74  const ElementType& e
75  );
76 
78  SaMap(
79  const std::initializer_list<ElementType>& il
80  );
81 
83  SaMap(
84  const SaMap& obj
85  );
86 
87  public:
88 
89  // ----------------------------------------------------------------------
90  // Operators
91  // ----------------------------------------------------------------------
92 
95  const FwSizeType i
96  );
97 
99  const ElementType& operator[](
100  const FwSizeType i
101  ) const;
102 
104  SaMap& operator=(
105  const SaMap& obj
106  );
107 
109  SaMap& operator=(
110  const ElementType (&a)[SIZE]
111  );
112 
114  SaMap& operator=(
115  const std::initializer_list<ElementType>& il
116  );
117 
119  SaMap& operator=(
120  const ElementType& e
121  );
122 
124  bool operator==(
125  const SaMap& obj
126  ) const;
127 
129  bool operator!=(
130  const SaMap& obj
131  ) const;
132 
133 #ifdef BUILD_UT
134 
136  friend std::ostream& operator<<(
137  std::ostream& os,
138  const SaMap& obj
139  );
140 
141 #endif
142 
143  public:
144 
145  // ----------------------------------------------------------------------
146  // Public member functions
147  // ----------------------------------------------------------------------
148 
151  Fw::SerialBufferBase& buffer,
153  ) const;
154 
157  Fw::SerialBufferBase& buffer,
159  );
160 
162  FwSizeType serializedSize() const;
163 
164 #if FW_SERIALIZABLE_TO_STRING
165 
167  void toString(
168  Fw::StringBase& sb
169  ) const;
170 
171 #endif
172 
173  private:
174 
175  // ----------------------------------------------------------------------
176  // Member variables
177  // ----------------------------------------------------------------------
178 
180  ElementType elements[SIZE];
181 
182  };
183 
184 }
185 
186 #endif
bool operator!=(const SaMap &obj) const
Inequality operator.
The size of the serial representation.
PlatformSizeType FwSizeType
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialization.
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 serialized size of each element.
bool operator==(const SaMap &obj) const
Equality operator.
The size of the array.
Endianness
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialization.
The size of the serial representation.
Big endian serialization.
SaMap()
Constructor (default value)