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
FileUplinkComponentAc.hpp
Go to the documentation of this file.
1// ======================================================================
2// \title FileUplinkComponentAc.hpp
3// \author Generated by fpp-to-cpp
4// \brief hpp file for FileUplink component base class
5// ======================================================================
6
7#ifndef Svc_FileUplinkComponentAc_HPP
8#define Svc_FileUplinkComponentAc_HPP
9
10#include "FpConfig.hpp"
13#include "Fw/Log/LogPortAc.hpp"
14#include "Fw/Log/LogString.hpp"
15#if FW_ENABLE_TEXT_LOGGING == 1
17#endif
21#include "Fw/Tlm/TlmPortAc.hpp"
22#include "Fw/Tlm/TlmString.hpp"
24
25namespace Svc {
26
33 {
34
35 // ----------------------------------------------------------------------
36 // Friend classes
37 // ----------------------------------------------------------------------
38
41
42 PROTECTED:
43
44 // ----------------------------------------------------------------------
45 // Constants
46 // ----------------------------------------------------------------------
47
49 enum {
52 };
53
55 enum {
60 };
61
63 enum {
66 };
67
69 enum {
79 };
80
82 enum {
87 };
88
90 enum {
94 };
95
96 public:
97
98 // ----------------------------------------------------------------------
99 // Component initialization
100 // ----------------------------------------------------------------------
101
103 void init(
104 NATIVE_INT_TYPE queueDepth,
105 NATIVE_INT_TYPE instance = 0
106 );
107
108 public:
109
110 // ----------------------------------------------------------------------
111 // Getters for typed input ports
112 // ----------------------------------------------------------------------
113
118 NATIVE_INT_TYPE portNum
119 );
120
125 NATIVE_INT_TYPE portNum
126 );
127
128 public:
129
130 // ----------------------------------------------------------------------
131 // Connect input ports to special output ports
132 // ----------------------------------------------------------------------
133
134#if FW_ENABLE_TEXT_LOGGING == 1
135
137 void set_LogText_OutputPort(
138 NATIVE_INT_TYPE portNum,
140 );
141
142#endif
143
146 NATIVE_INT_TYPE portNum,
147 Fw::InputLogPort* port
148 );
149
152 NATIVE_INT_TYPE portNum,
153 Fw::InputTimePort* port
154 );
155
158 NATIVE_INT_TYPE portNum,
159 Fw::InputTlmPort* port
160 );
161
162 public:
163
164 // ----------------------------------------------------------------------
165 // Connect typed input ports to typed output ports
166 // ----------------------------------------------------------------------
167
170 NATIVE_INT_TYPE portNum,
172 );
173
176 NATIVE_INT_TYPE portNum,
177 Svc::InputPingPort* port
178 );
179
180#if FW_PORT_SERIALIZATION
181
182 public:
183
184 // ----------------------------------------------------------------------
185 // Connect serial input ports to special output ports
186 // ----------------------------------------------------------------------
187
188#if FW_ENABLE_TEXT_LOGGING == 1
189
191 void set_LogText_OutputPort(
192 NATIVE_INT_TYPE portNum,
193 Fw::InputSerializePort* port
194 );
195
196#endif
197
200 NATIVE_INT_TYPE portNum,
201 Fw::InputSerializePort* port
202 );
203
206 NATIVE_INT_TYPE portNum,
207 Fw::InputSerializePort* port
208 );
209
212 NATIVE_INT_TYPE portNum,
213 Fw::InputSerializePort* port
214 );
215
216#endif
217
218#if FW_PORT_SERIALIZATION
219
220 public:
221
222 // ----------------------------------------------------------------------
223 // Connect serial input ports to typed output ports
224 // ----------------------------------------------------------------------
225
228 NATIVE_INT_TYPE portNum,
229 Fw::InputSerializePort* port
230 );
231
234 NATIVE_INT_TYPE portNum,
235 Fw::InputSerializePort* port
236 );
237
238#endif
239
240 PROTECTED:
241
242 // ----------------------------------------------------------------------
243 // Component construction and destruction
244 // ----------------------------------------------------------------------
245
248 const char* compName = ""
249 );
250
252 virtual ~FileUplinkComponentBase();
253
254 PROTECTED:
255
256 // ----------------------------------------------------------------------
257 // Getters for numbers of typed input ports
258 // ----------------------------------------------------------------------
259
264
269
270 PROTECTED:
271
272 // ----------------------------------------------------------------------
273 // Getters for numbers of special output ports
274 // ----------------------------------------------------------------------
275
276#if FW_ENABLE_TEXT_LOGGING == 1
277
281 NATIVE_INT_TYPE getNum_LogText_OutputPorts() const;
282
283#endif
284
289
294
299
300 PROTECTED:
301
302 // ----------------------------------------------------------------------
303 // Getters for numbers of typed output ports
304 // ----------------------------------------------------------------------
305
310
315
316 PROTECTED:
317
318 // ----------------------------------------------------------------------
319 // Connection status queries for special output ports
320 // ----------------------------------------------------------------------
321
322#if FW_ENABLE_TEXT_LOGGING == 1
323
327 bool isConnected_LogText_OutputPort(
328 NATIVE_INT_TYPE portNum
329 );
330
331#endif
332
337 NATIVE_INT_TYPE portNum
338 );
339
344 NATIVE_INT_TYPE portNum
345 );
346
351 NATIVE_INT_TYPE portNum
352 );
353
354 PROTECTED:
355
356 // ----------------------------------------------------------------------
357 // Connection status queries for typed output ports
358 // ----------------------------------------------------------------------
359
364 NATIVE_INT_TYPE portNum
365 );
366
371 NATIVE_INT_TYPE portNum
372 );
373
374 PROTECTED:
375
376 // ----------------------------------------------------------------------
377 // Handlers to implement for typed input ports
378 // ----------------------------------------------------------------------
379
382 NATIVE_INT_TYPE portNum,
383 Fw::Buffer& fwBuffer
384 ) = 0;
385
387 virtual void pingIn_handler(
388 NATIVE_INT_TYPE portNum,
389 U32 key
390 ) = 0;
391
392 PROTECTED:
393
394 // ----------------------------------------------------------------------
395 // Port handler base-class functions for typed input ports
396 //
397 // Call these functions directly to bypass the corresponding ports
398 // ----------------------------------------------------------------------
399
402 NATIVE_INT_TYPE portNum,
403 Fw::Buffer& fwBuffer
404 );
405
408 NATIVE_INT_TYPE portNum,
409 U32 key
410 );
411
412 PROTECTED:
413
414 // ----------------------------------------------------------------------
415 // Pre-message hooks for typed async input ports
416 //
417 // Each of these functions is invoked just before processing a message
418 // on the corresponding port. By default, they do nothing. You can
419 // override them to provide specific pre-message behavior.
420 // ----------------------------------------------------------------------
421
423 virtual void bufferSendIn_preMsgHook(
424 NATIVE_INT_TYPE portNum,
425 Fw::Buffer& fwBuffer
426 );
427
429 virtual void pingIn_preMsgHook(
430 NATIVE_INT_TYPE portNum,
431 U32 key
432 );
433
434 PROTECTED:
435
436 // ----------------------------------------------------------------------
437 // Invocation functions for typed output ports
438 // ----------------------------------------------------------------------
439
442 NATIVE_INT_TYPE portNum,
443 Fw::Buffer& fwBuffer
444 );
445
447 void pingOut_out(
448 NATIVE_INT_TYPE portNum,
449 U32 key
450 );
451
452 PROTECTED:
453
454 // ----------------------------------------------------------------------
455 // Event logging functions
456 // ----------------------------------------------------------------------
457
462 const Fw::LogStringArg& fileName,
463 U32 computed,
464 U32 read
465 );
466
471 const Fw::LogStringArg& fileName
472 );
473
478 const Fw::LogStringArg& fileName
479 );
480
485 const Fw::LogStringArg& fileName
486 );
487
492 U32 packetType,
493 U32 mode
494 );
495
500 U32 packetIndex,
501 const Fw::LogStringArg& fileName
502 );
503
508 U32 packetIndex,
509 U32 lastPacketIndex
510 );
511
516
521 I32 status
522 );
523
524 PROTECTED:
525
526 // ----------------------------------------------------------------------
527 // Event throttle reset functions
528 // ----------------------------------------------------------------------
529
532
535
538
541
542 PROTECTED:
543
544 // ----------------------------------------------------------------------
545 // Telemetry write functions
546 // ----------------------------------------------------------------------
547
552 U32 arg,
553 Fw::Time _tlmTime = Fw::Time()
554 );
555
560 U32 arg,
561 Fw::Time _tlmTime = Fw::Time()
562 );
563
568 U32 arg,
569 Fw::Time _tlmTime = Fw::Time()
570 );
571
572 PROTECTED:
573
574 // ----------------------------------------------------------------------
575 // Time
576 // ----------------------------------------------------------------------
577
582
583 PRIVATE:
584
585 // ----------------------------------------------------------------------
586 // Message dispatch functions
587 // ----------------------------------------------------------------------
588
590 virtual MsgDispatchStatus doDispatch();
591
592 PRIVATE:
593
594 // ----------------------------------------------------------------------
595 // Calls for messages received on typed input ports
596 // ----------------------------------------------------------------------
597
599 static void m_p_bufferSendIn_in(
600 Fw::PassiveComponentBase* callComp,
601 NATIVE_INT_TYPE portNum,
602 Fw::Buffer& fwBuffer
603 );
604
606 static void m_p_pingIn_in(
607 Fw::PassiveComponentBase* callComp,
608 NATIVE_INT_TYPE portNum,
609 U32 key
610 );
611
612 PRIVATE:
613
614 // ----------------------------------------------------------------------
615 // Typed input ports
616 // ----------------------------------------------------------------------
617
620
622 Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
623
624 PRIVATE:
625
626 // ----------------------------------------------------------------------
627 // Special output ports
628 // ----------------------------------------------------------------------
629
630#if FW_ENABLE_TEXT_LOGGING == 1
631
634
635#endif
636
638 Fw::OutputLogPort m_eventOut_OutputPort[NUM_EVENTOUT_OUTPUT_PORTS];
639
641 Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
642
644 Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
645
646 PRIVATE:
647
648 // ----------------------------------------------------------------------
649 // Typed output ports
650 // ----------------------------------------------------------------------
651
654
656 Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
657
658 PRIVATE:
659
660 // ----------------------------------------------------------------------
661 // Counter values for event throttling
662 // ----------------------------------------------------------------------
663
665 NATIVE_UINT_TYPE m_FileWriteErrorThrottle;
666
668 NATIVE_UINT_TYPE m_InvalidReceiveModeThrottle;
669
671 NATIVE_UINT_TYPE m_PacketOutOfBoundsThrottle;
672
674 NATIVE_UINT_TYPE m_PacketOutOfOrderThrottle;
675
676 };
677
678}
679
680#endif
PlatformIntType NATIVE_INT_TYPE
Definition BasicTypes.h:51
PlatformUIntType NATIVE_UINT_TYPE
Definition BasicTypes.h:52
C++-compatible configuration header for fprime configuration.
void init()
Object initializer.
Definition ObjBase.cpp:27