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
ActiveLoggerComponentAc.cpp
Go to the documentation of this file.
1// ======================================================================
2// \title ActiveLoggerComponentAc.cpp
3// \author Generated by fpp-to-cpp
4// \brief cpp file for ActiveLogger component base class
5// ======================================================================
6
7#include <cstdio>
8
10#include "Fw/Types/Assert.hpp"
11#if FW_ENABLE_TEXT_LOGGING
12#include "Fw/Types/String.hpp"
13#endif
14
15namespace Svc {
16
17 namespace {
18 enum MsgTypeEnum {
19 ACTIVELOGGER_COMPONENT_EXIT = Fw::ActiveComponentBase::ACTIVE_COMPONENT_EXIT,
20 PINGIN_PING,
21 CMD_SET_ID_FILTER,
22 CMD_DUMP_FILTER_STATE,
23 INT_IF_LOQQUEUE,
24 };
25
26 // Get the max size by constructing a union of the async input, command, and
27 // internal port serialization sizes
28 union BuffUnion {
31 // Size of loqQueue argument list
32 BYTE loqQueueIntIfSize[
33 sizeof(FwEventIdType) +
37 ];
38 };
39
40 // Define a message buffer class large enough to handle all the
41 // asynchronous inputs to the component
42 class ComponentIpcSerializableBuffer :
44 {
45
46 public:
47
48 enum {
49 // Max. message size = size of data + message id + port
50 SERIALIZATION_SIZE =
51 sizeof(BuffUnion) +
52 sizeof(NATIVE_INT_TYPE) +
53 sizeof(NATIVE_INT_TYPE)
54 };
55
56 NATIVE_UINT_TYPE getBuffCapacity() const {
57 return sizeof(m_buff);
58 }
59
60 U8* getBuffAddr() {
61 return m_buff;
62 }
63
64 const U8* getBuffAddr() const {
65 return m_buff;
66 }
67
68 private:
69 // Should be the max of all the input ports serialized sizes...
70 U8 m_buff[SERIALIZATION_SIZE];
71
72 };
73 }
74
75 // ----------------------------------------------------------------------
76 // Component initialization
77 // ----------------------------------------------------------------------
78
79 void ActiveLoggerComponentBase ::
80 init(
81 NATIVE_INT_TYPE queueDepth,
82 NATIVE_INT_TYPE instance
83 )
84 {
85 // Initialize base class
87
88 // Connect input port CmdDisp
89 for (
90 PlatformIntType port = 0;
91 port < static_cast<PlatformIntType>(this->getNum_CmdDisp_InputPorts());
92 port++
93 ) {
94 this->m_CmdDisp_InputPort[port].init();
95 this->m_CmdDisp_InputPort[port].addCallComp(
96 this,
97 m_p_CmdDisp_in
98 );
99 this->m_CmdDisp_InputPort[port].setPortNum(port);
100
101#if FW_OBJECT_NAMES == 1
102 // The port name consists of this->m_objName and some extra info.
103 // We expect all of this to fit in FW_OBJ_NAME_MAX_SIZE bytes.
104 // However, the compiler may assume that this->m_objName fills
105 // the entire array, whose size is FW_OBJ_NAME_MAX_SIZE. So to
106 // avoid a compiler warning, we provide an extra FW_OBJ_NAME_MAX_SIZE
107 // bytes to cover the extra info.
108 char portName[2*FW_OBJ_NAME_MAX_SIZE];
109 (void) snprintf(
110 portName,
111 sizeof(portName),
112 "%s_CmdDisp_InputPort[%" PRI_PlatformIntType "]",
113 this->m_objName,
114 port
115 );
116 this->m_CmdDisp_InputPort[port].setObjName(portName);
117#endif
118 }
119
120 // Connect input port LogRecv
121 for (
122 PlatformIntType port = 0;
123 port < static_cast<PlatformIntType>(this->getNum_LogRecv_InputPorts());
124 port++
125 ) {
126 this->m_LogRecv_InputPort[port].init();
127 this->m_LogRecv_InputPort[port].addCallComp(
128 this,
129 m_p_LogRecv_in
130 );
131 this->m_LogRecv_InputPort[port].setPortNum(port);
132
133#if FW_OBJECT_NAMES == 1
134 // The port name consists of this->m_objName and some extra info.
135 // We expect all of this to fit in FW_OBJ_NAME_MAX_SIZE bytes.
136 // However, the compiler may assume that this->m_objName fills
137 // the entire array, whose size is FW_OBJ_NAME_MAX_SIZE. So to
138 // avoid a compiler warning, we provide an extra FW_OBJ_NAME_MAX_SIZE
139 // bytes to cover the extra info.
140 char portName[2*FW_OBJ_NAME_MAX_SIZE];
141 (void) snprintf(
142 portName,
143 sizeof(portName),
144 "%s_LogRecv_InputPort[%" PRI_PlatformIntType "]",
145 this->m_objName,
146 port
147 );
148 this->m_LogRecv_InputPort[port].setObjName(portName);
149#endif
150 }
151
152 // Connect input port pingIn
153 for (
154 PlatformIntType port = 0;
155 port < static_cast<PlatformIntType>(this->getNum_pingIn_InputPorts());
156 port++
157 ) {
158 this->m_pingIn_InputPort[port].init();
159 this->m_pingIn_InputPort[port].addCallComp(
160 this,
161 m_p_pingIn_in
162 );
163 this->m_pingIn_InputPort[port].setPortNum(port);
164
165#if FW_OBJECT_NAMES == 1
166 // The port name consists of this->m_objName and some extra info.
167 // We expect all of this to fit in FW_OBJ_NAME_MAX_SIZE bytes.
168 // However, the compiler may assume that this->m_objName fills
169 // the entire array, whose size is FW_OBJ_NAME_MAX_SIZE. So to
170 // avoid a compiler warning, we provide an extra FW_OBJ_NAME_MAX_SIZE
171 // bytes to cover the extra info.
172 char portName[2*FW_OBJ_NAME_MAX_SIZE];
173 (void) snprintf(
174 portName,
175 sizeof(portName),
176 "%s_pingIn_InputPort[%" PRI_PlatformIntType "]",
177 this->m_objName,
178 port
179 );
180 this->m_pingIn_InputPort[port].setObjName(portName);
181#endif
182 }
183
184 // Connect output port CmdReg
185 for (
186 PlatformIntType port = 0;
187 port < static_cast<PlatformIntType>(this->getNum_CmdReg_OutputPorts());
188 port++
189 ) {
190 this->m_CmdReg_OutputPort[port].init();
191
192#if FW_OBJECT_NAMES == 1
193 // The port name consists of this->m_objName and some extra info.
194 // We expect all of this to fit in FW_OBJ_NAME_MAX_SIZE bytes.
195 // However, the compiler may assume that this->m_objName fills
196 // the entire array, whose size is FW_OBJ_NAME_MAX_SIZE. So to
197 // avoid a compiler warning, we provide an extra FW_OBJ_NAME_MAX_SIZE
198 // bytes to cover the extra info.
199 char portName[2*FW_OBJ_NAME_MAX_SIZE];
200 (void) snprintf(
201 portName,
202 sizeof(portName),
203 "%s_CmdReg_OutputPort[%" PRI_PlatformIntType "]",
204 this->m_objName,
205 port
206 );
207 this->m_CmdReg_OutputPort[port].setObjName(portName);
208#endif
209 }
210
211 // Connect output port CmdStatus
212 for (
213 PlatformIntType port = 0;
214 port < static_cast<PlatformIntType>(this->getNum_CmdStatus_OutputPorts());
215 port++
216 ) {
217 this->m_CmdStatus_OutputPort[port].init();
218
219#if FW_OBJECT_NAMES == 1
220 // The port name consists of this->m_objName and some extra info.
221 // We expect all of this to fit in FW_OBJ_NAME_MAX_SIZE bytes.
222 // However, the compiler may assume that this->m_objName fills
223 // the entire array, whose size is FW_OBJ_NAME_MAX_SIZE. So to
224 // avoid a compiler warning, we provide an extra FW_OBJ_NAME_MAX_SIZE
225 // bytes to cover the extra info.
226 char portName[2*FW_OBJ_NAME_MAX_SIZE];
227 (void) snprintf(
228 portName,
229 sizeof(portName),
230 "%s_CmdStatus_OutputPort[%" PRI_PlatformIntType "]",
231 this->m_objName,
232 port
233 );
234 this->m_CmdStatus_OutputPort[port].setObjName(portName);
235#endif
236 }
237
238 // Connect output port Log
239 for (
240 PlatformIntType port = 0;
241 port < static_cast<PlatformIntType>(this->getNum_Log_OutputPorts());
242 port++
243 ) {
244 this->m_Log_OutputPort[port].init();
245
246#if FW_OBJECT_NAMES == 1
247 // The port name consists of this->m_objName and some extra info.
248 // We expect all of this to fit in FW_OBJ_NAME_MAX_SIZE bytes.
249 // However, the compiler may assume that this->m_objName fills
250 // the entire array, whose size is FW_OBJ_NAME_MAX_SIZE. So to
251 // avoid a compiler warning, we provide an extra FW_OBJ_NAME_MAX_SIZE
252 // bytes to cover the extra info.
253 char portName[2*FW_OBJ_NAME_MAX_SIZE];
254 (void) snprintf(
255 portName,
256 sizeof(portName),
257 "%s_Log_OutputPort[%" PRI_PlatformIntType "]",
258 this->m_objName,
259 port
260 );
261 this->m_Log_OutputPort[port].setObjName(portName);
262#endif
263 }
264
265#if FW_ENABLE_TEXT_LOGGING == 1
266 // Connect output port LogText
267 for (
268 PlatformIntType port = 0;
269 port < static_cast<PlatformIntType>(this->getNum_LogText_OutputPorts());
270 port++
271 ) {
272 this->m_LogText_OutputPort[port].init();
273
274#if FW_OBJECT_NAMES == 1
275 // The port name consists of this->m_objName and some extra info.
276 // We expect all of this to fit in FW_OBJ_NAME_MAX_SIZE bytes.
277 // However, the compiler may assume that this->m_objName fills
278 // the entire array, whose size is FW_OBJ_NAME_MAX_SIZE. So to
279 // avoid a compiler warning, we provide an extra FW_OBJ_NAME_MAX_SIZE
280 // bytes to cover the extra info.
281 char portName[2*FW_OBJ_NAME_MAX_SIZE];
282 (void) snprintf(
283 portName,
284 sizeof(portName),
285 "%s_LogText_OutputPort[%" PRI_PlatformIntType "]",
286 this->m_objName,
287 port
288 );
289 this->m_LogText_OutputPort[port].setObjName(portName);
290#endif
291 }
292#endif
293
294 // Connect output port Time
295 for (
296 PlatformIntType port = 0;
297 port < static_cast<PlatformIntType>(this->getNum_Time_OutputPorts());
298 port++
299 ) {
300 this->m_Time_OutputPort[port].init();
301
302#if FW_OBJECT_NAMES == 1
303 // The port name consists of this->m_objName and some extra info.
304 // We expect all of this to fit in FW_OBJ_NAME_MAX_SIZE bytes.
305 // However, the compiler may assume that this->m_objName fills
306 // the entire array, whose size is FW_OBJ_NAME_MAX_SIZE. So to
307 // avoid a compiler warning, we provide an extra FW_OBJ_NAME_MAX_SIZE
308 // bytes to cover the extra info.
309 char portName[2*FW_OBJ_NAME_MAX_SIZE];
310 (void) snprintf(
311 portName,
312 sizeof(portName),
313 "%s_Time_OutputPort[%" PRI_PlatformIntType "]",
314 this->m_objName,
315 port
316 );
317 this->m_Time_OutputPort[port].setObjName(portName);
318#endif
319 }
320
321 // Connect output port FatalAnnounce
322 for (
323 PlatformIntType port = 0;
324 port < static_cast<PlatformIntType>(this->getNum_FatalAnnounce_OutputPorts());
325 port++
326 ) {
327 this->m_FatalAnnounce_OutputPort[port].init();
328
329#if FW_OBJECT_NAMES == 1
330 // The port name consists of this->m_objName and some extra info.
331 // We expect all of this to fit in FW_OBJ_NAME_MAX_SIZE bytes.
332 // However, the compiler may assume that this->m_objName fills
333 // the entire array, whose size is FW_OBJ_NAME_MAX_SIZE. So to
334 // avoid a compiler warning, we provide an extra FW_OBJ_NAME_MAX_SIZE
335 // bytes to cover the extra info.
336 char portName[2*FW_OBJ_NAME_MAX_SIZE];
337 (void) snprintf(
338 portName,
339 sizeof(portName),
340 "%s_FatalAnnounce_OutputPort[%" PRI_PlatformIntType "]",
341 this->m_objName,
342 port
343 );
344 this->m_FatalAnnounce_OutputPort[port].setObjName(portName);
345#endif
346 }
347
348 // Connect output port PktSend
349 for (
350 PlatformIntType port = 0;
351 port < static_cast<PlatformIntType>(this->getNum_PktSend_OutputPorts());
352 port++
353 ) {
354 this->m_PktSend_OutputPort[port].init();
355
356#if FW_OBJECT_NAMES == 1
357 // The port name consists of this->m_objName and some extra info.
358 // We expect all of this to fit in FW_OBJ_NAME_MAX_SIZE bytes.
359 // However, the compiler may assume that this->m_objName fills
360 // the entire array, whose size is FW_OBJ_NAME_MAX_SIZE. So to
361 // avoid a compiler warning, we provide an extra FW_OBJ_NAME_MAX_SIZE
362 // bytes to cover the extra info.
363 char portName[2*FW_OBJ_NAME_MAX_SIZE];
364 (void) snprintf(
365 portName,
366 sizeof(portName),
367 "%s_PktSend_OutputPort[%" PRI_PlatformIntType "]",
368 this->m_objName,
369 port
370 );
371 this->m_PktSend_OutputPort[port].setObjName(portName);
372#endif
373 }
374
375 // Connect output port pingOut
376 for (
377 PlatformIntType port = 0;
378 port < static_cast<PlatformIntType>(this->getNum_pingOut_OutputPorts());
379 port++
380 ) {
381 this->m_pingOut_OutputPort[port].init();
382
383#if FW_OBJECT_NAMES == 1
384 // The port name consists of this->m_objName and some extra info.
385 // We expect all of this to fit in FW_OBJ_NAME_MAX_SIZE bytes.
386 // However, the compiler may assume that this->m_objName fills
387 // the entire array, whose size is FW_OBJ_NAME_MAX_SIZE. So to
388 // avoid a compiler warning, we provide an extra FW_OBJ_NAME_MAX_SIZE
389 // bytes to cover the extra info.
390 char portName[2*FW_OBJ_NAME_MAX_SIZE];
391 (void) snprintf(
392 portName,
393 sizeof(portName),
394 "%s_pingOut_OutputPort[%" PRI_PlatformIntType "]",
395 this->m_objName,
396 port
397 );
398 this->m_pingOut_OutputPort[port].setObjName(portName);
399#endif
400 }
401
402 Os::Queue::QueueStatus qStat = this->createQueue(
403 queueDepth,
404 ComponentIpcSerializableBuffer::SERIALIZATION_SIZE
405 );
406 FW_ASSERT(
407 Os::Queue::QUEUE_OK == qStat,
408 static_cast<FwAssertArgType>(qStat)
409 );
410 }
411
412 // ----------------------------------------------------------------------
413 // Getters for special input ports
414 // ----------------------------------------------------------------------
415
416 Fw::InputCmdPort* ActiveLoggerComponentBase ::
417 get_CmdDisp_InputPort(NATIVE_INT_TYPE portNum)
418 {
419 FW_ASSERT(
420 portNum < this->getNum_CmdDisp_InputPorts(),
421 static_cast<FwAssertArgType>(portNum)
422 );
423
424 return &this->m_CmdDisp_InputPort[portNum];
425 }
426
427 // ----------------------------------------------------------------------
428 // Getters for typed input ports
429 // ----------------------------------------------------------------------
430
431 Fw::InputLogPort* ActiveLoggerComponentBase ::
432 get_LogRecv_InputPort(NATIVE_INT_TYPE portNum)
433 {
434 FW_ASSERT(
435 portNum < this->getNum_LogRecv_InputPorts(),
436 static_cast<FwAssertArgType>(portNum)
437 );
438
439 return &this->m_LogRecv_InputPort[portNum];
440 }
441
442 Svc::InputPingPort* ActiveLoggerComponentBase ::
443 get_pingIn_InputPort(NATIVE_INT_TYPE portNum)
444 {
445 FW_ASSERT(
446 portNum < this->getNum_pingIn_InputPorts(),
447 static_cast<FwAssertArgType>(portNum)
448 );
449
450 return &this->m_pingIn_InputPort[portNum];
451 }
452
453 // ----------------------------------------------------------------------
454 // Connect input ports to special output ports
455 // ----------------------------------------------------------------------
456
457 void ActiveLoggerComponentBase ::
458 set_CmdReg_OutputPort(
459 NATIVE_INT_TYPE portNum,
461 )
462 {
463 FW_ASSERT(
464 portNum < this->getNum_CmdReg_OutputPorts(),
465 static_cast<FwAssertArgType>(portNum)
466 );
467
468 this->m_CmdReg_OutputPort[portNum].addCallPort(port);
469 }
470
471 void ActiveLoggerComponentBase ::
472 set_CmdStatus_OutputPort(
473 NATIVE_INT_TYPE portNum,
475 )
476 {
477 FW_ASSERT(
478 portNum < this->getNum_CmdStatus_OutputPorts(),
479 static_cast<FwAssertArgType>(portNum)
480 );
481
482 this->m_CmdStatus_OutputPort[portNum].addCallPort(port);
483 }
484
485 void ActiveLoggerComponentBase ::
486 set_Log_OutputPort(
487 NATIVE_INT_TYPE portNum,
488 Fw::InputLogPort* port
489 )
490 {
491 FW_ASSERT(
492 portNum < this->getNum_Log_OutputPorts(),
493 static_cast<FwAssertArgType>(portNum)
494 );
495
496 this->m_Log_OutputPort[portNum].addCallPort(port);
497 }
498
499#if FW_ENABLE_TEXT_LOGGING == 1
500
501 void ActiveLoggerComponentBase ::
502 set_LogText_OutputPort(
503 NATIVE_INT_TYPE portNum,
505 )
506 {
507 FW_ASSERT(
508 portNum < this->getNum_LogText_OutputPorts(),
509 static_cast<FwAssertArgType>(portNum)
510 );
511
512 this->m_LogText_OutputPort[portNum].addCallPort(port);
513 }
514
515#endif
516
517 void ActiveLoggerComponentBase ::
518 set_Time_OutputPort(
519 NATIVE_INT_TYPE portNum,
521 )
522 {
523 FW_ASSERT(
524 portNum < this->getNum_Time_OutputPorts(),
525 static_cast<FwAssertArgType>(portNum)
526 );
527
528 this->m_Time_OutputPort[portNum].addCallPort(port);
529 }
530
531 // ----------------------------------------------------------------------
532 // Connect typed input ports to typed output ports
533 // ----------------------------------------------------------------------
534
535 void ActiveLoggerComponentBase ::
536 set_FatalAnnounce_OutputPort(
537 NATIVE_INT_TYPE portNum,
539 )
540 {
541 FW_ASSERT(
542 portNum < this->getNum_FatalAnnounce_OutputPorts(),
543 static_cast<FwAssertArgType>(portNum)
544 );
545
546 this->m_FatalAnnounce_OutputPort[portNum].addCallPort(port);
547 }
548
549 void ActiveLoggerComponentBase ::
550 set_PktSend_OutputPort(
551 NATIVE_INT_TYPE portNum,
552 Fw::InputComPort* port
553 )
554 {
555 FW_ASSERT(
556 portNum < this->getNum_PktSend_OutputPorts(),
557 static_cast<FwAssertArgType>(portNum)
558 );
559
560 this->m_PktSend_OutputPort[portNum].addCallPort(port);
561 }
562
563 void ActiveLoggerComponentBase ::
564 set_pingOut_OutputPort(
565 NATIVE_INT_TYPE portNum,
567 )
568 {
569 FW_ASSERT(
570 portNum < this->getNum_pingOut_OutputPorts(),
571 static_cast<FwAssertArgType>(portNum)
572 );
573
574 this->m_pingOut_OutputPort[portNum].addCallPort(port);
575 }
576
577#if FW_PORT_SERIALIZATION
578
579 // ----------------------------------------------------------------------
580 // Connect serial input ports to special output ports
581 // ----------------------------------------------------------------------
582
583 void ActiveLoggerComponentBase ::
584 set_CmdReg_OutputPort(
585 NATIVE_INT_TYPE portNum,
586 Fw::InputSerializePort* port
587 )
588 {
589 FW_ASSERT(
590 portNum < this->getNum_CmdReg_OutputPorts(),
591 static_cast<FwAssertArgType>(portNum)
592 );
593
594 this->m_CmdReg_OutputPort[portNum].registerSerialPort(port);
595 }
596
597 void ActiveLoggerComponentBase ::
598 set_CmdStatus_OutputPort(
599 NATIVE_INT_TYPE portNum,
600 Fw::InputSerializePort* port
601 )
602 {
603 FW_ASSERT(
604 portNum < this->getNum_CmdStatus_OutputPorts(),
605 static_cast<FwAssertArgType>(portNum)
606 );
607
608 this->m_CmdStatus_OutputPort[portNum].registerSerialPort(port);
609 }
610
611 void ActiveLoggerComponentBase ::
612 set_Log_OutputPort(
613 NATIVE_INT_TYPE portNum,
614 Fw::InputSerializePort* port
615 )
616 {
617 FW_ASSERT(
618 portNum < this->getNum_Log_OutputPorts(),
619 static_cast<FwAssertArgType>(portNum)
620 );
621
622 this->m_Log_OutputPort[portNum].registerSerialPort(port);
623 }
624
625#if FW_ENABLE_TEXT_LOGGING == 1
626
627 void ActiveLoggerComponentBase ::
628 set_LogText_OutputPort(
629 NATIVE_INT_TYPE portNum,
630 Fw::InputSerializePort* port
631 )
632 {
633 FW_ASSERT(
634 portNum < this->getNum_LogText_OutputPorts(),
635 static_cast<FwAssertArgType>(portNum)
636 );
637
638 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
639 }
640
641#endif
642
643 void ActiveLoggerComponentBase ::
644 set_Time_OutputPort(
645 NATIVE_INT_TYPE portNum,
646 Fw::InputSerializePort* port
647 )
648 {
649 FW_ASSERT(
650 portNum < this->getNum_Time_OutputPorts(),
651 static_cast<FwAssertArgType>(portNum)
652 );
653
654 this->m_Time_OutputPort[portNum].registerSerialPort(port);
655 }
656
657#endif
658
659#if FW_PORT_SERIALIZATION
660
661 // ----------------------------------------------------------------------
662 // Connect serial input ports to typed output ports
663 // ----------------------------------------------------------------------
664
665 void ActiveLoggerComponentBase ::
666 set_FatalAnnounce_OutputPort(
667 NATIVE_INT_TYPE portNum,
668 Fw::InputSerializePort* port
669 )
670 {
671 FW_ASSERT(
672 portNum < this->getNum_FatalAnnounce_OutputPorts(),
673 static_cast<FwAssertArgType>(portNum)
674 );
675
676 this->m_FatalAnnounce_OutputPort[portNum].registerSerialPort(port);
677 }
678
679 void ActiveLoggerComponentBase ::
680 set_PktSend_OutputPort(
681 NATIVE_INT_TYPE portNum,
682 Fw::InputSerializePort* port
683 )
684 {
685 FW_ASSERT(
686 portNum < this->getNum_PktSend_OutputPorts(),
687 static_cast<FwAssertArgType>(portNum)
688 );
689
690 this->m_PktSend_OutputPort[portNum].registerSerialPort(port);
691 }
692
693 void ActiveLoggerComponentBase ::
694 set_pingOut_OutputPort(
695 NATIVE_INT_TYPE portNum,
696 Fw::InputSerializePort* port
697 )
698 {
699 FW_ASSERT(
700 portNum < this->getNum_pingOut_OutputPorts(),
701 static_cast<FwAssertArgType>(portNum)
702 );
703
704 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
705 }
706
707#endif
708
709 // ----------------------------------------------------------------------
710 // Command registration
711 // ----------------------------------------------------------------------
712
713 void ActiveLoggerComponentBase ::
714 regCommands()
715 {
716 FW_ASSERT(this->m_CmdReg_OutputPort[0].isConnected());
717
718 this->m_CmdReg_OutputPort[0].invoke(
719 this->getIdBase() + OPCODE_SET_EVENT_FILTER
720 );
721
722 this->m_CmdReg_OutputPort[0].invoke(
723 this->getIdBase() + OPCODE_SET_ID_FILTER
724 );
725
726 this->m_CmdReg_OutputPort[0].invoke(
727 this->getIdBase() + OPCODE_DUMP_FILTER_STATE
728 );
729 }
730
731 // ----------------------------------------------------------------------
732 // Component construction and destruction
733 // ----------------------------------------------------------------------
734
735 ActiveLoggerComponentBase ::
736 ActiveLoggerComponentBase(const char* compName) :
737 Fw::ActiveComponentBase(compName)
738 {
739
740 }
741
742 ActiveLoggerComponentBase ::
743 ~ActiveLoggerComponentBase()
744 {
745
746 }
747
748 // ----------------------------------------------------------------------
749 // Getters for numbers of special input ports
750 // ----------------------------------------------------------------------
751
752 NATIVE_INT_TYPE ActiveLoggerComponentBase ::
753 getNum_CmdDisp_InputPorts() const
754 {
755 return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_CmdDisp_InputPort));
756 }
757
758 // ----------------------------------------------------------------------
759 // Getters for numbers of typed input ports
760 // ----------------------------------------------------------------------
761
762 NATIVE_INT_TYPE ActiveLoggerComponentBase ::
763 getNum_LogRecv_InputPorts() const
764 {
765 return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_LogRecv_InputPort));
766 }
767
768 NATIVE_INT_TYPE ActiveLoggerComponentBase ::
769 getNum_pingIn_InputPorts() const
770 {
771 return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_pingIn_InputPort));
772 }
773
774 // ----------------------------------------------------------------------
775 // Getters for numbers of special output ports
776 // ----------------------------------------------------------------------
777
778 NATIVE_INT_TYPE ActiveLoggerComponentBase ::
779 getNum_CmdReg_OutputPorts() const
780 {
781 return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_CmdReg_OutputPort));
782 }
783
784 NATIVE_INT_TYPE ActiveLoggerComponentBase ::
785 getNum_CmdStatus_OutputPorts() const
786 {
787 return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_CmdStatus_OutputPort));
788 }
789
790 NATIVE_INT_TYPE ActiveLoggerComponentBase ::
791 getNum_Log_OutputPorts() const
792 {
793 return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_Log_OutputPort));
794 }
795
796#if FW_ENABLE_TEXT_LOGGING == 1
797
798 NATIVE_INT_TYPE ActiveLoggerComponentBase ::
799 getNum_LogText_OutputPorts() const
800 {
801 return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_LogText_OutputPort));
802 }
803
804#endif
805
806 NATIVE_INT_TYPE ActiveLoggerComponentBase ::
807 getNum_Time_OutputPorts() const
808 {
809 return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_Time_OutputPort));
810 }
811
812 // ----------------------------------------------------------------------
813 // Getters for numbers of typed output ports
814 // ----------------------------------------------------------------------
815
816 NATIVE_INT_TYPE ActiveLoggerComponentBase ::
817 getNum_FatalAnnounce_OutputPorts() const
818 {
819 return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_FatalAnnounce_OutputPort));
820 }
821
822 NATIVE_INT_TYPE ActiveLoggerComponentBase ::
823 getNum_PktSend_OutputPorts() const
824 {
825 return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_PktSend_OutputPort));
826 }
827
828 NATIVE_INT_TYPE ActiveLoggerComponentBase ::
829 getNum_pingOut_OutputPorts() const
830 {
831 return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_pingOut_OutputPort));
832 }
833
834 // ----------------------------------------------------------------------
835 // Connection status queries for special output ports
836 // ----------------------------------------------------------------------
837
838 bool ActiveLoggerComponentBase ::
839 isConnected_CmdReg_OutputPort(NATIVE_INT_TYPE portNum)
840 {
841 FW_ASSERT(
842 portNum < this->getNum_CmdReg_OutputPorts(),
843 static_cast<FwAssertArgType>(portNum)
844 );
845
846 return this->m_CmdReg_OutputPort[portNum].isConnected();
847 }
848
849 bool ActiveLoggerComponentBase ::
850 isConnected_CmdStatus_OutputPort(NATIVE_INT_TYPE portNum)
851 {
852 FW_ASSERT(
853 portNum < this->getNum_CmdStatus_OutputPorts(),
854 static_cast<FwAssertArgType>(portNum)
855 );
856
857 return this->m_CmdStatus_OutputPort[portNum].isConnected();
858 }
859
860 bool ActiveLoggerComponentBase ::
861 isConnected_Log_OutputPort(NATIVE_INT_TYPE portNum)
862 {
863 FW_ASSERT(
864 portNum < this->getNum_Log_OutputPorts(),
865 static_cast<FwAssertArgType>(portNum)
866 );
867
868 return this->m_Log_OutputPort[portNum].isConnected();
869 }
870
871#if FW_ENABLE_TEXT_LOGGING == 1
872
873 bool ActiveLoggerComponentBase ::
874 isConnected_LogText_OutputPort(NATIVE_INT_TYPE portNum)
875 {
876 FW_ASSERT(
877 portNum < this->getNum_LogText_OutputPorts(),
878 static_cast<FwAssertArgType>(portNum)
879 );
880
881 return this->m_LogText_OutputPort[portNum].isConnected();
882 }
883
884#endif
885
886 bool ActiveLoggerComponentBase ::
887 isConnected_Time_OutputPort(NATIVE_INT_TYPE portNum)
888 {
889 FW_ASSERT(
890 portNum < this->getNum_Time_OutputPorts(),
891 static_cast<FwAssertArgType>(portNum)
892 );
893
894 return this->m_Time_OutputPort[portNum].isConnected();
895 }
896
897 // ----------------------------------------------------------------------
898 // Connection status queries for typed output ports
899 // ----------------------------------------------------------------------
900
901 bool ActiveLoggerComponentBase ::
902 isConnected_FatalAnnounce_OutputPort(NATIVE_INT_TYPE portNum)
903 {
904 FW_ASSERT(
905 portNum < this->getNum_FatalAnnounce_OutputPorts(),
906 static_cast<FwAssertArgType>(portNum)
907 );
908
909 return this->m_FatalAnnounce_OutputPort[portNum].isConnected();
910 }
911
912 bool ActiveLoggerComponentBase ::
913 isConnected_PktSend_OutputPort(NATIVE_INT_TYPE portNum)
914 {
915 FW_ASSERT(
916 portNum < this->getNum_PktSend_OutputPorts(),
917 static_cast<FwAssertArgType>(portNum)
918 );
919
920 return this->m_PktSend_OutputPort[portNum].isConnected();
921 }
922
923 bool ActiveLoggerComponentBase ::
924 isConnected_pingOut_OutputPort(NATIVE_INT_TYPE portNum)
925 {
926 FW_ASSERT(
927 portNum < this->getNum_pingOut_OutputPorts(),
928 static_cast<FwAssertArgType>(portNum)
929 );
930
931 return this->m_pingOut_OutputPort[portNum].isConnected();
932 }
933
934 // ----------------------------------------------------------------------
935 // Port handler base-class functions for typed input ports
936 //
937 // Call these functions directly to bypass the corresponding ports
938 // ----------------------------------------------------------------------
939
940 void ActiveLoggerComponentBase ::
941 LogRecv_handlerBase(
942 NATIVE_INT_TYPE portNum,
943 FwEventIdType id,
944 Fw::Time& timeTag,
945 const Fw::LogSeverity& severity,
946 Fw::LogBuffer& args
947 )
948 {
949 // Make sure port number is valid
950 FW_ASSERT(
951 portNum < this->getNum_LogRecv_InputPorts(),
952 static_cast<FwAssertArgType>(portNum)
953 );
954
955 // Call handler function
956 this->LogRecv_handler(
957 portNum,
958 id,
959 timeTag,
960 severity,
961 args
962 );
963 }
964
965 void ActiveLoggerComponentBase ::
966 pingIn_handlerBase(
967 NATIVE_INT_TYPE portNum,
968 U32 key
969 )
970 {
971 // Make sure port number is valid
972 FW_ASSERT(
973 portNum < this->getNum_pingIn_InputPorts(),
974 static_cast<FwAssertArgType>(portNum)
975 );
976
977 // Call pre-message hook
978 pingIn_preMsgHook(
979 portNum,
980 key
981 );
982 ComponentIpcSerializableBuffer msg;
984
985 // Serialize message ID
986 _status = msg.serialize(
987 static_cast<NATIVE_INT_TYPE>(PINGIN_PING)
988 );
989 FW_ASSERT(
990 _status == Fw::FW_SERIALIZE_OK,
991 static_cast<FwAssertArgType>(_status)
992 );
993
994 // Serialize port number
995 _status = msg.serialize(portNum);
996 FW_ASSERT(
997 _status == Fw::FW_SERIALIZE_OK,
998 static_cast<FwAssertArgType>(_status)
999 );
1000
1001 // Serialize argument key
1002 _status = msg.serialize(key);
1003 FW_ASSERT(
1004 _status == Fw::FW_SERIALIZE_OK,
1005 static_cast<FwAssertArgType>(_status)
1006 );
1007
1008 // Send message
1010 Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block);
1011
1012 FW_ASSERT(
1013 qStatus == Os::Queue::QUEUE_OK,
1014 static_cast<FwAssertArgType>(qStatus)
1015 );
1016 }
1017
1018 // ----------------------------------------------------------------------
1019 // Pre-message hooks for typed async input ports
1020 //
1021 // Each of these functions is invoked just before processing a message
1022 // on the corresponding port. By default, they do nothing. You can
1023 // override them to provide specific pre-message behavior.
1024 // ----------------------------------------------------------------------
1025
1026 void ActiveLoggerComponentBase ::
1027 pingIn_preMsgHook(
1028 NATIVE_INT_TYPE portNum,
1029 U32 key
1030 )
1031 {
1032 // Default: no-op
1033 }
1034
1035 // ----------------------------------------------------------------------
1036 // Invocation functions for typed output ports
1037 // ----------------------------------------------------------------------
1038
1039 void ActiveLoggerComponentBase ::
1040 FatalAnnounce_out(
1041 NATIVE_INT_TYPE portNum,
1042 FwEventIdType Id
1043 )
1044 {
1045 FW_ASSERT(
1046 portNum < this->getNum_FatalAnnounce_OutputPorts(),
1047 static_cast<FwAssertArgType>(portNum)
1048 );
1049 this->m_FatalAnnounce_OutputPort[portNum].invoke(
1050 Id
1051 );
1052 }
1053
1054 void ActiveLoggerComponentBase ::
1055 PktSend_out(
1056 NATIVE_INT_TYPE portNum,
1057 Fw::ComBuffer& data,
1058 U32 context
1059 )
1060 {
1061 FW_ASSERT(
1062 portNum < this->getNum_PktSend_OutputPorts(),
1063 static_cast<FwAssertArgType>(portNum)
1064 );
1065 this->m_PktSend_OutputPort[portNum].invoke(
1066 data,
1067 context
1068 );
1069 }
1070
1071 void ActiveLoggerComponentBase ::
1072 pingOut_out(
1073 NATIVE_INT_TYPE portNum,
1074 U32 key
1075 )
1076 {
1077 FW_ASSERT(
1078 portNum < this->getNum_pingOut_OutputPorts(),
1079 static_cast<FwAssertArgType>(portNum)
1080 );
1081 this->m_pingOut_OutputPort[portNum].invoke(
1082 key
1083 );
1084 }
1085
1086 // ----------------------------------------------------------------------
1087 // Internal interface base-class functions
1088 // ----------------------------------------------------------------------
1089
1090 void ActiveLoggerComponentBase ::
1091 loqQueue_internalInterfaceInvoke(
1092 FwEventIdType id,
1093 const Fw::Time& timeTag,
1094 const Fw::LogSeverity& severity,
1095 const Fw::LogBuffer& args
1096 )
1097 {
1098 ComponentIpcSerializableBuffer msg;
1100
1101 // Serialize the message ID
1102 _status = msg.serialize(static_cast<NATIVE_INT_TYPE>(INT_IF_LOQQUEUE));
1103 FW_ASSERT (
1104 _status == Fw::FW_SERIALIZE_OK,
1105 static_cast<FwAssertArgType>(_status)
1106 );
1107
1108 // Fake port number to make message dequeue work
1109 _status = msg.serialize(static_cast<NATIVE_INT_TYPE>(0));
1110 FW_ASSERT (
1111 _status == Fw::FW_SERIALIZE_OK,
1112 static_cast<FwAssertArgType>(_status)
1113 );
1114
1115 _status = msg.serialize(id);
1116 FW_ASSERT(
1117 _status == Fw::FW_SERIALIZE_OK,
1118 static_cast<FwAssertArgType>(_status)
1119 );
1120
1121 _status = msg.serialize(timeTag);
1122 FW_ASSERT(
1123 _status == Fw::FW_SERIALIZE_OK,
1124 static_cast<FwAssertArgType>(_status)
1125 );
1126
1127 _status = msg.serialize(severity);
1128 FW_ASSERT(
1129 _status == Fw::FW_SERIALIZE_OK,
1130 static_cast<FwAssertArgType>(_status)
1131 );
1132
1133 _status = msg.serialize(args);
1134 FW_ASSERT(
1135 _status == Fw::FW_SERIALIZE_OK,
1136 static_cast<FwAssertArgType>(_status)
1137 );
1138
1139 // Send message
1141 Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 1, _block);
1142
1143 if (qStatus == Os::Queue::QUEUE_FULL) {
1144 this->incNumMsgDropped();
1145 return;
1146 }
1147
1148 FW_ASSERT(
1149 qStatus == Os::Queue::QUEUE_OK,
1150 static_cast<FwAssertArgType>(qStatus)
1151 );
1152 }
1153
1154 // ----------------------------------------------------------------------
1155 // Command response
1156 // ----------------------------------------------------------------------
1157
1158 void ActiveLoggerComponentBase ::
1159 cmdResponse_out(
1160 FwOpcodeType opCode,
1161 U32 cmdSeq,
1162 Fw::CmdResponse response
1163 )
1164 {
1165 FW_ASSERT(this->m_CmdStatus_OutputPort[0].isConnected());
1166 this->m_CmdStatus_OutputPort[0].invoke(opCode, cmdSeq, response);
1167 }
1168
1169 // ----------------------------------------------------------------------
1170 // Command handler base-class functions
1171 //
1172 // Call these functions directly to bypass the command input port
1173 // ----------------------------------------------------------------------
1174
1175 void ActiveLoggerComponentBase ::
1176 SET_EVENT_FILTER_cmdHandlerBase(
1177 FwOpcodeType opCode,
1178 U32 cmdSeq,
1179 Fw::CmdArgBuffer& args
1180 )
1181 {
1182 // Deserialize the arguments
1184
1185 // Reset the buffer
1186 args.resetDeser();
1187
1189 _status = args.deserialize(filterLevel);
1190 if (_status != Fw::FW_SERIALIZE_OK) {
1191 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
1192 this->m_CmdStatus_OutputPort[0].invoke(
1193 opCode,
1194 cmdSeq,
1196 );
1197 }
1198 return;
1199 }
1200
1201 Svc::ActiveLogger_Enabled filterEnabled;
1202 _status = args.deserialize(filterEnabled);
1203 if (_status != Fw::FW_SERIALIZE_OK) {
1204 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
1205 this->m_CmdStatus_OutputPort[0].invoke(
1206 opCode,
1207 cmdSeq,
1209 );
1210 }
1211 return;
1212 }
1213
1214#if FW_CMD_CHECK_RESIDUAL
1215 // Make sure there was no data left over.
1216 // That means the argument buffer size was incorrect.
1217 if (args.getBuffLeft() != 0) {
1218 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
1219 this->m_CmdStatus_OutputPort[0].invoke(
1220 opCode,
1221 cmdSeq,
1223 );
1224 }
1225 return;
1226 }
1227#endif
1228
1229 this->SET_EVENT_FILTER_cmdHandler(
1230 opCode, cmdSeq,
1231 filterLevel,
1232 filterEnabled
1233 );
1234 }
1235
1236 void ActiveLoggerComponentBase ::
1237 SET_ID_FILTER_cmdHandlerBase(
1238 FwOpcodeType opCode,
1239 U32 cmdSeq,
1240 Fw::CmdArgBuffer& args
1241 )
1242 {
1243 // Call pre-message hook
1244 this->SET_ID_FILTER_preMsgHook(opCode,cmdSeq);
1245
1246 // Defer deserializing arguments to the message dispatcher
1247 // to avoid deserializing and reserializing just for IPC
1248 ComponentIpcSerializableBuffer msg;
1250
1251 // Serialize for IPC
1252 _status = msg.serialize(static_cast<NATIVE_INT_TYPE>(CMD_SET_ID_FILTER));
1253 FW_ASSERT (
1254 _status == Fw::FW_SERIALIZE_OK,
1255 static_cast<FwAssertArgType>(_status)
1256 );
1257
1258 // Fake port number to make message dequeue work
1259 NATIVE_INT_TYPE port = 0;
1260
1261 _status = msg.serialize(port);
1262 FW_ASSERT (
1263 _status == Fw::FW_SERIALIZE_OK,
1264 static_cast<FwAssertArgType>(_status)
1265 );
1266
1267 _status = msg.serialize(opCode);
1268 FW_ASSERT (
1269 _status == Fw::FW_SERIALIZE_OK,
1270 static_cast<FwAssertArgType>(_status)
1271 );
1272
1273 _status = msg.serialize(cmdSeq);
1274 FW_ASSERT (
1275 _status == Fw::FW_SERIALIZE_OK,
1276 static_cast<FwAssertArgType>(_status)
1277 );
1278
1279 _status = msg.serialize(args);
1280 FW_ASSERT (
1281 _status == Fw::FW_SERIALIZE_OK,
1282 static_cast<FwAssertArgType>(_status)
1283 );
1284
1285 // Send message
1287 Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block);
1288
1289 FW_ASSERT(
1290 qStatus == Os::Queue::QUEUE_OK,
1291 static_cast<FwAssertArgType>(qStatus)
1292 );
1293 }
1294
1295 void ActiveLoggerComponentBase ::
1296 DUMP_FILTER_STATE_cmdHandlerBase(
1297 FwOpcodeType opCode,
1298 U32 cmdSeq,
1299 Fw::CmdArgBuffer& args
1300 )
1301 {
1302 // Call pre-message hook
1303 this->DUMP_FILTER_STATE_preMsgHook(opCode,cmdSeq);
1304
1305 // Defer deserializing arguments to the message dispatcher
1306 // to avoid deserializing and reserializing just for IPC
1307 ComponentIpcSerializableBuffer msg;
1309
1310 // Serialize for IPC
1311 _status = msg.serialize(static_cast<NATIVE_INT_TYPE>(CMD_DUMP_FILTER_STATE));
1312 FW_ASSERT (
1313 _status == Fw::FW_SERIALIZE_OK,
1314 static_cast<FwAssertArgType>(_status)
1315 );
1316
1317 // Fake port number to make message dequeue work
1318 NATIVE_INT_TYPE port = 0;
1319
1320 _status = msg.serialize(port);
1321 FW_ASSERT (
1322 _status == Fw::FW_SERIALIZE_OK,
1323 static_cast<FwAssertArgType>(_status)
1324 );
1325
1326 _status = msg.serialize(opCode);
1327 FW_ASSERT (
1328 _status == Fw::FW_SERIALIZE_OK,
1329 static_cast<FwAssertArgType>(_status)
1330 );
1331
1332 _status = msg.serialize(cmdSeq);
1333 FW_ASSERT (
1334 _status == Fw::FW_SERIALIZE_OK,
1335 static_cast<FwAssertArgType>(_status)
1336 );
1337
1338 _status = msg.serialize(args);
1339 FW_ASSERT (
1340 _status == Fw::FW_SERIALIZE_OK,
1341 static_cast<FwAssertArgType>(_status)
1342 );
1343
1344 // Send message
1346 Os::Queue::QueueStatus qStatus = this->m_queue.send(msg, 0, _block);
1347
1348 FW_ASSERT(
1349 qStatus == Os::Queue::QUEUE_OK,
1350 static_cast<FwAssertArgType>(qStatus)
1351 );
1352 }
1353
1354 // ----------------------------------------------------------------------
1355 // Pre-message hooks for async commands
1356 //
1357 // Each of these functions is invoked just before processing the
1358 // corresponding command. By default they do nothing. You can
1359 // override them to provide specific pre-command behavior.
1360 // ----------------------------------------------------------------------
1361
1362 void ActiveLoggerComponentBase ::
1363 SET_ID_FILTER_preMsgHook(
1364 FwOpcodeType opCode,
1365 U32 cmdSeq
1366 )
1367 {
1368 // Defaults to no-op; can be overridden
1369 (void) opCode;
1370 (void) cmdSeq;
1371 }
1372
1373 void ActiveLoggerComponentBase ::
1374 DUMP_FILTER_STATE_preMsgHook(
1375 FwOpcodeType opCode,
1376 U32 cmdSeq
1377 )
1378 {
1379 // Defaults to no-op; can be overridden
1380 (void) opCode;
1381 (void) cmdSeq;
1382 }
1383
1384 // ----------------------------------------------------------------------
1385 // Event logging functions
1386 // ----------------------------------------------------------------------
1387
1388 void ActiveLoggerComponentBase ::
1389 log_ACTIVITY_LO_SEVERITY_FILTER_STATE(
1391 bool enabled
1392 )
1393 {
1394 // Get the time
1395 Fw::Time _logTime;
1396 if (this->m_Time_OutputPort[0].isConnected()) {
1397 this->m_Time_OutputPort[0].invoke(_logTime);
1398 }
1399
1400 FwEventIdType _id = static_cast<FwEventIdType>(0);
1401
1402 _id = this->getIdBase() + EVENTID_SEVERITY_FILTER_STATE;
1403
1404 // Emit the event on the log port
1405 if (this->m_Log_OutputPort[0].isConnected()) {
1406 Fw::LogBuffer _logBuff;
1408
1409#if FW_AMPCS_COMPATIBLE
1410 // Serialize the number of arguments
1411 _status = _logBuff.serialize(static_cast<U8>(2));
1412 FW_ASSERT(
1413 _status == Fw::FW_SERIALIZE_OK,
1414 static_cast<FwAssertArgType>(_status)
1415 );
1416#endif
1417
1418#if FW_AMPCS_COMPATIBLE
1419 // Serialize the argument size
1420 _status = _logBuff.serialize(
1422 );
1423 FW_ASSERT(
1424 _status == Fw::FW_SERIALIZE_OK,
1425 static_cast<FwAssertArgType>(_status)
1426 );
1427#endif
1428 _status = _logBuff.serialize(severity);
1429 FW_ASSERT(
1430 _status == Fw::FW_SERIALIZE_OK,
1431 static_cast<FwAssertArgType>(_status)
1432 );
1433
1434#if FW_AMPCS_COMPATIBLE
1435 // Serialize the argument size
1436 _status = _logBuff.serialize(
1437 static_cast<U8>(sizeof(U8))
1438 );
1439 FW_ASSERT(
1440 _status == Fw::FW_SERIALIZE_OK,
1441 static_cast<FwAssertArgType>(_status)
1442 );
1443#endif
1444 _status = _logBuff.serialize(enabled);
1445 FW_ASSERT(
1446 _status == Fw::FW_SERIALIZE_OK,
1447 static_cast<FwAssertArgType>(_status)
1448 );
1449
1450 this->m_Log_OutputPort[0].invoke(
1451 _id,
1452 _logTime,
1454 _logBuff
1455 );
1456 }
1457
1458 // Emit the event on the text log port
1459#if FW_ENABLE_TEXT_LOGGING
1460 if (this->m_LogText_OutputPort[0].isConnected()) {
1461#if FW_OBJECT_NAMES == 1
1462 const char* _formatString =
1463 "(%s) %s: %s filter state. %d";
1464#else
1465 const char* _formatString =
1466 "%s: %s filter state. %d";
1467#endif
1468
1469 char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
1470
1471 Fw::String severityStr;
1472 severity.toString(severityStr);
1473
1474 (void) snprintf(
1475 _textBuffer,
1477 _formatString,
1478#if FW_OBJECT_NAMES == 1
1479 this->m_objName,
1480#endif
1481 "SEVERITY_FILTER_STATE ",
1482 severityStr.toChar(),
1483 enabled
1484 );
1485
1486 // Null terminate
1487 _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
1488 Fw::TextLogString _logString = _textBuffer;
1489 this->m_LogText_OutputPort[0].invoke(
1490 _id,
1491 _logTime,
1493 _logString
1494 );
1495 }
1496#endif
1497 }
1498
1499 void ActiveLoggerComponentBase ::
1500 log_ACTIVITY_HI_ID_FILTER_ENABLED(U32 ID)
1501 {
1502 // Get the time
1503 Fw::Time _logTime;
1504 if (this->m_Time_OutputPort[0].isConnected()) {
1505 this->m_Time_OutputPort[0].invoke(_logTime);
1506 }
1507
1508 FwEventIdType _id = static_cast<FwEventIdType>(0);
1509
1510 _id = this->getIdBase() + EVENTID_ID_FILTER_ENABLED;
1511
1512 // Emit the event on the log port
1513 if (this->m_Log_OutputPort[0].isConnected()) {
1514 Fw::LogBuffer _logBuff;
1516
1517#if FW_AMPCS_COMPATIBLE
1518 // Serialize the number of arguments
1519 _status = _logBuff.serialize(static_cast<U8>(1));
1520 FW_ASSERT(
1521 _status == Fw::FW_SERIALIZE_OK,
1522 static_cast<FwAssertArgType>(_status)
1523 );
1524#endif
1525
1526#if FW_AMPCS_COMPATIBLE
1527 // Serialize the argument size
1528 _status = _logBuff.serialize(
1529 static_cast<U8>(sizeof(U32))
1530 );
1531 FW_ASSERT(
1532 _status == Fw::FW_SERIALIZE_OK,
1533 static_cast<FwAssertArgType>(_status)
1534 );
1535#endif
1536 _status = _logBuff.serialize(ID);
1537 FW_ASSERT(
1538 _status == Fw::FW_SERIALIZE_OK,
1539 static_cast<FwAssertArgType>(_status)
1540 );
1541
1542 this->m_Log_OutputPort[0].invoke(
1543 _id,
1544 _logTime,
1546 _logBuff
1547 );
1548 }
1549
1550 // Emit the event on the text log port
1551#if FW_ENABLE_TEXT_LOGGING
1552 if (this->m_LogText_OutputPort[0].isConnected()) {
1553#if FW_OBJECT_NAMES == 1
1554 const char* _formatString =
1555 "(%s) %s: ID %" PRIu32 " is filtered.";
1556#else
1557 const char* _formatString =
1558 "%s: ID %" PRIu32 " is filtered.";
1559#endif
1560
1561 char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
1562
1563 (void) snprintf(
1564 _textBuffer,
1566 _formatString,
1567#if FW_OBJECT_NAMES == 1
1568 this->m_objName,
1569#endif
1570 "ID_FILTER_ENABLED ",
1571 ID
1572 );
1573
1574 // Null terminate
1575 _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
1576 Fw::TextLogString _logString = _textBuffer;
1577 this->m_LogText_OutputPort[0].invoke(
1578 _id,
1579 _logTime,
1581 _logString
1582 );
1583 }
1584#endif
1585 }
1586
1587 void ActiveLoggerComponentBase ::
1588 log_WARNING_LO_ID_FILTER_LIST_FULL(U32 ID)
1589 {
1590 // Get the time
1591 Fw::Time _logTime;
1592 if (this->m_Time_OutputPort[0].isConnected()) {
1593 this->m_Time_OutputPort[0].invoke(_logTime);
1594 }
1595
1596 FwEventIdType _id = static_cast<FwEventIdType>(0);
1597
1598 _id = this->getIdBase() + EVENTID_ID_FILTER_LIST_FULL;
1599
1600 // Emit the event on the log port
1601 if (this->m_Log_OutputPort[0].isConnected()) {
1602 Fw::LogBuffer _logBuff;
1604
1605#if FW_AMPCS_COMPATIBLE
1606 // Serialize the number of arguments
1607 _status = _logBuff.serialize(static_cast<U8>(1));
1608 FW_ASSERT(
1609 _status == Fw::FW_SERIALIZE_OK,
1610 static_cast<FwAssertArgType>(_status)
1611 );
1612#endif
1613
1614#if FW_AMPCS_COMPATIBLE
1615 // Serialize the argument size
1616 _status = _logBuff.serialize(
1617 static_cast<U8>(sizeof(U32))
1618 );
1619 FW_ASSERT(
1620 _status == Fw::FW_SERIALIZE_OK,
1621 static_cast<FwAssertArgType>(_status)
1622 );
1623#endif
1624 _status = _logBuff.serialize(ID);
1625 FW_ASSERT(
1626 _status == Fw::FW_SERIALIZE_OK,
1627 static_cast<FwAssertArgType>(_status)
1628 );
1629
1630 this->m_Log_OutputPort[0].invoke(
1631 _id,
1632 _logTime,
1634 _logBuff
1635 );
1636 }
1637
1638 // Emit the event on the text log port
1639#if FW_ENABLE_TEXT_LOGGING
1640 if (this->m_LogText_OutputPort[0].isConnected()) {
1641#if FW_OBJECT_NAMES == 1
1642 const char* _formatString =
1643 "(%s) %s: ID filter list is full. Cannot filter %" PRIu32 " .";
1644#else
1645 const char* _formatString =
1646 "%s: ID filter list is full. Cannot filter %" PRIu32 " .";
1647#endif
1648
1649 char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
1650
1651 (void) snprintf(
1652 _textBuffer,
1654 _formatString,
1655#if FW_OBJECT_NAMES == 1
1656 this->m_objName,
1657#endif
1658 "ID_FILTER_LIST_FULL ",
1659 ID
1660 );
1661
1662 // Null terminate
1663 _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
1664 Fw::TextLogString _logString = _textBuffer;
1665 this->m_LogText_OutputPort[0].invoke(
1666 _id,
1667 _logTime,
1669 _logString
1670 );
1671 }
1672#endif
1673 }
1674
1675 void ActiveLoggerComponentBase ::
1676 log_ACTIVITY_HI_ID_FILTER_REMOVED(U32 ID)
1677 {
1678 // Get the time
1679 Fw::Time _logTime;
1680 if (this->m_Time_OutputPort[0].isConnected()) {
1681 this->m_Time_OutputPort[0].invoke(_logTime);
1682 }
1683
1684 FwEventIdType _id = static_cast<FwEventIdType>(0);
1685
1686 _id = this->getIdBase() + EVENTID_ID_FILTER_REMOVED;
1687
1688 // Emit the event on the log port
1689 if (this->m_Log_OutputPort[0].isConnected()) {
1690 Fw::LogBuffer _logBuff;
1692
1693#if FW_AMPCS_COMPATIBLE
1694 // Serialize the number of arguments
1695 _status = _logBuff.serialize(static_cast<U8>(1));
1696 FW_ASSERT(
1697 _status == Fw::FW_SERIALIZE_OK,
1698 static_cast<FwAssertArgType>(_status)
1699 );
1700#endif
1701
1702#if FW_AMPCS_COMPATIBLE
1703 // Serialize the argument size
1704 _status = _logBuff.serialize(
1705 static_cast<U8>(sizeof(U32))
1706 );
1707 FW_ASSERT(
1708 _status == Fw::FW_SERIALIZE_OK,
1709 static_cast<FwAssertArgType>(_status)
1710 );
1711#endif
1712 _status = _logBuff.serialize(ID);
1713 FW_ASSERT(
1714 _status == Fw::FW_SERIALIZE_OK,
1715 static_cast<FwAssertArgType>(_status)
1716 );
1717
1718 this->m_Log_OutputPort[0].invoke(
1719 _id,
1720 _logTime,
1722 _logBuff
1723 );
1724 }
1725
1726 // Emit the event on the text log port
1727#if FW_ENABLE_TEXT_LOGGING
1728 if (this->m_LogText_OutputPort[0].isConnected()) {
1729#if FW_OBJECT_NAMES == 1
1730 const char* _formatString =
1731 "(%s) %s: ID filter ID %" PRIu32 " removed.";
1732#else
1733 const char* _formatString =
1734 "%s: ID filter ID %" PRIu32 " removed.";
1735#endif
1736
1737 char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
1738
1739 (void) snprintf(
1740 _textBuffer,
1742 _formatString,
1743#if FW_OBJECT_NAMES == 1
1744 this->m_objName,
1745#endif
1746 "ID_FILTER_REMOVED ",
1747 ID
1748 );
1749
1750 // Null terminate
1751 _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
1752 Fw::TextLogString _logString = _textBuffer;
1753 this->m_LogText_OutputPort[0].invoke(
1754 _id,
1755 _logTime,
1757 _logString
1758 );
1759 }
1760#endif
1761 }
1762
1763 void ActiveLoggerComponentBase ::
1764 log_WARNING_LO_ID_FILTER_NOT_FOUND(U32 ID)
1765 {
1766 // Get the time
1767 Fw::Time _logTime;
1768 if (this->m_Time_OutputPort[0].isConnected()) {
1769 this->m_Time_OutputPort[0].invoke(_logTime);
1770 }
1771
1772 FwEventIdType _id = static_cast<FwEventIdType>(0);
1773
1774 _id = this->getIdBase() + EVENTID_ID_FILTER_NOT_FOUND;
1775
1776 // Emit the event on the log port
1777 if (this->m_Log_OutputPort[0].isConnected()) {
1778 Fw::LogBuffer _logBuff;
1780
1781#if FW_AMPCS_COMPATIBLE
1782 // Serialize the number of arguments
1783 _status = _logBuff.serialize(static_cast<U8>(1));
1784 FW_ASSERT(
1785 _status == Fw::FW_SERIALIZE_OK,
1786 static_cast<FwAssertArgType>(_status)
1787 );
1788#endif
1789
1790#if FW_AMPCS_COMPATIBLE
1791 // Serialize the argument size
1792 _status = _logBuff.serialize(
1793 static_cast<U8>(sizeof(U32))
1794 );
1795 FW_ASSERT(
1796 _status == Fw::FW_SERIALIZE_OK,
1797 static_cast<FwAssertArgType>(_status)
1798 );
1799#endif
1800 _status = _logBuff.serialize(ID);
1801 FW_ASSERT(
1802 _status == Fw::FW_SERIALIZE_OK,
1803 static_cast<FwAssertArgType>(_status)
1804 );
1805
1806 this->m_Log_OutputPort[0].invoke(
1807 _id,
1808 _logTime,
1810 _logBuff
1811 );
1812 }
1813
1814 // Emit the event on the text log port
1815#if FW_ENABLE_TEXT_LOGGING
1816 if (this->m_LogText_OutputPort[0].isConnected()) {
1817#if FW_OBJECT_NAMES == 1
1818 const char* _formatString =
1819 "(%s) %s: ID filter ID %" PRIu32 " not found.";
1820#else
1821 const char* _formatString =
1822 "%s: ID filter ID %" PRIu32 " not found.";
1823#endif
1824
1825 char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
1826
1827 (void) snprintf(
1828 _textBuffer,
1830 _formatString,
1831#if FW_OBJECT_NAMES == 1
1832 this->m_objName,
1833#endif
1834 "ID_FILTER_NOT_FOUND ",
1835 ID
1836 );
1837
1838 // Null terminate
1839 _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
1840 Fw::TextLogString _logString = _textBuffer;
1841 this->m_LogText_OutputPort[0].invoke(
1842 _id,
1843 _logTime,
1845 _logString
1846 );
1847 }
1848#endif
1849 }
1850
1851 // ----------------------------------------------------------------------
1852 // Time
1853 // ----------------------------------------------------------------------
1854
1855 Fw::Time ActiveLoggerComponentBase ::
1856 getTime()
1857 {
1858 if (this->m_Time_OutputPort[0].isConnected()) {
1859 Fw::Time _time;
1860 this->m_Time_OutputPort[0].invoke(_time);
1861 return _time;
1862 }
1863 else {
1864 return Fw::Time(TB_NONE, 0, 0);
1865 }
1866 }
1867
1868 // ----------------------------------------------------------------------
1869 // Message dispatch functions
1870 // ----------------------------------------------------------------------
1871
1872 Fw::QueuedComponentBase::MsgDispatchStatus ActiveLoggerComponentBase ::
1873 doDispatch()
1874 {
1875 ComponentIpcSerializableBuffer msg;
1876 NATIVE_INT_TYPE priority = 0;
1877
1878 Os::Queue::QueueStatus msgStatus = this->m_queue.receive(
1879 msg,
1880 priority,
1882 );
1883 FW_ASSERT(
1884 msgStatus == Os::Queue::QUEUE_OK,
1885 static_cast<FwAssertArgType>(msgStatus)
1886 );
1887
1888 // Reset to beginning of buffer
1889 msg.resetDeser();
1890
1891 NATIVE_INT_TYPE desMsg = 0;
1892 Fw::SerializeStatus deserStatus = msg.deserialize(desMsg);
1893 FW_ASSERT(
1894 deserStatus == Fw::FW_SERIALIZE_OK,
1895 static_cast<FwAssertArgType>(deserStatus)
1896 );
1897
1898 MsgTypeEnum msgType = static_cast<MsgTypeEnum>(desMsg);
1899
1900 if (msgType == ACTIVELOGGER_COMPONENT_EXIT) {
1901 return MSG_DISPATCH_EXIT;
1902 }
1903
1904 NATIVE_INT_TYPE portNum = 0;
1905 deserStatus = msg.deserialize(portNum);
1906 FW_ASSERT(
1907 deserStatus == Fw::FW_SERIALIZE_OK,
1908 static_cast<FwAssertArgType>(deserStatus)
1909 );
1910
1911 switch (msgType) {
1912 // Handle async input port pingIn
1913 case PINGIN_PING: {
1914 // Deserialize argument key
1915 U32 key;
1916 deserStatus = msg.deserialize(key);
1917 FW_ASSERT(
1918 deserStatus == Fw::FW_SERIALIZE_OK,
1919 static_cast<FwAssertArgType>(deserStatus)
1920 );
1921 // Call handler function
1922 this->pingIn_handler(
1923 portNum,
1924 key
1925 );
1926
1927 break;
1928 }
1929
1930 // Handle command SET_ID_FILTER
1931 case CMD_SET_ID_FILTER: {
1932 // Deserialize opcode
1933 FwOpcodeType opCode = 0;
1934 deserStatus = msg.deserialize(opCode);
1935 FW_ASSERT (
1936 deserStatus == Fw::FW_SERIALIZE_OK,
1937 static_cast<FwAssertArgType>(deserStatus)
1938 );
1939
1940 // Deserialize command sequence
1941 U32 cmdSeq = 0;
1942 deserStatus = msg.deserialize(cmdSeq);
1943 FW_ASSERT (
1944 deserStatus == Fw::FW_SERIALIZE_OK,
1945 static_cast<FwAssertArgType>(deserStatus)
1946 );
1947
1948 // Deserialize command argument buffer
1949 Fw::CmdArgBuffer args;
1950 deserStatus = msg.deserialize(args);
1951 FW_ASSERT (
1952 deserStatus == Fw::FW_SERIALIZE_OK,
1953 static_cast<FwAssertArgType>(deserStatus)
1954 );
1955
1956 // Reset buffer
1957 args.resetDeser();
1958
1959 // Deserialize argument ID
1960 U32 ID;
1961 deserStatus = args.deserialize(ID);
1962 if (deserStatus != Fw::FW_SERIALIZE_OK) {
1963 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
1964 this->cmdResponse_out(
1965 opCode,
1966 cmdSeq,
1968 );
1969 }
1970 // Don't crash the task if bad arguments were passed from the ground
1971 break;
1972 }
1973
1974 // Deserialize argument idFilterEnabled
1975 Svc::ActiveLogger_Enabled idFilterEnabled;
1976 deserStatus = args.deserialize(idFilterEnabled);
1977 if (deserStatus != Fw::FW_SERIALIZE_OK) {
1978 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
1979 this->cmdResponse_out(
1980 opCode,
1981 cmdSeq,
1983 );
1984 }
1985 // Don't crash the task if bad arguments were passed from the ground
1986 break;
1987 }
1988
1989 // Make sure there was no data left over.
1990 // That means the argument buffer size was incorrect.
1991#if FW_CMD_CHECK_RESIDUAL
1992 if (args.getBuffLeft() != 0) {
1993 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
1994 this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
1995 }
1996 // Don't crash the task if bad arguments were passed from the ground
1997 break;
1998 }
1999#endif
2000
2001 // Call handler function
2002 this->SET_ID_FILTER_cmdHandler(
2003 opCode, cmdSeq,
2004 ID,
2005 idFilterEnabled
2006 );
2007
2008 break;
2009 }
2010
2011 // Handle command DUMP_FILTER_STATE
2012 case CMD_DUMP_FILTER_STATE: {
2013 // Deserialize opcode
2014 FwOpcodeType opCode = 0;
2015 deserStatus = msg.deserialize(opCode);
2016 FW_ASSERT (
2017 deserStatus == Fw::FW_SERIALIZE_OK,
2018 static_cast<FwAssertArgType>(deserStatus)
2019 );
2020
2021 // Deserialize command sequence
2022 U32 cmdSeq = 0;
2023 deserStatus = msg.deserialize(cmdSeq);
2024 FW_ASSERT (
2025 deserStatus == Fw::FW_SERIALIZE_OK,
2026 static_cast<FwAssertArgType>(deserStatus)
2027 );
2028
2029 // Deserialize command argument buffer
2030 Fw::CmdArgBuffer args;
2031 deserStatus = msg.deserialize(args);
2032 FW_ASSERT (
2033 deserStatus == Fw::FW_SERIALIZE_OK,
2034 static_cast<FwAssertArgType>(deserStatus)
2035 );
2036
2037 // Reset buffer
2038 args.resetDeser();
2039
2040 // Make sure there was no data left over.
2041 // That means the argument buffer size was incorrect.
2042#if FW_CMD_CHECK_RESIDUAL
2043 if (args.getBuffLeft() != 0) {
2044 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
2045 this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
2046 }
2047 // Don't crash the task if bad arguments were passed from the ground
2048 break;
2049 }
2050#endif
2051
2052 // Call handler function
2053 this->DUMP_FILTER_STATE_cmdHandler(opCode, cmdSeq);
2054
2055 break;
2056 }
2057
2058 // Handle internal interface loqQueue
2059 case INT_IF_LOQQUEUE: {
2060 FwEventIdType id;
2061 deserStatus = msg.deserialize(id);
2062
2063 // Internal interface should always deserialize
2064 FW_ASSERT(
2065 Fw::FW_SERIALIZE_OK == deserStatus,
2066 static_cast<FwAssertArgType>(deserStatus)
2067 );
2068
2069 Fw::Time timeTag;
2070 deserStatus = msg.deserialize(timeTag);
2071
2072 // Internal interface should always deserialize
2073 FW_ASSERT(
2074 Fw::FW_SERIALIZE_OK == deserStatus,
2075 static_cast<FwAssertArgType>(deserStatus)
2076 );
2077
2078 Fw::LogSeverity severity;
2079 deserStatus = msg.deserialize(severity);
2080
2081 // Internal interface should always deserialize
2082 FW_ASSERT(
2083 Fw::FW_SERIALIZE_OK == deserStatus,
2084 static_cast<FwAssertArgType>(deserStatus)
2085 );
2086
2087 Fw::LogBuffer args;
2088 deserStatus = msg.deserialize(args);
2089
2090 // Internal interface should always deserialize
2091 FW_ASSERT(
2092 Fw::FW_SERIALIZE_OK == deserStatus,
2093 static_cast<FwAssertArgType>(deserStatus)
2094 );
2095
2096 // Make sure there was no data left over.
2097 // That means the buffer size was incorrect.
2098 FW_ASSERT(
2099 msg.getBuffLeft() == 0,
2100 static_cast<FwAssertArgType>(msg.getBuffLeft())
2101 );
2102
2103 // Call handler function
2104 this->loqQueue_internalInterfaceHandler(
2105 id,
2106 timeTag,
2107 severity,
2108 args
2109 );
2110
2111 break;
2112 }
2113
2114 default:
2115 return MSG_DISPATCH_ERROR;
2116 }
2117
2118 return MSG_DISPATCH_OK;
2119 }
2120
2121 // ----------------------------------------------------------------------
2122 // Calls for messages received on special input ports
2123 // ----------------------------------------------------------------------
2124
2125 void ActiveLoggerComponentBase ::
2126 m_p_CmdDisp_in(
2127 Fw::PassiveComponentBase* callComp,
2128 NATIVE_INT_TYPE portNum,
2129 FwOpcodeType opCode,
2130 U32 cmdSeq,
2131 Fw::CmdArgBuffer& args
2132 )
2133 {
2134 FW_ASSERT(callComp);
2135 ActiveLoggerComponentBase* compPtr = static_cast<ActiveLoggerComponentBase*>(callComp);
2136
2137 const U32 idBase = callComp->getIdBase();
2138 FW_ASSERT(opCode >= idBase, opCode, idBase);
2139
2140 // Select base class function based on opcode
2141 switch (opCode - idBase) {
2142 case OPCODE_SET_EVENT_FILTER: {
2143 compPtr->SET_EVENT_FILTER_cmdHandlerBase(
2144 opCode,
2145 cmdSeq,
2146 args
2147 );
2148 break;
2149 }
2150
2151 case OPCODE_SET_ID_FILTER: {
2152 compPtr->SET_ID_FILTER_cmdHandlerBase(
2153 opCode,
2154 cmdSeq,
2155 args
2156 );
2157 break;
2158 }
2159
2160 case OPCODE_DUMP_FILTER_STATE: {
2161 compPtr->DUMP_FILTER_STATE_cmdHandlerBase(
2162 opCode,
2163 cmdSeq,
2164 args
2165 );
2166 break;
2167 }
2168 }
2169 }
2170
2171 // ----------------------------------------------------------------------
2172 // Calls for messages received on typed input ports
2173 // ----------------------------------------------------------------------
2174
2175 void ActiveLoggerComponentBase ::
2176 m_p_LogRecv_in(
2177 Fw::PassiveComponentBase* callComp,
2178 NATIVE_INT_TYPE portNum,
2179 FwEventIdType id,
2180 Fw::Time& timeTag,
2181 const Fw::LogSeverity& severity,
2182 Fw::LogBuffer& args
2183 )
2184 {
2185 FW_ASSERT(callComp);
2186 ActiveLoggerComponentBase* compPtr = static_cast<ActiveLoggerComponentBase*>(callComp);
2187 compPtr->LogRecv_handlerBase(
2188 portNum,
2189 id,
2190 timeTag,
2191 severity,
2192 args
2193 );
2194 }
2195
2196 void ActiveLoggerComponentBase ::
2197 m_p_pingIn_in(
2198 Fw::PassiveComponentBase* callComp,
2199 NATIVE_INT_TYPE portNum,
2200 U32 key
2201 )
2202 {
2203 FW_ASSERT(callComp);
2204 ActiveLoggerComponentBase* compPtr = static_cast<ActiveLoggerComponentBase*>(callComp);
2205 compPtr->pingIn_handlerBase(
2206 portNum,
2207 key
2208 );
2209 }
2210
2211}
#define FW_ASSERT(...)
Definition Assert.hpp:14
PlatformIntType NATIVE_INT_TYPE
Definition BasicTypes.h:51
U8 BYTE
byte type
Definition BasicTypes.h:27
uint8_t U8
8-bit unsigned integer
Definition BasicTypes.h:26
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
Definition BasicTypes.h:66
PlatformUIntType NATIVE_UINT_TYPE
Definition BasicTypes.h:52
int PlatformIntType
DefaultTypes.hpp provides fallback defaults for the platform types.
#define PRI_PlatformIntType
@ TB_NONE
No time base has been established.
Definition FpConfig.h:39
PlatformAssertArgType FwAssertArgType
Definition FpConfig.h:21
U32 FwEventIdType
Definition FpConfig.h:62
U32 FwOpcodeType
Definition FpConfig.h:56
#define FW_LOG_TEXT_BUFFER_SIZE
Max size of string for text log message.
Definition FpConfig.h:299
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects)
Definition FpConfig.h:88
@ ACTIVE_COMPONENT_EXIT
message to exit active component task
Enum representing a command response.
@ FORMAT_ERROR
Command failed to deserialize.
@ SERIALIZED_SIZE
The size of the serial representations of the port arguments.
Definition CmdPortAc.hpp:37
Enum representing event severity.
@ SERIALIZED_SIZE
The size of the serial representation.
@ ACTIVITY_HI
Important informational events.
@ WARNING_LO
A less serious but recoverable event.
@ ACTIVITY_LO
Less important informational events.
void init()
Object initializer.
Definition ObjBase.cpp:27
NATIVE_UINT_TYPE getBuffLeft() const
returns how much deserialization buffer is left
void resetDeser()
reset deserialization to beginning
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
const char * toChar() const
gets char buffer
Definition String.cpp:48
@ SERIALIZED_SIZE
Definition Time.hpp:13
@ QUEUE_OK
message sent/received okay
Definition Queue.hpp:28
@ QUEUE_FULL
queue was full when attempting to send a message
Definition Queue.hpp:36
QueueBlocking
Definition Queue.hpp:40
@ QUEUE_BLOCKING
Queue receive blocks until a message arrives.
Definition Queue.hpp:41
@ QUEUE_NONBLOCKING
Queue receive always returns even if there is no message.
Definition Queue.hpp:42
@ SERIALIZED_SIZE
The size of the serial representation.
@ SERIALIZED_SIZE
The size of the serial representations of the port arguments.
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.