F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
CyclePortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title CyclePortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for Cycle port
5 // ======================================================================
6 
7 #ifndef Svc_CyclePortAc_HPP
8 #define Svc_CyclePortAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
12 #include "Os/RawTime.hpp"
13 #if !FW_DIRECT_PORT_CALLS
17 #endif
18 
19 namespace Svc {
20 
25  {
26 
27  public:
28 
29  // ----------------------------------------------------------------------
30  // Public constants for CyclePortBuffer
31  // ----------------------------------------------------------------------
32 
35  static constexpr FwSizeType CAPACITY =
37 
38  public:
39 
40  // ----------------------------------------------------------------------
41  // Public member functions for CyclePortBuffer
42  // ----------------------------------------------------------------------
43 
46 
47  }
48 
49  private:
50 
51  // ----------------------------------------------------------------------
52  // Private member variables
53  // ----------------------------------------------------------------------
54 
55  U8 m_buff[CAPACITY];
56 
57  };
58 
62 
63  public:
64 
65  // ----------------------------------------------------------------------
66  // Public constructors for CyclePortSerializer
67  // ----------------------------------------------------------------------
68 
71 
72  public:
73 
74  // ----------------------------------------------------------------------
75  // Public member functions for CyclePortSerializer
76  // ----------------------------------------------------------------------
77 
80  Fw::SerialBufferBase& _buffer
81  );
82 
83  public:
84 
85  // ----------------------------------------------------------------------
86  // Public static functions for CyclePortSerializer
87  // ----------------------------------------------------------------------
88 
91  Os::RawTime& cycleStart,
92  Fw::SerialBufferBase& _buffer
93  );
94 
95  public:
96 
97  // ----------------------------------------------------------------------
98  // Public member variables for CyclePortSerializer
99  // ----------------------------------------------------------------------
100 
102 
103  };
104 
105 #if !FW_DIRECT_PORT_CALLS
106 
110  public Fw::InputPortBase
111  {
112 
113  public:
114 
115  // ----------------------------------------------------------------------
116  // Public types for InputCyclePort
117  // ----------------------------------------------------------------------
118 
120  typedef void (*CompFuncPtr)(
121  Fw::PassiveComponentBase* callComp,
122  FwIndexType portNum,
123  Os::RawTime& cycleStart
124  );
125 
126  public:
127 
128  // ----------------------------------------------------------------------
129  // Public constructors for InputCyclePort
130  // ----------------------------------------------------------------------
131 
133  InputCyclePort();
134 
135  public:
136 
137  // ----------------------------------------------------------------------
138  // Public member functions for InputCyclePort
139  // ----------------------------------------------------------------------
140 
142  void init();
143 
145  void addCallComp(
146  Fw::PassiveComponentBase* callComp,
147  CompFuncPtr funcPtr
148  );
149 
151  void invoke(
152  Os::RawTime& cycleStart
153  );
154 
155  private:
156 
157  // ----------------------------------------------------------------------
158  // Private member functions for InputCyclePort
159  // ----------------------------------------------------------------------
160 
161 #if FW_PORT_SERIALIZATION == 1
162 
165  Fw::SerializeStatus invokeSerial(
166  Fw::LinearBufferBase& _buffer
167  );
168 
169 #endif
170 
171  private:
172 
173  // ----------------------------------------------------------------------
174  // Private member variables for InputCyclePort
175  // ----------------------------------------------------------------------
176 
178  CompFuncPtr m_func;
179 
180  };
181 
185  public Fw::OutputPortBase
186  {
187 
188  public:
189 
190  // ----------------------------------------------------------------------
191  // Public constructors for OutputCyclePort
192  // ----------------------------------------------------------------------
193 
195  OutputCyclePort();
196 
197  public:
198 
199  // ----------------------------------------------------------------------
200  // Public member functions for OutputCyclePort
201  // ----------------------------------------------------------------------
202 
204  void init();
205 
207  void addCallPort(
208  InputCyclePort* callPort
209  );
210 
212  void invoke(
213  Os::RawTime& cycleStart
214  ) const;
215 
216  private:
217 
218  // ----------------------------------------------------------------------
219  // Private member variables for OutputCyclePort
220  // ----------------------------------------------------------------------
221 
223  InputCyclePort* m_port;
224 
225  };
226 
227 #endif
228 
229 }
230 
231 #endif
PlatformSizeType FwSizeType
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: CyclePortAc.cpp:79
CyclePortBuffer()
Constructor.
Definition: CyclePortAc.hpp:45
static const FwSizeType SERIALIZED_SIZE
OutputCyclePort()
Constructor.
SerializeStatus
forward declaration for string
void addCallPort(InputCyclePort *callPort)
Register an input port.
Fw::SerializeStatus deserializePortArgs(Fw::SerialBufferBase &_buffer)
Deserialze port arguments into members.
Definition: CyclePortAc.cpp:28
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
void init()
Initialization function.
void invoke(Os::RawTime &cycleStart)
Invoke a port interface.
Definition: CyclePortAc.cpp:93
void init()
Initialization function.
Definition: CyclePortAc.cpp:73
CyclePortSerializer()
Constructor.
Definition: CyclePortAc.cpp:17
static constexpr FwSizeType CAPACITY
Definition: CyclePortAc.hpp:35
static Fw::SerializeStatus serializePortArgs(Os::RawTime &cycleStart, Fw::SerialBufferBase &_buffer)
Serialize port arguments into a buffer.
Definition: CyclePortAc.cpp:42
InputCyclePort()
Constructor.
Definition: CyclePortAc.cpp:61
PlatformIndexType FwIndexType
RateGroupDivider component implementation.
void invoke(Os::RawTime &cycleStart) const
Invoke a port connection.
Implementation of malloc based allocator.
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, Os::RawTime &cycleStart)
The port callback function type.