F´ Flight Software - C/C++ Documentation devel
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BufferRepeaterComponentAc.hpp
Go to the documentation of this file.
1// ======================================================================
2// \title BufferRepeaterComponentAc.hpp
3// \author Generated by fpp-to-cpp
4// \brief hpp file for BufferRepeater component base class
5// ======================================================================
6
7#ifndef Svc_BufferRepeaterComponentAc_HPP
8#define Svc_BufferRepeaterComponentAc_HPP
9
10#include "FpConfig.hpp"
14#include "Fw/Log/LogPortAc.hpp"
15#include "Fw/Log/LogString.hpp"
16#if FW_ENABLE_TEXT_LOGGING == 1
18#endif
22
23namespace Svc {
24
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 {
63 };
64
66 enum {
69 };
70
71 public:
72
73 // ----------------------------------------------------------------------
74 // Component initialization
75 // ----------------------------------------------------------------------
76
78 void init(
79 NATIVE_INT_TYPE instance = 0
80 );
81
82 public:
83
84 // ----------------------------------------------------------------------
85 // Getters for typed input ports
86 // ----------------------------------------------------------------------
87
92 NATIVE_INT_TYPE portNum
93 );
94
95 public:
96
97 // ----------------------------------------------------------------------
98 // Connect input ports to special output ports
99 // ----------------------------------------------------------------------
100
103 NATIVE_INT_TYPE portNum,
104 Fw::InputLogPort* port
105 );
106
107#if FW_ENABLE_TEXT_LOGGING == 1
108
110 void set_LogText_OutputPort(
111 NATIVE_INT_TYPE portNum,
113 );
114
115#endif
116
119 NATIVE_INT_TYPE portNum,
120 Fw::InputTimePort* port
121 );
122
123 public:
124
125 // ----------------------------------------------------------------------
126 // Connect typed input ports to typed output ports
127 // ----------------------------------------------------------------------
128
131 NATIVE_INT_TYPE portNum,
133 );
134
137 NATIVE_INT_TYPE portNum,
139 );
140
143 NATIVE_INT_TYPE portNum,
145 );
146
147#if FW_PORT_SERIALIZATION
148
149 public:
150
151 // ----------------------------------------------------------------------
152 // Connect serial input ports to special output ports
153 // ----------------------------------------------------------------------
154
157 NATIVE_INT_TYPE portNum,
158 Fw::InputSerializePort* port
159 );
160
161#if FW_ENABLE_TEXT_LOGGING == 1
162
164 void set_LogText_OutputPort(
165 NATIVE_INT_TYPE portNum,
166 Fw::InputSerializePort* port
167 );
168
169#endif
170
173 NATIVE_INT_TYPE portNum,
174 Fw::InputSerializePort* port
175 );
176
177#endif
178
179#if FW_PORT_SERIALIZATION
180
181 public:
182
183 // ----------------------------------------------------------------------
184 // Connect serial input ports to typed output ports
185 // ----------------------------------------------------------------------
186
189 NATIVE_INT_TYPE portNum,
190 Fw::InputSerializePort* port
191 );
192
195 NATIVE_INT_TYPE portNum,
196 Fw::InputSerializePort* port
197 );
198
199#endif
200
201 PROTECTED:
202
203 // ----------------------------------------------------------------------
204 // Component construction and destruction
205 // ----------------------------------------------------------------------
206
209 const char* compName = ""
210 );
211
214
215 PROTECTED:
216
217 // ----------------------------------------------------------------------
218 // Getters for numbers of typed input ports
219 // ----------------------------------------------------------------------
220
225
226 PROTECTED:
227
228 // ----------------------------------------------------------------------
229 // Getters for numbers of special output ports
230 // ----------------------------------------------------------------------
231
236
237#if FW_ENABLE_TEXT_LOGGING == 1
238
242 NATIVE_INT_TYPE getNum_LogText_OutputPorts() const;
243
244#endif
245
250
251 PROTECTED:
252
253 // ----------------------------------------------------------------------
254 // Getters for numbers of typed output ports
255 // ----------------------------------------------------------------------
256
261
266
271
272 PROTECTED:
273
274 // ----------------------------------------------------------------------
275 // Connection status queries for special output ports
276 // ----------------------------------------------------------------------
277
282 NATIVE_INT_TYPE portNum
283 );
284
285#if FW_ENABLE_TEXT_LOGGING == 1
286
290 bool isConnected_LogText_OutputPort(
291 NATIVE_INT_TYPE portNum
292 );
293
294#endif
295
300 NATIVE_INT_TYPE portNum
301 );
302
303 PROTECTED:
304
305 // ----------------------------------------------------------------------
306 // Connection status queries for typed output ports
307 // ----------------------------------------------------------------------
308
313 NATIVE_INT_TYPE portNum
314 );
315
320 NATIVE_INT_TYPE portNum
321 );
322
327 NATIVE_INT_TYPE portNum
328 );
329
330 PROTECTED:
331
332 // ----------------------------------------------------------------------
333 // Handlers to implement for typed input ports
334 // ----------------------------------------------------------------------
335
337 virtual void portIn_handler(
338 NATIVE_INT_TYPE portNum,
339 Fw::Buffer& fwBuffer
340 ) = 0;
341
342 PROTECTED:
343
344 // ----------------------------------------------------------------------
345 // Port handler base-class functions for typed input ports
346 //
347 // Call these functions directly to bypass the corresponding ports
348 // ----------------------------------------------------------------------
349
352 NATIVE_INT_TYPE portNum,
353 Fw::Buffer& fwBuffer
354 );
355
356 PROTECTED:
357
358 // ----------------------------------------------------------------------
359 // Invocation functions for typed output ports
360 // ----------------------------------------------------------------------
361
364 NATIVE_INT_TYPE portNum,
365 U32 size
366 );
367
369 void deallocate_out(
370 NATIVE_INT_TYPE portNum,
371 Fw::Buffer& fwBuffer
372 );
373
375 void portOut_out(
376 NATIVE_INT_TYPE portNum,
377 Fw::Buffer& fwBuffer
378 );
379
380 PROTECTED:
381
382 // ----------------------------------------------------------------------
383 // Event logging functions
384 // ----------------------------------------------------------------------
385
390 I32 port,
391 U32 size
392 );
393
398 I32 port,
399 U32 size
400 );
401
402 PROTECTED:
403
404 // ----------------------------------------------------------------------
405 // Time
406 // ----------------------------------------------------------------------
407
412
413 PRIVATE:
414
415 // ----------------------------------------------------------------------
416 // Calls for messages received on typed input ports
417 // ----------------------------------------------------------------------
418
420 static void m_p_portIn_in(
421 Fw::PassiveComponentBase* callComp,
422 NATIVE_INT_TYPE portNum,
423 Fw::Buffer& fwBuffer
424 );
425
426 PRIVATE:
427
428 // ----------------------------------------------------------------------
429 // Typed input ports
430 // ----------------------------------------------------------------------
431
434
435 PRIVATE:
436
437 // ----------------------------------------------------------------------
438 // Special output ports
439 // ----------------------------------------------------------------------
440
442 Fw::OutputLogPort m_Log_OutputPort[NUM_LOG_OUTPUT_PORTS];
443
444#if FW_ENABLE_TEXT_LOGGING == 1
445
448
449#endif
450
452 Fw::OutputTimePort m_Time_OutputPort[NUM_TIME_OUTPUT_PORTS];
453
454 PRIVATE:
455
456 // ----------------------------------------------------------------------
457 // Typed output ports
458 // ----------------------------------------------------------------------
459
462
465
468
469 };
470
471}
472
473#endif
PlatformIntType NATIVE_INT_TYPE
Definition BasicTypes.h:51
C++-compatible configuration header for fprime configuration.
void init()
Object initializer.
Definition ObjBase.cpp:27
Auto-generated base for BufferRepeater component.
void log_WARNING_HI_AllocationSoftFailure(I32 port, U32 size)
void set_Log_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputLogPort *port)
Connect port to Log[portNum].
virtual ~BufferRepeaterComponentBase()
Destroy BufferRepeaterComponentBase object.
BufferRepeaterComponentBase(const char *compName="")
Construct BufferRepeaterComponentBase object.
Fw::Buffer allocate_out(NATIVE_INT_TYPE portNum, U32 size)
Invoke output port allocate.
virtual void portIn_handler(NATIVE_INT_TYPE portNum, Fw::Buffer &fwBuffer)=0
Handler for input port portIn.
void log_FATAL_AllocationHardFailure(I32 port, U32 size)
bool isConnected_deallocate_OutputPort(NATIVE_INT_TYPE portNum)
void set_allocate_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputBufferGetPort *port)
Connect port to allocate[portNum].
@ EVENTID_ALLOCATIONHARDFAILURE
Hard failure in allocation.
@ EVENTID_ALLOCATIONSOFTFAILURE
Soft failure in allocation.
void portIn_handlerBase(NATIVE_INT_TYPE portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port portIn.
Fw::InputBufferSendPort * get_portIn_InputPort(NATIVE_INT_TYPE portNum)
bool isConnected_portOut_OutputPort(NATIVE_INT_TYPE portNum)
void set_deallocate_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputBufferSendPort *port)
Connect port to deallocate[portNum].
void set_portOut_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputBufferSendPort *port)
Connect port to portOut[portNum].
void portOut_out(NATIVE_INT_TYPE portNum, Fw::Buffer &fwBuffer)
Invoke output port portOut.
bool isConnected_allocate_OutputPort(NATIVE_INT_TYPE portNum)
friend class BufferRepeaterComponentBaseFriend
Friend class for white-box testing.
void set_Time_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].
NATIVE_INT_TYPE getNum_deallocate_OutputPorts() const
void deallocate_out(NATIVE_INT_TYPE portNum, Fw::Buffer &fwBuffer)
Invoke output port deallocate.
bool isConnected_Log_OutputPort(NATIVE_INT_TYPE portNum)
bool isConnected_Time_OutputPort(NATIVE_INT_TYPE portNum)