F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
OsTimeComponentAc.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title OsTimeComponentAc.cpp
3 // \author Generated by fpp-to-cpp
4 // \brief cpp file for OsTime component base class
5 // ======================================================================
6 
7 #include "Fw/Types/Assert.hpp"
9 #if FW_ENABLE_TEXT_LOGGING
10 #include "Fw/Types/String.hpp"
11 #endif
13 
14 namespace Svc {
15 
16  // ----------------------------------------------------------------------
17  // Component initialization
18  // ----------------------------------------------------------------------
19 
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_FwIndexType "]",
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 setEpoch
51  for (
52  FwIndexType port = 0;
53  port < static_cast<FwIndexType>(this->getNum_setEpoch_InputPorts());
54  port++
55  ) {
56  this->m_setEpoch_InputPort[port].init();
57  this->m_setEpoch_InputPort[port].addCallComp(
58  this,
59  m_p_setEpoch_in
60  );
61  this->m_setEpoch_InputPort[port].setPortNum(port);
62 
63 #if FW_OBJECT_NAMES == 1
64  Fw::ObjectName portName;
65  portName.format(
66  "%s_setEpoch_InputPort[%" PRI_FwIndexType "]",
67  this->m_objName.toChar(),
68  port
69  );
70  this->m_setEpoch_InputPort[port].setObjName(portName.toChar());
71 #endif
72  }
73 
74  // Connect input port timeGetPort
75  for (
76  FwIndexType port = 0;
77  port < static_cast<FwIndexType>(this->getNum_timeGetPort_InputPorts());
78  port++
79  ) {
80  this->m_timeGetPort_InputPort[port].init();
81  this->m_timeGetPort_InputPort[port].addCallComp(
82  this,
83  m_p_timeGetPort_in
84  );
85  this->m_timeGetPort_InputPort[port].setPortNum(port);
86 
87 #if FW_OBJECT_NAMES == 1
88  Fw::ObjectName portName;
89  portName.format(
90  "%s_timeGetPort_InputPort[%" PRI_FwIndexType "]",
91  this->m_objName.toChar(),
92  port
93  );
94  this->m_timeGetPort_InputPort[port].setObjName(portName.toChar());
95 #endif
96  }
97 
98  // Connect output port CmdReg
99  for (
100  FwIndexType port = 0;
101  port < static_cast<FwIndexType>(this->getNum_CmdReg_OutputPorts());
102  port++
103  ) {
104  this->m_CmdReg_OutputPort[port].init();
105 
106 #if FW_OBJECT_NAMES == 1
107  Fw::ObjectName portName;
108  portName.format(
109  "%s_CmdReg_OutputPort[%" PRI_FwIndexType "]",
110  this->m_objName.toChar(),
111  port
112  );
113  this->m_CmdReg_OutputPort[port].setObjName(portName.toChar());
114 #endif
115  }
116 
117  // Connect output port CmdStatus
118  for (
119  FwIndexType port = 0;
120  port < static_cast<FwIndexType>(this->getNum_CmdStatus_OutputPorts());
121  port++
122  ) {
123  this->m_CmdStatus_OutputPort[port].init();
124 
125 #if FW_OBJECT_NAMES == 1
126  Fw::ObjectName portName;
127  portName.format(
128  "%s_CmdStatus_OutputPort[%" PRI_FwIndexType "]",
129  this->m_objName.toChar(),
130  port
131  );
132  this->m_CmdStatus_OutputPort[port].setObjName(portName.toChar());
133 #endif
134  }
135 
136  // Connect output port EventOut
137  for (
138  FwIndexType port = 0;
139  port < static_cast<FwIndexType>(this->getNum_EventOut_OutputPorts());
140  port++
141  ) {
142  this->m_EventOut_OutputPort[port].init();
143 
144 #if FW_OBJECT_NAMES == 1
145  Fw::ObjectName portName;
146  portName.format(
147  "%s_EventOut_OutputPort[%" PRI_FwIndexType "]",
148  this->m_objName.toChar(),
149  port
150  );
151  this->m_EventOut_OutputPort[port].setObjName(portName.toChar());
152 #endif
153  }
154 
155 #if FW_ENABLE_TEXT_LOGGING == 1
156  // Connect output port LogText
157  for (
158  FwIndexType port = 0;
159  port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
160  port++
161  ) {
162  this->m_LogText_OutputPort[port].init();
163 
164 #if FW_OBJECT_NAMES == 1
165  Fw::ObjectName portName;
166  portName.format(
167  "%s_LogText_OutputPort[%" PRI_FwIndexType "]",
168  this->m_objName.toChar(),
169  port
170  );
171  this->m_LogText_OutputPort[port].setObjName(portName.toChar());
172 #endif
173  }
174 #endif
175 
176  // Connect output port timeCaller
177  for (
178  FwIndexType port = 0;
179  port < static_cast<FwIndexType>(this->getNum_timeCaller_OutputPorts());
180  port++
181  ) {
182  this->m_timeCaller_OutputPort[port].init();
183 
184 #if FW_OBJECT_NAMES == 1
185  Fw::ObjectName portName;
186  portName.format(
187  "%s_timeCaller_OutputPort[%" PRI_FwIndexType "]",
188  this->m_objName.toChar(),
189  port
190  );
191  this->m_timeCaller_OutputPort[port].setObjName(portName.toChar());
192 #endif
193  }
194  }
195 
196  // ----------------------------------------------------------------------
197  // Getters for special input ports
198  // ----------------------------------------------------------------------
199 
202  {
203  FW_ASSERT(
204  (0 <= portNum) && (portNum < this->getNum_CmdDisp_InputPorts()),
205  static_cast<FwAssertArgType>(portNum)
206  );
207 
208  return &this->m_CmdDisp_InputPort[portNum];
209  }
210 
211  // ----------------------------------------------------------------------
212  // Getters for typed input ports
213  // ----------------------------------------------------------------------
214 
217  {
218  FW_ASSERT(
219  (0 <= portNum) && (portNum < this->getNum_setEpoch_InputPorts()),
220  static_cast<FwAssertArgType>(portNum)
221  );
222 
223  return &this->m_setEpoch_InputPort[portNum];
224  }
225 
228  {
229  FW_ASSERT(
230  (0 <= portNum) && (portNum < this->getNum_timeGetPort_InputPorts()),
231  static_cast<FwAssertArgType>(portNum)
232  );
233 
234  return &this->m_timeGetPort_InputPort[portNum];
235  }
236 
237  // ----------------------------------------------------------------------
238  // Connect input ports to special output ports
239  // ----------------------------------------------------------------------
240 
243  FwIndexType portNum,
244  Fw::InputCmdRegPort* port
245  )
246  {
247  FW_ASSERT(
248  (0 <= portNum) && (portNum < this->getNum_CmdReg_OutputPorts()),
249  static_cast<FwAssertArgType>(portNum)
250  );
251 
252  this->m_CmdReg_OutputPort[portNum].addCallPort(port);
253  }
254 
257  FwIndexType portNum,
259  )
260  {
261  FW_ASSERT(
262  (0 <= portNum) && (portNum < this->getNum_CmdStatus_OutputPorts()),
263  static_cast<FwAssertArgType>(portNum)
264  );
265 
266  this->m_CmdStatus_OutputPort[portNum].addCallPort(port);
267  }
268 
271  FwIndexType portNum,
272  Fw::InputLogPort* port
273  )
274  {
275  FW_ASSERT(
276  (0 <= portNum) && (portNum < this->getNum_EventOut_OutputPorts()),
277  static_cast<FwAssertArgType>(portNum)
278  );
279 
280  this->m_EventOut_OutputPort[portNum].addCallPort(port);
281  }
282 
283 #if FW_ENABLE_TEXT_LOGGING == 1
284 
285  void OsTimeComponentBase ::
286  set_LogText_OutputPort(
287  FwIndexType portNum,
289  )
290  {
291  FW_ASSERT(
292  (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
293  static_cast<FwAssertArgType>(portNum)
294  );
295 
296  this->m_LogText_OutputPort[portNum].addCallPort(port);
297  }
298 
299 #endif
300 
303  FwIndexType portNum,
304  Fw::InputTimePort* port
305  )
306  {
307  FW_ASSERT(
308  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
309  static_cast<FwAssertArgType>(portNum)
310  );
311 
312  this->m_timeCaller_OutputPort[portNum].addCallPort(port);
313  }
314 
315 #if FW_PORT_SERIALIZATION
316 
317  // ----------------------------------------------------------------------
318  // Connect serial input ports to special output ports
319  // ----------------------------------------------------------------------
320 
323  FwIndexType portNum,
324  Fw::InputSerializePort* port
325  )
326  {
327  FW_ASSERT(
328  (0 <= portNum) && (portNum < this->getNum_CmdReg_OutputPorts()),
329  static_cast<FwAssertArgType>(portNum)
330  );
331 
332  this->m_CmdReg_OutputPort[portNum].registerSerialPort(port);
333  }
334 
337  FwIndexType portNum,
338  Fw::InputSerializePort* port
339  )
340  {
341  FW_ASSERT(
342  (0 <= portNum) && (portNum < this->getNum_CmdStatus_OutputPorts()),
343  static_cast<FwAssertArgType>(portNum)
344  );
345 
346  this->m_CmdStatus_OutputPort[portNum].registerSerialPort(port);
347  }
348 
351  FwIndexType portNum,
352  Fw::InputSerializePort* port
353  )
354  {
355  FW_ASSERT(
356  (0 <= portNum) && (portNum < this->getNum_EventOut_OutputPorts()),
357  static_cast<FwAssertArgType>(portNum)
358  );
359 
360  this->m_EventOut_OutputPort[portNum].registerSerialPort(port);
361  }
362 
363 #if FW_ENABLE_TEXT_LOGGING == 1
364 
365  void OsTimeComponentBase ::
366  set_LogText_OutputPort(
367  FwIndexType portNum,
368  Fw::InputSerializePort* port
369  )
370  {
371  FW_ASSERT(
372  (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
373  static_cast<FwAssertArgType>(portNum)
374  );
375 
376  this->m_LogText_OutputPort[portNum].registerSerialPort(port);
377  }
378 
379 #endif
380 
383  FwIndexType portNum,
384  Fw::InputSerializePort* port
385  )
386  {
387  FW_ASSERT(
388  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
389  static_cast<FwAssertArgType>(portNum)
390  );
391 
392  this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
393  }
394 
395 #endif
396 
397  // ----------------------------------------------------------------------
398  // Command registration
399  // ----------------------------------------------------------------------
400 
403  {
404  FW_ASSERT(this->m_CmdReg_OutputPort[0].isConnected());
405 
406  this->m_CmdReg_OutputPort[0].invoke(
408  );
409  }
410 
411  // ----------------------------------------------------------------------
412  // Component construction and destruction
413  // ----------------------------------------------------------------------
414 
416  OsTimeComponentBase(const char* compName) :
417  Fw::PassiveComponentBase(compName)
418  {
419 
420  }
421 
424  {
425 
426  }
427 
428  // ----------------------------------------------------------------------
429  // Getters for numbers of special input ports
430  // ----------------------------------------------------------------------
431 
434  {
435  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_CmdDisp_InputPort));
436  }
437 
438  // ----------------------------------------------------------------------
439  // Getters for numbers of typed input ports
440  // ----------------------------------------------------------------------
441 
444  {
445  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_setEpoch_InputPort));
446  }
447 
450  {
451  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_timeGetPort_InputPort));
452  }
453 
454  // ----------------------------------------------------------------------
455  // Getters for numbers of special output ports
456  // ----------------------------------------------------------------------
457 
460  {
461  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_CmdReg_OutputPort));
462  }
463 
466  {
467  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_CmdStatus_OutputPort));
468  }
469 
472  {
473  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_EventOut_OutputPort));
474  }
475 
476 #if FW_ENABLE_TEXT_LOGGING == 1
477 
478  FwIndexType OsTimeComponentBase ::
479  getNum_LogText_OutputPorts() const
480  {
481  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_LogText_OutputPort));
482  }
483 
484 #endif
485 
488  {
489  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_timeCaller_OutputPort));
490  }
491 
492  // ----------------------------------------------------------------------
493  // Connection status queries for special output ports
494  // ----------------------------------------------------------------------
495 
498  {
499  FW_ASSERT(
500  (0 <= portNum) && (portNum < this->getNum_CmdReg_OutputPorts()),
501  static_cast<FwAssertArgType>(portNum)
502  );
503 
504  return this->m_CmdReg_OutputPort[portNum].isConnected();
505  }
506 
509  {
510  FW_ASSERT(
511  (0 <= portNum) && (portNum < this->getNum_CmdStatus_OutputPorts()),
512  static_cast<FwAssertArgType>(portNum)
513  );
514 
515  return this->m_CmdStatus_OutputPort[portNum].isConnected();
516  }
517 
520  {
521  FW_ASSERT(
522  (0 <= portNum) && (portNum < this->getNum_EventOut_OutputPorts()),
523  static_cast<FwAssertArgType>(portNum)
524  );
525 
526  return this->m_EventOut_OutputPort[portNum].isConnected();
527  }
528 
529 #if FW_ENABLE_TEXT_LOGGING == 1
530 
531  bool OsTimeComponentBase ::
532  isConnected_LogText_OutputPort(FwIndexType portNum)
533  {
534  FW_ASSERT(
535  (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
536  static_cast<FwAssertArgType>(portNum)
537  );
538 
539  return this->m_LogText_OutputPort[portNum].isConnected();
540  }
541 
542 #endif
543 
546  {
547  FW_ASSERT(
548  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
549  static_cast<FwAssertArgType>(portNum)
550  );
551 
552  return this->m_timeCaller_OutputPort[portNum].isConnected();
553  }
554 
555  // ----------------------------------------------------------------------
556  // Port handler base-class functions for typed input ports
557  //
558  // Call these functions directly to bypass the corresponding ports
559  // ----------------------------------------------------------------------
560 
563  FwIndexType portNum,
564  const Fw::Time& fw_time,
565  const Os::RawTime& os_time
566  )
567  {
568  // Make sure port number is valid
569  FW_ASSERT(
570  (0 <= portNum) && (portNum < this->getNum_setEpoch_InputPorts()),
571  static_cast<FwAssertArgType>(portNum)
572  );
573 
574  // Call handler function
575  this->setEpoch_handler(
576  portNum,
577  fw_time,
578  os_time
579  );
580  }
581 
584  FwIndexType portNum,
585  Fw::Time& time
586  )
587  {
588  // Make sure port number is valid
589  FW_ASSERT(
590  (0 <= portNum) && (portNum < this->getNum_timeGetPort_InputPorts()),
591  static_cast<FwAssertArgType>(portNum)
592  );
593 
594  // Call handler function
595  this->timeGetPort_handler(
596  portNum,
597  time
598  );
599  }
600 
601  // ----------------------------------------------------------------------
602  // Command response
603  // ----------------------------------------------------------------------
604 
607  FwOpcodeType opCode,
608  U32 cmdSeq,
609  Fw::CmdResponse response
610  )
611  {
612  FW_ASSERT(this->m_CmdStatus_OutputPort[0].isConnected());
613  this->m_CmdStatus_OutputPort[0].invoke(opCode, cmdSeq, response);
614  }
615 
616  // ----------------------------------------------------------------------
617  // Command handler base-class functions
618  //
619  // Call these functions directly to bypass the command input port
620  // ----------------------------------------------------------------------
621 
624  FwOpcodeType opCode,
625  U32 cmdSeq,
626  Fw::CmdArgBuffer& args
627  )
628  {
629  // Deserialize the arguments
631 
632  // Reset the buffer
633  args.resetDeser();
634 
635  U32 seconds_now;
636  _status = args.deserialize(seconds_now);
637  if (_status != Fw::FW_SERIALIZE_OK) {
638  if (this->m_CmdStatus_OutputPort[0].isConnected()) {
639  this->m_CmdStatus_OutputPort[0].invoke(
640  opCode,
641  cmdSeq,
643  );
644  }
645  return;
646  }
647 
648 #if FW_CMD_CHECK_RESIDUAL
649  // Make sure there was no data left over.
650  // That means the argument buffer size was incorrect.
651  if (args.getBuffLeft() != 0) {
652  if (this->m_CmdStatus_OutputPort[0].isConnected()) {
653  this->m_CmdStatus_OutputPort[0].invoke(
654  opCode,
655  cmdSeq,
657  );
658  }
659  return;
660  }
661 #endif
662 
664  opCode, cmdSeq,
665  seconds_now
666  );
667  }
668 
669  // ----------------------------------------------------------------------
670  // Event logging functions
671  // ----------------------------------------------------------------------
672 
675  {
676  // Get the time
677  Fw::Time _logTime;
678  if (this->m_timeCaller_OutputPort[0].isConnected()) {
679  this->m_timeCaller_OutputPort[0].invoke(_logTime);
680  }
681 
682  FwEventIdType _id = static_cast<FwEventIdType>(0);
683 
684  _id = this->getIdBase() + EVENTID_SETCURRENTTIMEERROR;
685 
686  // Emit the event on the log port
687  if (this->m_EventOut_OutputPort[0].isConnected()) {
688  Fw::LogBuffer _logBuff;
690 
691 #if FW_AMPCS_COMPATIBLE
692  // Serialize the number of arguments
693  _status = _logBuff.serialize(static_cast<U8>(1));
694  FW_ASSERT(
695  _status == Fw::FW_SERIALIZE_OK,
696  static_cast<FwAssertArgType>(_status)
697  );
698 #endif
699 
700 #if FW_AMPCS_COMPATIBLE
701  // Serialize the argument size
702  _status = _logBuff.serialize(
703  static_cast<U8>(sizeof(U32))
704  );
705  FW_ASSERT(
706  _status == Fw::FW_SERIALIZE_OK,
707  static_cast<FwAssertArgType>(_status)
708  );
709 #endif
710  _status = _logBuff.serialize(status);
711  FW_ASSERT(
712  _status == Fw::FW_SERIALIZE_OK,
713  static_cast<FwAssertArgType>(_status)
714  );
715 
716  this->m_EventOut_OutputPort[0].invoke(
717  _id,
718  _logTime,
720  _logBuff
721  );
722  }
723 
724  // Emit the event on the text log port
725 #if FW_ENABLE_TEXT_LOGGING
726  if (this->m_LogText_OutputPort[0].isConnected()) {
727 #if FW_OBJECT_NAMES == 1
728  const char* _formatString =
729  "(%s) %s: Could not set current time due to RawTime error status %" PRIu32 "";
730 #else
731  const char* _formatString =
732  "%s: Could not set current time due to RawTime error status %" PRIu32 "";
733 #endif
734 
735  Fw::TextLogString _logString;
736  _logString.format(
737  _formatString,
738 #if FW_OBJECT_NAMES == 1
739  this->m_objName.toChar(),
740 #endif
741  "SetCurrentTimeError ",
742  status
743  );
744 
745  this->m_LogText_OutputPort[0].invoke(
746  _id,
747  _logTime,
749  _logString
750  );
751  }
752 #endif
753  }
754 
755  // ----------------------------------------------------------------------
756  // Time
757  // ----------------------------------------------------------------------
758 
760  getTime() const
761  {
762  if (this->m_timeCaller_OutputPort[0].isConnected()) {
763  Fw::Time _time;
764  this->m_timeCaller_OutputPort[0].invoke(_time);
765  return _time;
766  }
767  else {
768  return Fw::Time(TB_NONE, 0, 0);
769  }
770  }
771 
772  // ----------------------------------------------------------------------
773  // Calls for messages received on special input ports
774  // ----------------------------------------------------------------------
775 
776  void OsTimeComponentBase ::
777  m_p_CmdDisp_in(
778  Fw::PassiveComponentBase* callComp,
779  FwIndexType portNum,
780  FwOpcodeType opCode,
781  U32 cmdSeq,
782  Fw::CmdArgBuffer& args
783  )
784  {
785  FW_ASSERT(callComp);
786  OsTimeComponentBase* compPtr = static_cast<OsTimeComponentBase*>(callComp);
787 
788  const U32 idBase = callComp->getIdBase();
789  FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
790 
791  // Select base class function based on opcode
792  switch (opCode - idBase) {
793  case OPCODE_SETCURRENTTIME: {
795  opCode,
796  cmdSeq,
797  args
798  );
799  break;
800  }
801  }
802  }
803 
804  // ----------------------------------------------------------------------
805  // Calls for messages received on typed input ports
806  // ----------------------------------------------------------------------
807 
808  void OsTimeComponentBase ::
809  m_p_setEpoch_in(
810  Fw::PassiveComponentBase* callComp,
811  FwIndexType portNum,
812  const Fw::Time& fw_time,
813  const Os::RawTime& os_time
814  )
815  {
816  FW_ASSERT(callComp);
817  OsTimeComponentBase* compPtr = static_cast<OsTimeComponentBase*>(callComp);
818  compPtr->setEpoch_handlerBase(
819  portNum,
820  fw_time,
821  os_time
822  );
823  }
824 
825  void OsTimeComponentBase ::
826  m_p_timeGetPort_in(
827  Fw::PassiveComponentBase* callComp,
828  FwIndexType portNum,
829  Fw::Time& time
830  )
831  {
832  FW_ASSERT(callComp);
833  OsTimeComponentBase* compPtr = static_cast<OsTimeComponentBase*>(callComp);
834  compPtr->timeGetPort_handlerBase(
835  portNum,
836  time
837  );
838  }
839 
840 }
Serialization/Deserialization operation was successful.
FwIndexType getNum_CmdStatus_OutputPorts() const
void addCallPort(InputTimePort *callPort)
Register an input port.
Definition: TimePortAc.cpp:134
Definition: Time.hpp:9
Svc::InputOsTimeEpochPort * get_setEpoch_InputPort(FwIndexType portNum)
bool isConnected_CmdReg_OutputPort(FwIndexType portNum)
FwIdType FwOpcodeType
The type of a command opcode.
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void init()
Initialization function.
Definition: TimePortAc.cpp:56
I32 FwEnumStoreType
virtual void SetCurrentTime_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, U32 seconds_now)=0
Handler for command SetCurrentTime.
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
void set_CmdStatus_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to CmdStatus[portNum].
void init()
Initialization function.
Definition: CmdPortAc.cpp:56
Fw::InputCmdPort * get_CmdDisp_InputPort(FwIndexType portNum)
void log_WARNING_HI_SetCurrentTimeError(U32 status) const
Enum representing a command response.
void set_CmdReg_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to CmdReg[portNum].
virtual void setEpoch_handler(FwIndexType portNum, const Fw::Time &fw_time, const Os::RawTime &os_time)=0
Handler for input port setEpoch.
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
FwIndexType getNum_CmdReg_OutputPorts() const
bool isConnected_EventOut_OutputPort(FwIndexType portNum)
void init()
Object initializer.
Definition: ObjBase.cpp:26
SerializeStatus
forward declaration for string
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: CmdPortAc.cpp:62
FwIdType FwEventIdType
The type of an event identifier.
void setEpoch_handlerBase(FwIndexType portNum, const Fw::Time &fw_time, const Os::RawTime &os_time)
Handler base-class function for input port setEpoch.
void invoke(FwOpcodeType opCode) const
Invoke a port interface.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
Definition: FpConfig.h:53
Serializable::SizeType getBuffLeft() const
returns how much deserialization buffer is left
void init()
Initialization function.
Definition: TimePortAc.cpp:128
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
void invoke(Fw::Time &time) const
Invoke a port interface.
Definition: TimePortAc.cpp:147
void SetCurrentTime_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Base-class handler function for command SetCurrentTime.
void init()
Initialization function.
const char * toChar() const
Definition: ObjectName.hpp:50
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke a port interface.
void resetDeser()
reset deserialization to beginning
FwIndexType getNum_CmdDisp_InputPorts() const
FwIndexType getNum_timeCaller_OutputPorts() const
A serious but recoverable event.
FwIndexType getNum_setEpoch_InputPorts() const
bool isConnected() const
Definition: PortBase.cpp:42
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
#define PRI_FwIndexType
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
Definition: StringBase.cpp:55
void init()
Initialization function.
Definition: LogPortAc.cpp:151
void timeGetPort_handlerBase(FwIndexType portNum, Fw::Time &time)
Handler base-class function for input port timeGetPort.
void setPortNum(FwIndexType portNum)
bool isConnected_CmdStatus_OutputPort(FwIndexType portNum)
Command failed to deserialize.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port interface.
Definition: LogPortAc.cpp:170
Auto-generated base for OsTime component.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: TimePortAc.cpp:62
No time base has been established.
Definition: FpConfig.h:30
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
PlatformIndexType FwIndexType
void set_EventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to EventOut[portNum].
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
Definition: BasicTypes.h:93
void addCallPort(InputLogPort *callPort)
Register an input port.
Definition: LogPortAc.cpp:157
virtual ~OsTimeComponentBase()
Destroy OsTimeComponentBase object.
void init()
Initialization function.
An error occurred while attempting to set the current time.
RateGroupDivider component implementation.
virtual void timeGetPort_handler(FwIndexType portNum, Fw::Time &time)=0
Handler for input port timeGetPort.
FwIndexType getNum_timeGetPort_InputPorts() const
Fw::InputTimePort * get_timeGetPort_InputPort(FwIndexType portNum)
void regCommands()
Register commands with the Command Dispatcher.
void init()
Initialization function.
OsTimeComponentBase(const char *compName="")
Construct OsTimeComponentBase object.
#define FW_ASSERT(...)
Definition: Assert.hpp:14
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
FwIndexType getNum_EventOut_OutputPorts() const