F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
SystemResourcesComponentAc.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title SystemResourcesComponentAc.cpp
3 // \author Generated by fpp-to-cpp
4 // \brief cpp file for SystemResources component base class
5 // ======================================================================
6 
8 #include "Fw/Types/Assert.hpp"
10 #if FW_ENABLE_TEXT_LOGGING
11 #include "Fw/Types/String.hpp"
12 #endif
13 
14 namespace Svc {
15 
16  // ----------------------------------------------------------------------
17  // Component initialization
18  // ----------------------------------------------------------------------
19 
21  init(FwEnumStoreType instance)
22  {
23  // Initialize base class
25 
26  // Connect input port CmdDisp
27  for (
28  FwIndexType port = 0;
29  port < static_cast<FwIndexType>(this->getNum_CmdDisp_InputPorts());
30  port++
31  ) {
32  this->m_CmdDisp_InputPort[port].init();
33  this->m_CmdDisp_InputPort[port].addCallComp(
34  this,
35  m_p_CmdDisp_in
36  );
37  this->m_CmdDisp_InputPort[port].setPortNum(port);
38 
39 #if FW_OBJECT_NAMES == 1
40  Fw::ObjectName portName;
41  portName.format(
42  "%s_CmdDisp_InputPort[%" PRI_PlatformIntType "]",
43  this->m_objName.toChar(),
44  port
45  );
46  this->m_CmdDisp_InputPort[port].setObjName(portName.toChar());
47 #endif
48  }
49 
50  // Connect input port run
51  for (
52  FwIndexType port = 0;
53  port < static_cast<FwIndexType>(this->getNum_run_InputPorts());
54  port++
55  ) {
56  this->m_run_InputPort[port].init();
57  this->m_run_InputPort[port].addCallComp(
58  this,
59  m_p_run_in
60  );
61  this->m_run_InputPort[port].setPortNum(port);
62 
63 #if FW_OBJECT_NAMES == 1
64  Fw::ObjectName portName;
65  portName.format(
66  "%s_run_InputPort[%" PRI_PlatformIntType "]",
67  this->m_objName.toChar(),
68  port
69  );
70  this->m_run_InputPort[port].setObjName(portName.toChar());
71 #endif
72  }
73 
74  // Connect output port CmdReg
75  for (
76  FwIndexType port = 0;
77  port < static_cast<FwIndexType>(this->getNum_CmdReg_OutputPorts());
78  port++
79  ) {
80  this->m_CmdReg_OutputPort[port].init();
81 
82 #if FW_OBJECT_NAMES == 1
83  Fw::ObjectName portName;
84  portName.format(
85  "%s_CmdReg_OutputPort[%" PRI_PlatformIntType "]",
86  this->m_objName.toChar(),
87  port
88  );
89  this->m_CmdReg_OutputPort[port].setObjName(portName.toChar());
90 #endif
91  }
92 
93  // Connect output port CmdStatus
94  for (
95  FwIndexType port = 0;
96  port < static_cast<FwIndexType>(this->getNum_CmdStatus_OutputPorts());
97  port++
98  ) {
99  this->m_CmdStatus_OutputPort[port].init();
100 
101 #if FW_OBJECT_NAMES == 1
102  Fw::ObjectName portName;
103  portName.format(
104  "%s_CmdStatus_OutputPort[%" PRI_PlatformIntType "]",
105  this->m_objName.toChar(),
106  port
107  );
108  this->m_CmdStatus_OutputPort[port].setObjName(portName.toChar());
109 #endif
110  }
111 
112  // Connect output port Log
113  for (
114  FwIndexType port = 0;
115  port < static_cast<FwIndexType>(this->getNum_Log_OutputPorts());
116  port++
117  ) {
118  this->m_Log_OutputPort[port].init();
119 
120 #if FW_OBJECT_NAMES == 1
121  Fw::ObjectName portName;
122  portName.format(
123  "%s_Log_OutputPort[%" PRI_PlatformIntType "]",
124  this->m_objName.toChar(),
125  port
126  );
127  this->m_Log_OutputPort[port].setObjName(portName.toChar());
128 #endif
129  }
130 
131 #if FW_ENABLE_TEXT_LOGGING == 1
132  // Connect output port LogText
133  for (
134  FwIndexType port = 0;
135  port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
136  port++
137  ) {
138  this->m_LogText_OutputPort[port].init();
139 
140 #if FW_OBJECT_NAMES == 1
141  Fw::ObjectName portName;
142  portName.format(
143  "%s_LogText_OutputPort[%" PRI_PlatformIntType "]",
144  this->m_objName.toChar(),
145  port
146  );
147  this->m_LogText_OutputPort[port].setObjName(portName.toChar());
148 #endif
149  }
150 #endif
151 
152  // Connect output port Time
153  for (
154  FwIndexType port = 0;
155  port < static_cast<FwIndexType>(this->getNum_Time_OutputPorts());
156  port++
157  ) {
158  this->m_Time_OutputPort[port].init();
159 
160 #if FW_OBJECT_NAMES == 1
161  Fw::ObjectName portName;
162  portName.format(
163  "%s_Time_OutputPort[%" PRI_PlatformIntType "]",
164  this->m_objName.toChar(),
165  port
166  );
167  this->m_Time_OutputPort[port].setObjName(portName.toChar());
168 #endif
169  }
170 
171  // Connect output port Tlm
172  for (
173  FwIndexType port = 0;
174  port < static_cast<FwIndexType>(this->getNum_Tlm_OutputPorts());
175  port++
176  ) {
177  this->m_Tlm_OutputPort[port].init();
178 
179 #if FW_OBJECT_NAMES == 1
180  Fw::ObjectName portName;
181  portName.format(
182  "%s_Tlm_OutputPort[%" PRI_PlatformIntType "]",
183  this->m_objName.toChar(),
184  port
185  );
186  this->m_Tlm_OutputPort[port].setObjName(portName.toChar());
187 #endif
188  }
189  }
190 
191  // ----------------------------------------------------------------------
192  // Getters for special input ports
193  // ----------------------------------------------------------------------
194 
197  {
198  FW_ASSERT(
199  portNum < this->getNum_CmdDisp_InputPorts(),
200  static_cast<FwAssertArgType>(portNum)
201  );
202 
203  return &this->m_CmdDisp_InputPort[portNum];
204  }
205 
206  // ----------------------------------------------------------------------
207  // Getters for typed input ports
208  // ----------------------------------------------------------------------
209 
212  {
213  FW_ASSERT(
214  portNum < this->getNum_run_InputPorts(),
215  static_cast<FwAssertArgType>(portNum)
216  );
217 
218  return &this->m_run_InputPort[portNum];
219  }
220 
221  // ----------------------------------------------------------------------
222  // Connect input ports to special output ports
223  // ----------------------------------------------------------------------
224 
227  FwIndexType portNum,
228  Fw::InputCmdRegPort* port
229  )
230  {
231  FW_ASSERT(
232  portNum < this->getNum_CmdReg_OutputPorts(),
233  static_cast<FwAssertArgType>(portNum)
234  );
235 
236  this->m_CmdReg_OutputPort[portNum].addCallPort(port);
237  }
238 
241  FwIndexType portNum,
243  )
244  {
245  FW_ASSERT(
246  portNum < this->getNum_CmdStatus_OutputPorts(),
247  static_cast<FwAssertArgType>(portNum)
248  );
249 
250  this->m_CmdStatus_OutputPort[portNum].addCallPort(port);
251  }
252 
255  FwIndexType portNum,
256  Fw::InputLogPort* port
257  )
258  {
259  FW_ASSERT(
260  portNum < this->getNum_Log_OutputPorts(),
261  static_cast<FwAssertArgType>(portNum)
262  );
263 
264  this->m_Log_OutputPort[portNum].addCallPort(port);
265  }
266 
267 #if FW_ENABLE_TEXT_LOGGING == 1
268 
269  void SystemResourcesComponentBase ::
270  set_LogText_OutputPort(
271  FwIndexType portNum,
273  )
274  {
275  FW_ASSERT(
276  portNum < this->getNum_LogText_OutputPorts(),
277  static_cast<FwAssertArgType>(portNum)
278  );
279 
280  this->m_LogText_OutputPort[portNum].addCallPort(port);
281  }
282 
283 #endif
284 
287  FwIndexType portNum,
288  Fw::InputTimePort* port
289  )
290  {
291  FW_ASSERT(
292  portNum < this->getNum_Time_OutputPorts(),
293  static_cast<FwAssertArgType>(portNum)
294  );
295 
296  this->m_Time_OutputPort[portNum].addCallPort(port);
297  }
298 
301  FwIndexType portNum,
302  Fw::InputTlmPort* port
303  )
304  {
305  FW_ASSERT(
306  portNum < this->getNum_Tlm_OutputPorts(),
307  static_cast<FwAssertArgType>(portNum)
308  );
309 
310  this->m_Tlm_OutputPort[portNum].addCallPort(port);
311  }
312 
313 #if FW_PORT_SERIALIZATION
314 
315  // ----------------------------------------------------------------------
316  // Connect serial input ports to special output ports
317  // ----------------------------------------------------------------------
318 
321  FwIndexType portNum,
322  Fw::InputSerializePort* port
323  )
324  {
325  FW_ASSERT(
326  portNum < this->getNum_CmdReg_OutputPorts(),
327  static_cast<FwAssertArgType>(portNum)
328  );
329 
330  this->m_CmdReg_OutputPort[portNum].registerSerialPort(port);
331  }
332 
335  FwIndexType portNum,
336  Fw::InputSerializePort* port
337  )
338  {
339  FW_ASSERT(
340  portNum < this->getNum_CmdStatus_OutputPorts(),
341  static_cast<FwAssertArgType>(portNum)
342  );
343 
344  this->m_CmdStatus_OutputPort[portNum].registerSerialPort(port);
345  }
346 
349  FwIndexType portNum,
350  Fw::InputSerializePort* port
351  )
352  {
353  FW_ASSERT(
354  portNum < this->getNum_Log_OutputPorts(),
355  static_cast<FwAssertArgType>(portNum)
356  );
357 
358  this->m_Log_OutputPort[portNum].registerSerialPort(port);
359  }
360 
361 #if FW_ENABLE_TEXT_LOGGING == 1
362 
363  void SystemResourcesComponentBase ::
364  set_LogText_OutputPort(
365  FwIndexType portNum,
366  Fw::InputSerializePort* port
367  )
368  {
369  FW_ASSERT(
370  portNum < this->getNum_LogText_OutputPorts(),
371  static_cast<FwAssertArgType>(portNum)
372  );
373 
374  this->m_LogText_OutputPort[portNum].registerSerialPort(port);
375  }
376 
377 #endif
378 
381  FwIndexType portNum,
382  Fw::InputSerializePort* port
383  )
384  {
385  FW_ASSERT(
386  portNum < this->getNum_Time_OutputPorts(),
387  static_cast<FwAssertArgType>(portNum)
388  );
389 
390  this->m_Time_OutputPort[portNum].registerSerialPort(port);
391  }
392 
395  FwIndexType portNum,
396  Fw::InputSerializePort* port
397  )
398  {
399  FW_ASSERT(
400  portNum < this->getNum_Tlm_OutputPorts(),
401  static_cast<FwAssertArgType>(portNum)
402  );
403 
404  this->m_Tlm_OutputPort[portNum].registerSerialPort(port);
405  }
406 
407 #endif
408 
409  // ----------------------------------------------------------------------
410  // Command registration
411  // ----------------------------------------------------------------------
412 
414  regCommands()
415  {
416  FW_ASSERT(this->m_CmdReg_OutputPort[0].isConnected());
417 
418  this->m_CmdReg_OutputPort[0].invoke(
419  this->getIdBase() + OPCODE_ENABLE
420  );
421 
422  this->m_CmdReg_OutputPort[0].invoke(
423  this->getIdBase() + OPCODE_VERSION
424  );
425  }
426 
427  // ----------------------------------------------------------------------
428  // Component construction and destruction
429  // ----------------------------------------------------------------------
430 
432  SystemResourcesComponentBase(const char* compName) :
433  Fw::PassiveComponentBase(compName)
434  {
435 
436  }
437 
440  {
441 
442  }
443 
444  // ----------------------------------------------------------------------
445  // Getters for numbers of special input ports
446  // ----------------------------------------------------------------------
447 
450  {
451  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_CmdDisp_InputPort));
452  }
453 
454  // ----------------------------------------------------------------------
455  // Getters for numbers of typed input ports
456  // ----------------------------------------------------------------------
457 
460  {
461  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_run_InputPort));
462  }
463 
464  // ----------------------------------------------------------------------
465  // Getters for numbers of special output ports
466  // ----------------------------------------------------------------------
467 
470  {
471  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_CmdReg_OutputPort));
472  }
473 
476  {
477  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_CmdStatus_OutputPort));
478  }
479 
482  {
483  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_Log_OutputPort));
484  }
485 
486 #if FW_ENABLE_TEXT_LOGGING == 1
487 
488  FwIndexType SystemResourcesComponentBase ::
489  getNum_LogText_OutputPorts() const
490  {
491  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_LogText_OutputPort));
492  }
493 
494 #endif
495 
498  {
499  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_Time_OutputPort));
500  }
501 
504  {
505  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_Tlm_OutputPort));
506  }
507 
508  // ----------------------------------------------------------------------
509  // Connection status queries for special output ports
510  // ----------------------------------------------------------------------
511 
514  {
515  FW_ASSERT(
516  portNum < this->getNum_CmdReg_OutputPorts(),
517  static_cast<FwAssertArgType>(portNum)
518  );
519 
520  return this->m_CmdReg_OutputPort[portNum].isConnected();
521  }
522 
525  {
526  FW_ASSERT(
527  portNum < this->getNum_CmdStatus_OutputPorts(),
528  static_cast<FwAssertArgType>(portNum)
529  );
530 
531  return this->m_CmdStatus_OutputPort[portNum].isConnected();
532  }
533 
536  {
537  FW_ASSERT(
538  portNum < this->getNum_Log_OutputPorts(),
539  static_cast<FwAssertArgType>(portNum)
540  );
541 
542  return this->m_Log_OutputPort[portNum].isConnected();
543  }
544 
545 #if FW_ENABLE_TEXT_LOGGING == 1
546 
547  bool SystemResourcesComponentBase ::
548  isConnected_LogText_OutputPort(FwIndexType portNum)
549  {
550  FW_ASSERT(
551  portNum < this->getNum_LogText_OutputPorts(),
552  static_cast<FwAssertArgType>(portNum)
553  );
554 
555  return this->m_LogText_OutputPort[portNum].isConnected();
556  }
557 
558 #endif
559 
562  {
563  FW_ASSERT(
564  portNum < this->getNum_Time_OutputPorts(),
565  static_cast<FwAssertArgType>(portNum)
566  );
567 
568  return this->m_Time_OutputPort[portNum].isConnected();
569  }
570 
573  {
574  FW_ASSERT(
575  portNum < this->getNum_Tlm_OutputPorts(),
576  static_cast<FwAssertArgType>(portNum)
577  );
578 
579  return this->m_Tlm_OutputPort[portNum].isConnected();
580  }
581 
582  // ----------------------------------------------------------------------
583  // Port handler base-class functions for typed input ports
584  //
585  // Call these functions directly to bypass the corresponding ports
586  // ----------------------------------------------------------------------
587 
590  FwIndexType portNum,
591  U32 context
592  )
593  {
594  // Make sure port number is valid
595  FW_ASSERT(
596  portNum < this->getNum_run_InputPorts(),
597  static_cast<FwAssertArgType>(portNum)
598  );
599 
600  // Lock guard mutex before calling
601  this->lock();
602 
603  // Call handler function
604  this->run_handler(
605  portNum,
606  context
607  );
608 
609  // Unlock guard mutex
610  this->unLock();
611  }
612 
613  // ----------------------------------------------------------------------
614  // Command response
615  // ----------------------------------------------------------------------
616 
619  FwOpcodeType opCode,
620  U32 cmdSeq,
621  Fw::CmdResponse response
622  )
623  {
624  FW_ASSERT(this->m_CmdStatus_OutputPort[0].isConnected());
625  this->m_CmdStatus_OutputPort[0].invoke(opCode, cmdSeq, response);
626  }
627 
628  // ----------------------------------------------------------------------
629  // Command handler base-class functions
630  //
631  // Call these functions directly to bypass the command input port
632  // ----------------------------------------------------------------------
633 
636  FwOpcodeType opCode,
637  U32 cmdSeq,
638  Fw::CmdArgBuffer& args
639  )
640  {
641  // Deserialize the arguments
643 
644  // Reset the buffer
645  args.resetDeser();
646 
648  _status = args.deserialize(enable);
649  if (_status != Fw::FW_SERIALIZE_OK) {
650  if (this->m_CmdStatus_OutputPort[0].isConnected()) {
651  this->m_CmdStatus_OutputPort[0].invoke(
652  opCode,
653  cmdSeq,
655  );
656  }
657  return;
658  }
659 
660 #if FW_CMD_CHECK_RESIDUAL
661  // Make sure there was no data left over.
662  // That means the argument buffer size was incorrect.
663  if (args.getBuffLeft() != 0) {
664  if (this->m_CmdStatus_OutputPort[0].isConnected()) {
665  this->m_CmdStatus_OutputPort[0].invoke(
666  opCode,
667  cmdSeq,
669  );
670  }
671  return;
672  }
673 #endif
674 
675  this->lock();
676 
677  this->ENABLE_cmdHandler(
678  opCode, cmdSeq,
679  enable
680  );
681 
682  this->unLock();
683  }
684 
687  FwOpcodeType opCode,
688  U32 cmdSeq,
689  Fw::CmdArgBuffer& args
690  )
691  {
692 #if FW_CMD_CHECK_RESIDUAL
693  // Make sure there was no data left over.
694  // That means the argument buffer size was incorrect.
695  if (args.getBuffLeft() != 0) {
696  if (this->m_CmdStatus_OutputPort[0].isConnected()) {
697  this->m_CmdStatus_OutputPort[0].invoke(
698  opCode,
699  cmdSeq,
701  );
702  }
703  return;
704  }
705 #endif
706 
707  this->lock();
708 
709  this->VERSION_cmdHandler(opCode, cmdSeq);
710 
711  this->unLock();
712  }
713 
714  // ----------------------------------------------------------------------
715  // Event logging functions
716  // ----------------------------------------------------------------------
717 
720  {
721  // Get the time
722  Fw::Time _logTime;
723  if (this->m_Time_OutputPort[0].isConnected()) {
724  this->m_Time_OutputPort[0].invoke(_logTime);
725  }
726 
727  FwEventIdType _id = static_cast<FwEventIdType>(0);
728 
729  _id = this->getIdBase() + EVENTID_FRAMEWORK_VERSION;
730 
731  // Emit the event on the log port
732  if (this->m_Log_OutputPort[0].isConnected()) {
733  Fw::LogBuffer _logBuff;
735 
736 #if FW_AMPCS_COMPATIBLE
737  // Serialize the number of arguments
738  _status = _logBuff.serialize(static_cast<U8>(1));
739  FW_ASSERT(
740  _status == Fw::FW_SERIALIZE_OK,
741  static_cast<FwAssertArgType>(_status)
742  );
743 #endif
744 
745  _status = version.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 40));
746  FW_ASSERT(
747  _status == Fw::FW_SERIALIZE_OK,
748  static_cast<FwAssertArgType>(_status)
749  );
750 
751  this->m_Log_OutputPort[0].invoke(
752  _id,
753  _logTime,
755  _logBuff
756  );
757  }
758 
759  // Emit the event on the text log port
760 #if FW_ENABLE_TEXT_LOGGING
761  if (this->m_LogText_OutputPort[0].isConnected()) {
762 #if FW_OBJECT_NAMES == 1
763  const char* _formatString =
764  "(%s) %s: Framework Version: [%s]";
765 #else
766  const char* _formatString =
767  "%s: Framework Version: [%s]";
768 #endif
769 
770  Fw::TextLogString _logString;
771  _logString.format(
772  _formatString,
773 #if FW_OBJECT_NAMES == 1
774  this->m_objName.toChar(),
775 #endif
776  "FRAMEWORK_VERSION ",
777  version.toChar()
778  );
779 
780  this->m_LogText_OutputPort[0].invoke(
781  _id,
782  _logTime,
784  _logString
785  );
786  }
787 #endif
788  }
789 
792  {
793  // Get the time
794  Fw::Time _logTime;
795  if (this->m_Time_OutputPort[0].isConnected()) {
796  this->m_Time_OutputPort[0].invoke(_logTime);
797  }
798 
799  FwEventIdType _id = static_cast<FwEventIdType>(0);
800 
801  _id = this->getIdBase() + EVENTID_PROJECT_VERSION;
802 
803  // Emit the event on the log port
804  if (this->m_Log_OutputPort[0].isConnected()) {
805  Fw::LogBuffer _logBuff;
807 
808 #if FW_AMPCS_COMPATIBLE
809  // Serialize the number of arguments
810  _status = _logBuff.serialize(static_cast<U8>(1));
811  FW_ASSERT(
812  _status == Fw::FW_SERIALIZE_OK,
813  static_cast<FwAssertArgType>(_status)
814  );
815 #endif
816 
817  _status = version.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 40));
818  FW_ASSERT(
819  _status == Fw::FW_SERIALIZE_OK,
820  static_cast<FwAssertArgType>(_status)
821  );
822 
823  this->m_Log_OutputPort[0].invoke(
824  _id,
825  _logTime,
827  _logBuff
828  );
829  }
830 
831  // Emit the event on the text log port
832 #if FW_ENABLE_TEXT_LOGGING
833  if (this->m_LogText_OutputPort[0].isConnected()) {
834 #if FW_OBJECT_NAMES == 1
835  const char* _formatString =
836  "(%s) %s: Project Version: [%s]";
837 #else
838  const char* _formatString =
839  "%s: Project Version: [%s]";
840 #endif
841 
842  Fw::TextLogString _logString;
843  _logString.format(
844  _formatString,
845 #if FW_OBJECT_NAMES == 1
846  this->m_objName.toChar(),
847 #endif
848  "PROJECT_VERSION ",
849  version.toChar()
850  );
851 
852  this->m_LogText_OutputPort[0].invoke(
853  _id,
854  _logTime,
856  _logString
857  );
858  }
859 #endif
860  }
861 
862  // ----------------------------------------------------------------------
863  // Telemetry write functions
864  // ----------------------------------------------------------------------
865 
868  U64 arg,
869  Fw::Time _tlmTime
870  )
871  {
872  if (this->m_Tlm_OutputPort[0].isConnected()) {
873  if (
874  this->m_Time_OutputPort[0].isConnected() &&
875  (_tlmTime == Fw::ZERO_TIME)
876  ) {
877  this->m_Time_OutputPort[0].invoke(_tlmTime);
878  }
879 
880  Fw::TlmBuffer _tlmBuff;
881  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
882  FW_ASSERT(
883  _stat == Fw::FW_SERIALIZE_OK,
884  static_cast<FwAssertArgType>(_stat)
885  );
886 
887  FwChanIdType _id;
888 
889  _id = this->getIdBase() + CHANNELID_MEMORY_TOTAL;
890 
891  this->m_Tlm_OutputPort[0].invoke(
892  _id,
893  _tlmTime,
894  _tlmBuff
895  );
896  }
897  }
898 
901  U64 arg,
902  Fw::Time _tlmTime
903  )
904  {
905  if (this->m_Tlm_OutputPort[0].isConnected()) {
906  if (
907  this->m_Time_OutputPort[0].isConnected() &&
908  (_tlmTime == Fw::ZERO_TIME)
909  ) {
910  this->m_Time_OutputPort[0].invoke(_tlmTime);
911  }
912 
913  Fw::TlmBuffer _tlmBuff;
914  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
915  FW_ASSERT(
916  _stat == Fw::FW_SERIALIZE_OK,
917  static_cast<FwAssertArgType>(_stat)
918  );
919 
920  FwChanIdType _id;
921 
922  _id = this->getIdBase() + CHANNELID_MEMORY_USED;
923 
924  this->m_Tlm_OutputPort[0].invoke(
925  _id,
926  _tlmTime,
927  _tlmBuff
928  );
929  }
930  }
931 
934  U64 arg,
935  Fw::Time _tlmTime
936  )
937  {
938  if (this->m_Tlm_OutputPort[0].isConnected()) {
939  if (
940  this->m_Time_OutputPort[0].isConnected() &&
941  (_tlmTime == Fw::ZERO_TIME)
942  ) {
943  this->m_Time_OutputPort[0].invoke(_tlmTime);
944  }
945 
946  Fw::TlmBuffer _tlmBuff;
947  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
948  FW_ASSERT(
949  _stat == Fw::FW_SERIALIZE_OK,
950  static_cast<FwAssertArgType>(_stat)
951  );
952 
953  FwChanIdType _id;
954 
955  _id = this->getIdBase() + CHANNELID_NON_VOLATILE_TOTAL;
956 
957  this->m_Tlm_OutputPort[0].invoke(
958  _id,
959  _tlmTime,
960  _tlmBuff
961  );
962  }
963  }
964 
967  U64 arg,
968  Fw::Time _tlmTime
969  )
970  {
971  if (this->m_Tlm_OutputPort[0].isConnected()) {
972  if (
973  this->m_Time_OutputPort[0].isConnected() &&
974  (_tlmTime == Fw::ZERO_TIME)
975  ) {
976  this->m_Time_OutputPort[0].invoke(_tlmTime);
977  }
978 
979  Fw::TlmBuffer _tlmBuff;
980  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
981  FW_ASSERT(
982  _stat == Fw::FW_SERIALIZE_OK,
983  static_cast<FwAssertArgType>(_stat)
984  );
985 
986  FwChanIdType _id;
987 
988  _id = this->getIdBase() + CHANNELID_NON_VOLATILE_FREE;
989 
990  this->m_Tlm_OutputPort[0].invoke(
991  _id,
992  _tlmTime,
993  _tlmBuff
994  );
995  }
996  }
997 
1000  F32 arg,
1001  Fw::Time _tlmTime
1002  )
1003  {
1004  if (this->m_Tlm_OutputPort[0].isConnected()) {
1005  if (
1006  this->m_Time_OutputPort[0].isConnected() &&
1007  (_tlmTime == Fw::ZERO_TIME)
1008  ) {
1009  this->m_Time_OutputPort[0].invoke(_tlmTime);
1010  }
1011 
1012  Fw::TlmBuffer _tlmBuff;
1013  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
1014  FW_ASSERT(
1015  _stat == Fw::FW_SERIALIZE_OK,
1016  static_cast<FwAssertArgType>(_stat)
1017  );
1018 
1019  FwChanIdType _id;
1020 
1021  _id = this->getIdBase() + CHANNELID_CPU;
1022 
1023  this->m_Tlm_OutputPort[0].invoke(
1024  _id,
1025  _tlmTime,
1026  _tlmBuff
1027  );
1028  }
1029  }
1030 
1033  F32 arg,
1034  Fw::Time _tlmTime
1035  )
1036  {
1037  if (this->m_Tlm_OutputPort[0].isConnected()) {
1038  if (
1039  this->m_Time_OutputPort[0].isConnected() &&
1040  (_tlmTime == Fw::ZERO_TIME)
1041  ) {
1042  this->m_Time_OutputPort[0].invoke(_tlmTime);
1043  }
1044 
1045  Fw::TlmBuffer _tlmBuff;
1046  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
1047  FW_ASSERT(
1048  _stat == Fw::FW_SERIALIZE_OK,
1049  static_cast<FwAssertArgType>(_stat)
1050  );
1051 
1052  FwChanIdType _id;
1053 
1054  _id = this->getIdBase() + CHANNELID_CPU_00;
1055 
1056  this->m_Tlm_OutputPort[0].invoke(
1057  _id,
1058  _tlmTime,
1059  _tlmBuff
1060  );
1061  }
1062  }
1063 
1066  F32 arg,
1067  Fw::Time _tlmTime
1068  )
1069  {
1070  if (this->m_Tlm_OutputPort[0].isConnected()) {
1071  if (
1072  this->m_Time_OutputPort[0].isConnected() &&
1073  (_tlmTime == Fw::ZERO_TIME)
1074  ) {
1075  this->m_Time_OutputPort[0].invoke(_tlmTime);
1076  }
1077 
1078  Fw::TlmBuffer _tlmBuff;
1079  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
1080  FW_ASSERT(
1081  _stat == Fw::FW_SERIALIZE_OK,
1082  static_cast<FwAssertArgType>(_stat)
1083  );
1084 
1085  FwChanIdType _id;
1086 
1087  _id = this->getIdBase() + CHANNELID_CPU_01;
1088 
1089  this->m_Tlm_OutputPort[0].invoke(
1090  _id,
1091  _tlmTime,
1092  _tlmBuff
1093  );
1094  }
1095  }
1096 
1099  F32 arg,
1100  Fw::Time _tlmTime
1101  )
1102  {
1103  if (this->m_Tlm_OutputPort[0].isConnected()) {
1104  if (
1105  this->m_Time_OutputPort[0].isConnected() &&
1106  (_tlmTime == Fw::ZERO_TIME)
1107  ) {
1108  this->m_Time_OutputPort[0].invoke(_tlmTime);
1109  }
1110 
1111  Fw::TlmBuffer _tlmBuff;
1112  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
1113  FW_ASSERT(
1114  _stat == Fw::FW_SERIALIZE_OK,
1115  static_cast<FwAssertArgType>(_stat)
1116  );
1117 
1118  FwChanIdType _id;
1119 
1120  _id = this->getIdBase() + CHANNELID_CPU_02;
1121 
1122  this->m_Tlm_OutputPort[0].invoke(
1123  _id,
1124  _tlmTime,
1125  _tlmBuff
1126  );
1127  }
1128  }
1129 
1132  F32 arg,
1133  Fw::Time _tlmTime
1134  )
1135  {
1136  if (this->m_Tlm_OutputPort[0].isConnected()) {
1137  if (
1138  this->m_Time_OutputPort[0].isConnected() &&
1139  (_tlmTime == Fw::ZERO_TIME)
1140  ) {
1141  this->m_Time_OutputPort[0].invoke(_tlmTime);
1142  }
1143 
1144  Fw::TlmBuffer _tlmBuff;
1145  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
1146  FW_ASSERT(
1147  _stat == Fw::FW_SERIALIZE_OK,
1148  static_cast<FwAssertArgType>(_stat)
1149  );
1150 
1151  FwChanIdType _id;
1152 
1153  _id = this->getIdBase() + CHANNELID_CPU_03;
1154 
1155  this->m_Tlm_OutputPort[0].invoke(
1156  _id,
1157  _tlmTime,
1158  _tlmBuff
1159  );
1160  }
1161  }
1162 
1165  F32 arg,
1166  Fw::Time _tlmTime
1167  )
1168  {
1169  if (this->m_Tlm_OutputPort[0].isConnected()) {
1170  if (
1171  this->m_Time_OutputPort[0].isConnected() &&
1172  (_tlmTime == Fw::ZERO_TIME)
1173  ) {
1174  this->m_Time_OutputPort[0].invoke(_tlmTime);
1175  }
1176 
1177  Fw::TlmBuffer _tlmBuff;
1178  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
1179  FW_ASSERT(
1180  _stat == Fw::FW_SERIALIZE_OK,
1181  static_cast<FwAssertArgType>(_stat)
1182  );
1183 
1184  FwChanIdType _id;
1185 
1186  _id = this->getIdBase() + CHANNELID_CPU_04;
1187 
1188  this->m_Tlm_OutputPort[0].invoke(
1189  _id,
1190  _tlmTime,
1191  _tlmBuff
1192  );
1193  }
1194  }
1195 
1198  F32 arg,
1199  Fw::Time _tlmTime
1200  )
1201  {
1202  if (this->m_Tlm_OutputPort[0].isConnected()) {
1203  if (
1204  this->m_Time_OutputPort[0].isConnected() &&
1205  (_tlmTime == Fw::ZERO_TIME)
1206  ) {
1207  this->m_Time_OutputPort[0].invoke(_tlmTime);
1208  }
1209 
1210  Fw::TlmBuffer _tlmBuff;
1211  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
1212  FW_ASSERT(
1213  _stat == Fw::FW_SERIALIZE_OK,
1214  static_cast<FwAssertArgType>(_stat)
1215  );
1216 
1217  FwChanIdType _id;
1218 
1219  _id = this->getIdBase() + CHANNELID_CPU_05;
1220 
1221  this->m_Tlm_OutputPort[0].invoke(
1222  _id,
1223  _tlmTime,
1224  _tlmBuff
1225  );
1226  }
1227  }
1228 
1231  F32 arg,
1232  Fw::Time _tlmTime
1233  )
1234  {
1235  if (this->m_Tlm_OutputPort[0].isConnected()) {
1236  if (
1237  this->m_Time_OutputPort[0].isConnected() &&
1238  (_tlmTime == Fw::ZERO_TIME)
1239  ) {
1240  this->m_Time_OutputPort[0].invoke(_tlmTime);
1241  }
1242 
1243  Fw::TlmBuffer _tlmBuff;
1244  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
1245  FW_ASSERT(
1246  _stat == Fw::FW_SERIALIZE_OK,
1247  static_cast<FwAssertArgType>(_stat)
1248  );
1249 
1250  FwChanIdType _id;
1251 
1252  _id = this->getIdBase() + CHANNELID_CPU_06;
1253 
1254  this->m_Tlm_OutputPort[0].invoke(
1255  _id,
1256  _tlmTime,
1257  _tlmBuff
1258  );
1259  }
1260  }
1261 
1264  F32 arg,
1265  Fw::Time _tlmTime
1266  )
1267  {
1268  if (this->m_Tlm_OutputPort[0].isConnected()) {
1269  if (
1270  this->m_Time_OutputPort[0].isConnected() &&
1271  (_tlmTime == Fw::ZERO_TIME)
1272  ) {
1273  this->m_Time_OutputPort[0].invoke(_tlmTime);
1274  }
1275 
1276  Fw::TlmBuffer _tlmBuff;
1277  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
1278  FW_ASSERT(
1279  _stat == Fw::FW_SERIALIZE_OK,
1280  static_cast<FwAssertArgType>(_stat)
1281  );
1282 
1283  FwChanIdType _id;
1284 
1285  _id = this->getIdBase() + CHANNELID_CPU_07;
1286 
1287  this->m_Tlm_OutputPort[0].invoke(
1288  _id,
1289  _tlmTime,
1290  _tlmBuff
1291  );
1292  }
1293  }
1294 
1297  F32 arg,
1298  Fw::Time _tlmTime
1299  )
1300  {
1301  if (this->m_Tlm_OutputPort[0].isConnected()) {
1302  if (
1303  this->m_Time_OutputPort[0].isConnected() &&
1304  (_tlmTime == Fw::ZERO_TIME)
1305  ) {
1306  this->m_Time_OutputPort[0].invoke(_tlmTime);
1307  }
1308 
1309  Fw::TlmBuffer _tlmBuff;
1310  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
1311  FW_ASSERT(
1312  _stat == Fw::FW_SERIALIZE_OK,
1313  static_cast<FwAssertArgType>(_stat)
1314  );
1315 
1316  FwChanIdType _id;
1317 
1318  _id = this->getIdBase() + CHANNELID_CPU_08;
1319 
1320  this->m_Tlm_OutputPort[0].invoke(
1321  _id,
1322  _tlmTime,
1323  _tlmBuff
1324  );
1325  }
1326  }
1327 
1330  F32 arg,
1331  Fw::Time _tlmTime
1332  )
1333  {
1334  if (this->m_Tlm_OutputPort[0].isConnected()) {
1335  if (
1336  this->m_Time_OutputPort[0].isConnected() &&
1337  (_tlmTime == Fw::ZERO_TIME)
1338  ) {
1339  this->m_Time_OutputPort[0].invoke(_tlmTime);
1340  }
1341 
1342  Fw::TlmBuffer _tlmBuff;
1343  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
1344  FW_ASSERT(
1345  _stat == Fw::FW_SERIALIZE_OK,
1346  static_cast<FwAssertArgType>(_stat)
1347  );
1348 
1349  FwChanIdType _id;
1350 
1351  _id = this->getIdBase() + CHANNELID_CPU_09;
1352 
1353  this->m_Tlm_OutputPort[0].invoke(
1354  _id,
1355  _tlmTime,
1356  _tlmBuff
1357  );
1358  }
1359  }
1360 
1363  F32 arg,
1364  Fw::Time _tlmTime
1365  )
1366  {
1367  if (this->m_Tlm_OutputPort[0].isConnected()) {
1368  if (
1369  this->m_Time_OutputPort[0].isConnected() &&
1370  (_tlmTime == Fw::ZERO_TIME)
1371  ) {
1372  this->m_Time_OutputPort[0].invoke(_tlmTime);
1373  }
1374 
1375  Fw::TlmBuffer _tlmBuff;
1376  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
1377  FW_ASSERT(
1378  _stat == Fw::FW_SERIALIZE_OK,
1379  static_cast<FwAssertArgType>(_stat)
1380  );
1381 
1382  FwChanIdType _id;
1383 
1384  _id = this->getIdBase() + CHANNELID_CPU_10;
1385 
1386  this->m_Tlm_OutputPort[0].invoke(
1387  _id,
1388  _tlmTime,
1389  _tlmBuff
1390  );
1391  }
1392  }
1393 
1396  F32 arg,
1397  Fw::Time _tlmTime
1398  )
1399  {
1400  if (this->m_Tlm_OutputPort[0].isConnected()) {
1401  if (
1402  this->m_Time_OutputPort[0].isConnected() &&
1403  (_tlmTime == Fw::ZERO_TIME)
1404  ) {
1405  this->m_Time_OutputPort[0].invoke(_tlmTime);
1406  }
1407 
1408  Fw::TlmBuffer _tlmBuff;
1409  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
1410  FW_ASSERT(
1411  _stat == Fw::FW_SERIALIZE_OK,
1412  static_cast<FwAssertArgType>(_stat)
1413  );
1414 
1415  FwChanIdType _id;
1416 
1417  _id = this->getIdBase() + CHANNELID_CPU_11;
1418 
1419  this->m_Tlm_OutputPort[0].invoke(
1420  _id,
1421  _tlmTime,
1422  _tlmBuff
1423  );
1424  }
1425  }
1426 
1429  F32 arg,
1430  Fw::Time _tlmTime
1431  )
1432  {
1433  if (this->m_Tlm_OutputPort[0].isConnected()) {
1434  if (
1435  this->m_Time_OutputPort[0].isConnected() &&
1436  (_tlmTime == Fw::ZERO_TIME)
1437  ) {
1438  this->m_Time_OutputPort[0].invoke(_tlmTime);
1439  }
1440 
1441  Fw::TlmBuffer _tlmBuff;
1442  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
1443  FW_ASSERT(
1444  _stat == Fw::FW_SERIALIZE_OK,
1445  static_cast<FwAssertArgType>(_stat)
1446  );
1447 
1448  FwChanIdType _id;
1449 
1450  _id = this->getIdBase() + CHANNELID_CPU_12;
1451 
1452  this->m_Tlm_OutputPort[0].invoke(
1453  _id,
1454  _tlmTime,
1455  _tlmBuff
1456  );
1457  }
1458  }
1459 
1462  F32 arg,
1463  Fw::Time _tlmTime
1464  )
1465  {
1466  if (this->m_Tlm_OutputPort[0].isConnected()) {
1467  if (
1468  this->m_Time_OutputPort[0].isConnected() &&
1469  (_tlmTime == Fw::ZERO_TIME)
1470  ) {
1471  this->m_Time_OutputPort[0].invoke(_tlmTime);
1472  }
1473 
1474  Fw::TlmBuffer _tlmBuff;
1475  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
1476  FW_ASSERT(
1477  _stat == Fw::FW_SERIALIZE_OK,
1478  static_cast<FwAssertArgType>(_stat)
1479  );
1480 
1481  FwChanIdType _id;
1482 
1483  _id = this->getIdBase() + CHANNELID_CPU_13;
1484 
1485  this->m_Tlm_OutputPort[0].invoke(
1486  _id,
1487  _tlmTime,
1488  _tlmBuff
1489  );
1490  }
1491  }
1492 
1495  F32 arg,
1496  Fw::Time _tlmTime
1497  )
1498  {
1499  if (this->m_Tlm_OutputPort[0].isConnected()) {
1500  if (
1501  this->m_Time_OutputPort[0].isConnected() &&
1502  (_tlmTime == Fw::ZERO_TIME)
1503  ) {
1504  this->m_Time_OutputPort[0].invoke(_tlmTime);
1505  }
1506 
1507  Fw::TlmBuffer _tlmBuff;
1508  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
1509  FW_ASSERT(
1510  _stat == Fw::FW_SERIALIZE_OK,
1511  static_cast<FwAssertArgType>(_stat)
1512  );
1513 
1514  FwChanIdType _id;
1515 
1516  _id = this->getIdBase() + CHANNELID_CPU_14;
1517 
1518  this->m_Tlm_OutputPort[0].invoke(
1519  _id,
1520  _tlmTime,
1521  _tlmBuff
1522  );
1523  }
1524  }
1525 
1528  F32 arg,
1529  Fw::Time _tlmTime
1530  )
1531  {
1532  if (this->m_Tlm_OutputPort[0].isConnected()) {
1533  if (
1534  this->m_Time_OutputPort[0].isConnected() &&
1535  (_tlmTime == Fw::ZERO_TIME)
1536  ) {
1537  this->m_Time_OutputPort[0].invoke(_tlmTime);
1538  }
1539 
1540  Fw::TlmBuffer _tlmBuff;
1541  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
1542  FW_ASSERT(
1543  _stat == Fw::FW_SERIALIZE_OK,
1544  static_cast<FwAssertArgType>(_stat)
1545  );
1546 
1547  FwChanIdType _id;
1548 
1549  _id = this->getIdBase() + CHANNELID_CPU_15;
1550 
1551  this->m_Tlm_OutputPort[0].invoke(
1552  _id,
1553  _tlmTime,
1554  _tlmBuff
1555  );
1556  }
1557  }
1558 
1561  const Fw::StringBase& arg,
1562  Fw::Time _tlmTime
1563  )
1564  {
1565  if (this->m_Tlm_OutputPort[0].isConnected()) {
1566  if (
1567  this->m_Time_OutputPort[0].isConnected() &&
1568  (_tlmTime == Fw::ZERO_TIME)
1569  ) {
1570  this->m_Time_OutputPort[0].invoke(_tlmTime);
1571  }
1572 
1573  Fw::TlmBuffer _tlmBuff;
1574  Fw::SerializeStatus _stat = arg.serialize(_tlmBuff, FW_MIN(FW_TLM_STRING_MAX_SIZE, 40));
1575  FW_ASSERT(
1576  _stat == Fw::FW_SERIALIZE_OK,
1577  static_cast<FwAssertArgType>(_stat)
1578  );
1579 
1580  FwChanIdType _id;
1581 
1582  _id = this->getIdBase() + CHANNELID_FRAMEWORK_VERSION;
1583 
1584  this->m_Tlm_OutputPort[0].invoke(
1585  _id,
1586  _tlmTime,
1587  _tlmBuff
1588  );
1589  }
1590  }
1591 
1594  const Fw::StringBase& arg,
1595  Fw::Time _tlmTime
1596  )
1597  {
1598  if (this->m_Tlm_OutputPort[0].isConnected()) {
1599  if (
1600  this->m_Time_OutputPort[0].isConnected() &&
1601  (_tlmTime == Fw::ZERO_TIME)
1602  ) {
1603  this->m_Time_OutputPort[0].invoke(_tlmTime);
1604  }
1605 
1606  Fw::TlmBuffer _tlmBuff;
1607  Fw::SerializeStatus _stat = arg.serialize(_tlmBuff, FW_MIN(FW_TLM_STRING_MAX_SIZE, 40));
1608  FW_ASSERT(
1609  _stat == Fw::FW_SERIALIZE_OK,
1610  static_cast<FwAssertArgType>(_stat)
1611  );
1612 
1613  FwChanIdType _id;
1614 
1615  _id = this->getIdBase() + CHANNELID_PROJECT_VERSION;
1616 
1617  this->m_Tlm_OutputPort[0].invoke(
1618  _id,
1619  _tlmTime,
1620  _tlmBuff
1621  );
1622  }
1623  }
1624 
1625  // ----------------------------------------------------------------------
1626  // Time
1627  // ----------------------------------------------------------------------
1628 
1630  getTime()
1631  {
1632  if (this->m_Time_OutputPort[0].isConnected()) {
1633  Fw::Time _time;
1634  this->m_Time_OutputPort[0].invoke(_time);
1635  return _time;
1636  }
1637  else {
1638  return Fw::Time(TB_NONE, 0, 0);
1639  }
1640  }
1641 
1642  // ----------------------------------------------------------------------
1643  // Mutex operations for guarded ports
1644  //
1645  // You can override these operations to provide more sophisticated
1646  // synchronization
1647  // ----------------------------------------------------------------------
1648 
1650  lock()
1651  {
1652  this->m_guardedPortMutex.lock();
1653  }
1654 
1656  unLock()
1657  {
1658  this->m_guardedPortMutex.unLock();
1659  }
1660 
1661  // ----------------------------------------------------------------------
1662  // Calls for messages received on special input ports
1663  // ----------------------------------------------------------------------
1664 
1665  void SystemResourcesComponentBase ::
1666  m_p_CmdDisp_in(
1667  Fw::PassiveComponentBase* callComp,
1668  FwIndexType portNum,
1669  FwOpcodeType opCode,
1670  U32 cmdSeq,
1671  Fw::CmdArgBuffer& args
1672  )
1673  {
1674  FW_ASSERT(callComp);
1675  SystemResourcesComponentBase* compPtr = static_cast<SystemResourcesComponentBase*>(callComp);
1676 
1677  const U32 idBase = callComp->getIdBase();
1678  FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
1679 
1680  // Select base class function based on opcode
1681  switch (opCode - idBase) {
1682  case OPCODE_ENABLE: {
1683  compPtr->ENABLE_cmdHandlerBase(
1684  opCode,
1685  cmdSeq,
1686  args
1687  );
1688  break;
1689  }
1690 
1691  case OPCODE_VERSION: {
1692  compPtr->VERSION_cmdHandlerBase(
1693  opCode,
1694  cmdSeq,
1695  args
1696  );
1697  break;
1698  }
1699  }
1700  }
1701 
1702  // ----------------------------------------------------------------------
1703  // Calls for messages received on typed input ports
1704  // ----------------------------------------------------------------------
1705 
1706  void SystemResourcesComponentBase ::
1707  m_p_run_in(
1708  Fw::PassiveComponentBase* callComp,
1709  FwIndexType portNum,
1710  U32 context
1711  )
1712  {
1713  FW_ASSERT(callComp);
1714  SystemResourcesComponentBase* compPtr = static_cast<SystemResourcesComponentBase*>(callComp);
1715  compPtr->run_handlerBase(
1716  portNum,
1717  context
1718  );
1719  }
1720 
1721 }
#define FW_ASSERT(...)
Definition: Assert.hpp:14
float F32
32-bit floating point
Definition: BasicTypes.h:45
#define FW_MIN(a, b)
MIN macro.
Definition: BasicTypes.h:68
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
#define PRI_PlatformIntType
@ TB_NONE
No time base has been established.
Definition: FpConfig.h:57
I32 FwEnumStoreType
Definition: FpConfig.h:51
PlatformAssertArgType FwAssertArgType
Definition: FpConfig.h:34
U32 FwChanIdType
Definition: FpConfig.h:82
U32 FwEventIdType
Definition: FpConfig.h:86
#define FW_TLM_STRING_MAX_SIZE
Max size of channelized telemetry string type.
Definition: FpConfig.h:310
U32 FwOpcodeType
Definition: FpConfig.h:78
#define FW_LOG_STRING_MAX_SIZE
Max size of log string parameter type.
Definition: FpConfig.h:300
PlatformIndexType FwIndexType
Definition: FpConfig.h:20
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects)
Definition: FpConfig.h:135
Enum representing a command response.
@ FORMAT_ERROR
Command failed to deserialize.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: CmdPortAc.cpp:62
void init()
Initialization function.
Definition: CmdPortAc.cpp:56
void setPortNum(NATIVE_INT_TYPE portNum)
@ ACTIVITY_LO
Less important informational events.
void init()
Object initializer.
Definition: ObjBase.cpp:27
const char * toChar() const
Definition: ObjectName.hpp:50
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
void invoke(FwOpcodeType opCode)
Invoke a port interface.
void init()
Initialization function.
void init()
Initialization function.
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Invoke a port interface.
void init()
Initialization function.
Definition: LogPortAc.cpp:151
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args)
Invoke a port interface.
Definition: LogPortAc.cpp:170
void addCallPort(InputLogPort *callPort)
Register an input port.
Definition: LogPortAc.cpp:157
void addCallPort(InputTimePort *callPort)
Register an input port.
Definition: TimePortAc.cpp:134
void invoke(Fw::Time &time)
Invoke a port interface.
Definition: TimePortAc.cpp:147
void init()
Initialization function.
Definition: TimePortAc.cpp:128
void addCallPort(InputTlmPort *callPort)
Register an input port.
Definition: TlmPortAc.cpp:150
void init()
Initialization function.
Definition: TlmPortAc.cpp:144
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Invoke a port interface.
Definition: TlmPortAc.cpp:163
bool isConnected()
Definition: PortBase.cpp:41
void resetDeser()
reset deserialization to beginning
Serializable::SizeType getBuffLeft() const
returns how much deserialization buffer is left
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
virtual const CHAR * toChar() const =0
void format(const CHAR *formatString,...)
write formatted string to buffer
Definition: StringBase.cpp:56
virtual SerializeStatus serialize(SerializeBufferBase &buffer) const
serialization function
Definition: StringBase.cpp:137
Definition: Time.hpp:9
void unLock()
unlock the mutex
Definition: Mutex.cpp:13
void lock()
lock the mutex
Definition: Mutex.cpp:12
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: SchedPortAc.cpp:62
void init()
Initialization function.
Definition: SchedPortAc.cpp:56
Auto-generated base for SystemResources component.
void tlmWrite_CPU_01(F32 arg, Fw::Time _tlmTime=Fw::Time())
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
virtual void run_handler(FwIndexType portNum, U32 context)=0
Handler for input port run.
void set_Time_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].
void tlmWrite_CPU_02(F32 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_CPU_14(F32 arg, Fw::Time _tlmTime=Fw::Time())
void set_Tlm_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to Tlm[portNum].
Svc::InputSchedPort * get_run_InputPort(FwIndexType portNum)
virtual void unLock()
Unlock the guarded mutex.
void tlmWrite_MEMORY_USED(U64 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_NON_VOLATILE_TOTAL(U64 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_FRAMEWORK_VERSION(const Fw::StringBase &arg, Fw::Time _tlmTime=Fw::Time())
void set_Log_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to Log[portNum].
@ CHANNELID_FRAMEWORK_VERSION
Channel ID for FRAMEWORK_VERSION.
@ CHANNELID_NON_VOLATILE_TOTAL
Channel ID for NON_VOLATILE_TOTAL.
@ CHANNELID_MEMORY_USED
Channel ID for MEMORY_USED.
@ CHANNELID_PROJECT_VERSION
Channel ID for PROJECT_VERSION.
@ CHANNELID_MEMORY_TOTAL
Channel ID for MEMORY_TOTAL.
@ CHANNELID_NON_VOLATILE_FREE
Channel ID for NON_VOLATILE_FREE.
void tlmWrite_NON_VOLATILE_FREE(U64 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_PROJECT_VERSION(const Fw::StringBase &arg, Fw::Time _tlmTime=Fw::Time())
SystemResourcesComponentBase(const char *compName="")
Construct SystemResourcesComponentBase object.
void tlmWrite_CPU_00(F32 arg, Fw::Time _tlmTime=Fw::Time())
bool isConnected_CmdReg_OutputPort(FwIndexType portNum)
void tlmWrite_CPU_09(F32 arg, Fw::Time _tlmTime=Fw::Time())
@ OPCODE_ENABLE
A command to enable or disable system resource telemetry.
void ENABLE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_ACTIVITY_LO_FRAMEWORK_VERSION(const Fw::StringBase &version)
void tlmWrite_CPU_10(F32 arg, Fw::Time _tlmTime=Fw::Time())
bool isConnected_Tlm_OutputPort(FwIndexType portNum)
Fw::InputCmdPort * get_CmdDisp_InputPort(FwIndexType portNum)
void tlmWrite_CPU_06(F32 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_CPU_08(F32 arg, Fw::Time _tlmTime=Fw::Time())
bool isConnected_Time_OutputPort(FwIndexType portNum)
virtual void VERSION_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void tlmWrite_MEMORY_TOTAL(U64 arg, Fw::Time _tlmTime=Fw::Time())
void run_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port run.
void tlmWrite_CPU_07(F32 arg, Fw::Time _tlmTime=Fw::Time())
virtual void lock()
Lock the guarded mutex.
void set_CmdStatus_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to CmdStatus[portNum].
void tlmWrite_CPU_15(F32 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_CPU_04(F32 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_CPU(F32 arg, Fw::Time _tlmTime=Fw::Time())
bool isConnected_Log_OutputPort(FwIndexType portNum)
void regCommands()
Register commands with the Command Dispatcher.
void tlmWrite_CPU_12(F32 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_CPU_05(F32 arg, Fw::Time _tlmTime=Fw::Time())
virtual void ENABLE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, Svc::SystemResourceEnabled enable)=0
bool isConnected_CmdStatus_OutputPort(FwIndexType portNum)
void tlmWrite_CPU_11(F32 arg, Fw::Time _tlmTime=Fw::Time())
void VERSION_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void tlmWrite_CPU_03(F32 arg, Fw::Time _tlmTime=Fw::Time())
@ EVENTID_FRAMEWORK_VERSION
Version of the git repository.
@ EVENTID_PROJECT_VERSION
Version of the git repository.
void log_ACTIVITY_LO_PROJECT_VERSION(const Fw::StringBase &version)
virtual ~SystemResourcesComponentBase()
Destroy SystemResourcesComponentBase object.
void tlmWrite_CPU_13(F32 arg, Fw::Time _tlmTime=Fw::Time())
void set_CmdReg_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to CmdReg[portNum].
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.
const Time ZERO_TIME
Definition: Time.cpp:5
#define U64(C)
Definition: sha.h:176