F´ Flight Software - C/C++ Documentation NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
StreamCrossoverComponentAc.hpp
Go to the documentation of this file.
1// ======================================================================
2// \title StreamCrossoverComponentAc.hpp
3// \author Generated by fpp-to-cpp
4// \brief hpp file for StreamCrossover component base class
5// ======================================================================
6
7#ifndef Drv_StreamCrossoverComponentAc_HPP
8#define Drv_StreamCrossoverComponentAc_HPP
9
13#include "FpConfig.hpp"
16#include "Fw/Log/LogPortAc.hpp"
17#include "Fw/Log/LogString.hpp"
18#if FW_ENABLE_TEXT_LOGGING == 1
20#endif
24
25namespace Drv {
26
31 {
32
33 // ----------------------------------------------------------------------
34 // Friend classes
35 // ----------------------------------------------------------------------
36
39
40 PROTECTED:
41
42 // ----------------------------------------------------------------------
43 // Constants
44 // ----------------------------------------------------------------------
45
47 enum {
49 };
50
52 enum {
56 };
57
59 enum {
62 };
63
65 enum {
67 };
68
69 public:
70
71 // ----------------------------------------------------------------------
72 // Component initialization
73 // ----------------------------------------------------------------------
74
76 void init(
77 NATIVE_INT_TYPE instance = 0
78 );
79
80 public:
81
82 // ----------------------------------------------------------------------
83 // Getters for typed input ports
84 // ----------------------------------------------------------------------
85
90 NATIVE_INT_TYPE portNum
91 );
92
93 public:
94
95 // ----------------------------------------------------------------------
96 // Connect special input ports to special output ports
97 // ----------------------------------------------------------------------
98
101 NATIVE_INT_TYPE portNum,
102 Fw::InputLogPort* port
103 );
104
105#if FW_ENABLE_TEXT_LOGGING == 1
106
108 void set_logTextOut_OutputPort(
109 NATIVE_INT_TYPE portNum,
111 );
112
113#endif
114
117 NATIVE_INT_TYPE portNum,
118 Fw::InputTimePort* port
119 );
120
121 public:
122
123 // ----------------------------------------------------------------------
124 // Connect typed input ports to typed output ports
125 // ----------------------------------------------------------------------
126
129 NATIVE_INT_TYPE portNum,
131 );
132
135 NATIVE_INT_TYPE portNum,
137 );
138
139#if FW_PORT_SERIALIZATION
140
141 public:
142
143 // ----------------------------------------------------------------------
144 // Connect serial input ports to special output ports
145 // ----------------------------------------------------------------------
146
149 NATIVE_INT_TYPE portNum,
150 Fw::InputSerializePort* port
151 );
152
153#if FW_ENABLE_TEXT_LOGGING == 1
154
156 void set_logTextOut_OutputPort(
157 NATIVE_INT_TYPE portNum,
158 Fw::InputSerializePort* port
159 );
160
161#endif
162
165 NATIVE_INT_TYPE portNum,
166 Fw::InputSerializePort* port
167 );
168
169#endif
170
171#if FW_PORT_SERIALIZATION
172
173 public:
174
175 // ----------------------------------------------------------------------
176 // Connect serial input ports to typed output ports
177 // ----------------------------------------------------------------------
178
181 NATIVE_INT_TYPE portNum,
182 Fw::InputSerializePort* port
183 );
184
185#endif
186
187 PROTECTED:
188
189 // ----------------------------------------------------------------------
190 // Component construction and destruction
191 // ----------------------------------------------------------------------
192
195 const char* compName = ""
196 );
197
200
201 PROTECTED:
202
203 // ----------------------------------------------------------------------
204 // Getters for numbers of typed input ports
205 // ----------------------------------------------------------------------
206
211
212 PROTECTED:
213
214 // ----------------------------------------------------------------------
215 // Getters for numbers of special output ports
216 // ----------------------------------------------------------------------
217
222
223#if FW_ENABLE_TEXT_LOGGING == 1
224
228 NATIVE_INT_TYPE getNum_logTextOut_OutputPorts();
229
230#endif
231
236
237 PROTECTED:
238
239 // ----------------------------------------------------------------------
240 // Getters for numbers of typed output ports
241 // ----------------------------------------------------------------------
242
247
252
253 PROTECTED:
254
255 // ----------------------------------------------------------------------
256 // Connection status queries for special output ports
257 // ----------------------------------------------------------------------
258
263 NATIVE_INT_TYPE portNum
264 );
265
266#if FW_ENABLE_TEXT_LOGGING == 1
267
271 bool isConnected_logTextOut_OutputPort(
272 NATIVE_INT_TYPE portNum
273 );
274
275#endif
276
281 NATIVE_INT_TYPE portNum
282 );
283
284 PROTECTED:
285
286 // ----------------------------------------------------------------------
287 // Connection status queries for typed output ports
288 // ----------------------------------------------------------------------
289
294 NATIVE_INT_TYPE portNum
295 );
296
301 NATIVE_INT_TYPE portNum
302 );
303
304 PROTECTED:
305
306 // ----------------------------------------------------------------------
307 // Handlers to implement for typed input ports
308 // ----------------------------------------------------------------------
309
311 virtual void streamIn_handler(
312 NATIVE_INT_TYPE portNum,
313 Fw::Buffer& recvBuffer,
314 const Drv::RecvStatus& recvStatus
315 ) = 0;
316
317 PROTECTED:
318
319 // ----------------------------------------------------------------------
320 // Port handler base-class functions for typed input ports
321 //
322 // Call these functions directly to bypass the corresponding ports
323 // ----------------------------------------------------------------------
324
327 NATIVE_INT_TYPE portNum,
328 Fw::Buffer& recvBuffer,
329 const Drv::RecvStatus& recvStatus
330 );
331
332 PROTECTED:
333
334 // ----------------------------------------------------------------------
335 // Invocation functions for typed output ports
336 // ----------------------------------------------------------------------
337
340 NATIVE_INT_TYPE portNum,
341 Fw::Buffer& fwBuffer
342 );
343
346 NATIVE_INT_TYPE portNum,
347 Fw::Buffer& sendBuffer
348 );
349
350 PROTECTED:
351
352 // ----------------------------------------------------------------------
353 // Event logging functions
354 // ----------------------------------------------------------------------
355
360
361 PROTECTED:
362
363 // ----------------------------------------------------------------------
364 // Time
365 // ----------------------------------------------------------------------
366
371
372 PRIVATE:
373
374 // ----------------------------------------------------------------------
375 // Calls for messages received on typed input ports
376 // ----------------------------------------------------------------------
377
379 static void m_p_streamIn_in(
380 Fw::PassiveComponentBase* callComp,
381 NATIVE_INT_TYPE portNum,
382 Fw::Buffer& recvBuffer,
383 const Drv::RecvStatus& recvStatus
384 );
385
386 PRIVATE:
387
388 // ----------------------------------------------------------------------
389 // Typed input ports
390 // ----------------------------------------------------------------------
391
394
395 PRIVATE:
396
397 // ----------------------------------------------------------------------
398 // Special output ports
399 // ----------------------------------------------------------------------
400
402 Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
403
404#if FW_ENABLE_TEXT_LOGGING == 1
405
407 Fw::OutputLogTextPort m_logTextOut_OutputPort[NUM_LOGTEXTOUT_OUTPUT_PORTS];
408
409#endif
410
412 Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
413
414 PRIVATE:
415
416 // ----------------------------------------------------------------------
417 // Typed output ports
418 // ----------------------------------------------------------------------
419
422
425
426 };
427
428}
429
430#endif
PlatformIntType NATIVE_INT_TYPE
Definition BasicTypes.h:51
C++-compatible configuration header for fprime configuration.
Input ByteStreamRecv port.
Input ByteStreamSend port.
Output ByteStreamSend port.
Auto-generated base for StreamCrossover component.
friend class StreamCrossoverComponentBaseFriend
Friend class for white-box testing.
void log_WARNING_HI_StreamOutError(Drv::SendStatus sendStatus)
void set_logOut_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
bool isConnected_logOut_OutputPort(NATIVE_INT_TYPE portNum)
bool isConnected_timeCaller_OutputPort(NATIVE_INT_TYPE portNum)
void set_timeCaller_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
bool isConnected_streamOut_OutputPort(NATIVE_INT_TYPE portNum)
void set_errorDeallocate_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputBufferSendPort *port)
Connect port to errorDeallocate[portNum].
bool isConnected_errorDeallocate_OutputPort(NATIVE_INT_TYPE portNum)
virtual ~StreamCrossoverComponentBase()
Destroy StreamCrossoverComponentBase object.
void set_streamOut_OutputPort(NATIVE_INT_TYPE portNum, Drv::InputByteStreamSendPort *port)
Connect port to streamOut[portNum].
StreamCrossoverComponentBase(const char *compName="")
Construct StreamCrossoverComponentBase object.
virtual void streamIn_handler(NATIVE_INT_TYPE portNum, Fw::Buffer &recvBuffer, const Drv::RecvStatus &recvStatus)=0
Handler for input port streamIn.
Drv::InputByteStreamRecvPort * get_streamIn_InputPort(NATIVE_INT_TYPE portNum)
void errorDeallocate_out(NATIVE_INT_TYPE portNum, Fw::Buffer &fwBuffer)
Invoke output port errorDeallocate.
@ EVENTID_STREAMOUTERROR
Indicates buffer failed to send to streamOut.
void streamIn_handlerBase(NATIVE_INT_TYPE portNum, Fw::Buffer &recvBuffer, const Drv::RecvStatus &recvStatus)
Handler base-class function for input port streamIn.
Drv::SendStatus streamOut_out(NATIVE_INT_TYPE portNum, Fw::Buffer &sendBuffer)
Invoke output port streamOut.
Input BufferSend port.
void init()
Object initializer.
Definition ObjBase.cpp:27
Output BufferSend port.