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  // Connection status queries for special output ports
430  // ----------------------------------------------------------------------
431 
434  {
435  FW_ASSERT(
436  (0 <= portNum) && (portNum < this->getNum_CmdReg_OutputPorts()),
437  static_cast<FwAssertArgType>(portNum)
438  );
439 
440  return this->m_CmdReg_OutputPort[portNum].isConnected();
441  }
442 
445  {
446  FW_ASSERT(
447  (0 <= portNum) && (portNum < this->getNum_CmdStatus_OutputPorts()),
448  static_cast<FwAssertArgType>(portNum)
449  );
450 
451  return this->m_CmdStatus_OutputPort[portNum].isConnected();
452  }
453 
456  {
457  FW_ASSERT(
458  (0 <= portNum) && (portNum < this->getNum_EventOut_OutputPorts()),
459  static_cast<FwAssertArgType>(portNum)
460  );
461 
462  return this->m_EventOut_OutputPort[portNum].isConnected();
463  }
464 
465 #if FW_ENABLE_TEXT_LOGGING == 1
466 
467  bool OsTimeComponentBase ::
468  isConnected_LogText_OutputPort(FwIndexType portNum)
469  {
470  FW_ASSERT(
471  (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
472  static_cast<FwAssertArgType>(portNum)
473  );
474 
475  return this->m_LogText_OutputPort[portNum].isConnected();
476  }
477 
478 #endif
479 
482  {
483  FW_ASSERT(
484  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
485  static_cast<FwAssertArgType>(portNum)
486  );
487 
488  return this->m_timeCaller_OutputPort[portNum].isConnected();
489  }
490 
491  // ----------------------------------------------------------------------
492  // Port handler base-class functions for typed input ports
493  //
494  // Call these functions directly to bypass the corresponding ports
495  // ----------------------------------------------------------------------
496 
499  FwIndexType portNum,
500  const Fw::Time& fw_time,
501  const Os::RawTime& os_time
502  )
503  {
504  // Make sure port number is valid
505  FW_ASSERT(
506  (0 <= portNum) && (portNum < this->getNum_setEpoch_InputPorts()),
507  static_cast<FwAssertArgType>(portNum)
508  );
509 
510  // Call handler function
511  this->setEpoch_handler(
512  portNum,
513  fw_time,
514  os_time
515  );
516  }
517 
520  FwIndexType portNum,
521  Fw::Time& time
522  )
523  {
524  // Make sure port number is valid
525  FW_ASSERT(
526  (0 <= portNum) && (portNum < this->getNum_timeGetPort_InputPorts()),
527  static_cast<FwAssertArgType>(portNum)
528  );
529 
530  // Call handler function
531  this->timeGetPort_handler(
532  portNum,
533  time
534  );
535  }
536 
537  // ----------------------------------------------------------------------
538  // Command response
539  // ----------------------------------------------------------------------
540 
543  FwOpcodeType opCode,
544  U32 cmdSeq,
545  Fw::CmdResponse response
546  )
547  {
548  FW_ASSERT(this->m_CmdStatus_OutputPort[0].isConnected());
549  this->m_CmdStatus_OutputPort[0].invoke(opCode, cmdSeq, response);
550  }
551 
552  // ----------------------------------------------------------------------
553  // Command handler base-class functions
554  //
555  // Call these functions directly to bypass the command input port
556  // ----------------------------------------------------------------------
557 
560  FwOpcodeType opCode,
561  U32 cmdSeq,
562  Fw::CmdArgBuffer& args
563  )
564  {
565  // Deserialize the arguments
567 
568  // Reset the buffer
569  args.resetDeser();
570 
571  U32 seconds_now;
572  _status = args.deserializeTo(seconds_now);
573  if (_status != Fw::FW_SERIALIZE_OK) {
574  if (this->m_CmdStatus_OutputPort[0].isConnected()) {
575  this->m_CmdStatus_OutputPort[0].invoke(
576  opCode,
577  cmdSeq,
579  );
580  }
581  return;
582  }
583 
584 #if FW_CMD_CHECK_RESIDUAL
585  // Make sure there was no data left over.
586  // That means the argument buffer size was incorrect.
587  if (args.getDeserializeSizeLeft() != 0) {
588  if (this->m_CmdStatus_OutputPort[0].isConnected()) {
589  this->m_CmdStatus_OutputPort[0].invoke(
590  opCode,
591  cmdSeq,
593  );
594  }
595  return;
596  }
597 #endif
598 
600  opCode, cmdSeq,
601  seconds_now
602  );
603  }
604 
605  // ----------------------------------------------------------------------
606  // Event logging functions
607  // ----------------------------------------------------------------------
608 
611  {
612  // Get the time
613  Fw::Time _logTime;
614  if (this->m_timeCaller_OutputPort[0].isConnected()) {
615  this->m_timeCaller_OutputPort[0].invoke(_logTime);
616  }
617 
618  FwEventIdType _id = static_cast<FwEventIdType>(0);
619 
620  _id = this->getIdBase() + EVENTID_SETCURRENTTIMEERROR;
621 
622  // Emit the event on the log port
623  if (this->m_EventOut_OutputPort[0].isConnected()) {
624  Fw::LogBuffer _logBuff;
626 
627 #if FW_AMPCS_COMPATIBLE
628  // Serialize the number of arguments
629  _status = _logBuff.serializeFrom(static_cast<U8>(1));
630  FW_ASSERT(
631  _status == Fw::FW_SERIALIZE_OK,
632  static_cast<FwAssertArgType>(_status)
633  );
634 #endif
635 
636 #if FW_AMPCS_COMPATIBLE
637  // Serialize the argument size
638  _status = _logBuff.serializeFrom(
639  static_cast<U8>(sizeof(U32))
640  );
641  FW_ASSERT(
642  _status == Fw::FW_SERIALIZE_OK,
643  static_cast<FwAssertArgType>(_status)
644  );
645 #endif
646  _status = _logBuff.serializeFrom(status);
647  FW_ASSERT(
648  _status == Fw::FW_SERIALIZE_OK,
649  static_cast<FwAssertArgType>(_status)
650  );
651 
652  this->m_EventOut_OutputPort[0].invoke(
653  _id,
654  _logTime,
656  _logBuff
657  );
658  }
659 
660  // Emit the event on the text log port
661 #if FW_ENABLE_TEXT_LOGGING
662  if (this->m_LogText_OutputPort[0].isConnected()) {
663 #if FW_OBJECT_NAMES == 1
664  const char* _formatString =
665  "(%s) %s: Could not set current time due to RawTime error status %" PRIu32 "";
666 #else
667  const char* _formatString =
668  "%s: Could not set current time due to RawTime error status %" PRIu32 "";
669 #endif
670 
671  Fw::TextLogString _logString;
672  _logString.format(
673  _formatString,
674 #if FW_OBJECT_NAMES == 1
675  this->m_objName.toChar(),
676 #endif
677  "SetCurrentTimeError ",
678  status
679  );
680 
681  this->m_LogText_OutputPort[0].invoke(
682  _id,
683  _logTime,
685  _logString
686  );
687  }
688 #endif
689  }
690 
691  // ----------------------------------------------------------------------
692  // Time
693  // ----------------------------------------------------------------------
694 
696  getTime() const
697  {
698  if (this->m_timeCaller_OutputPort[0].isConnected()) {
699  Fw::Time _time;
700  this->m_timeCaller_OutputPort[0].invoke(_time);
701  return _time;
702  }
703  else {
704  return Fw::Time(TimeBase::TB_NONE, 0, 0);
705  }
706  }
707 
708  // ----------------------------------------------------------------------
709  // Calls for messages received on special input ports
710  // ----------------------------------------------------------------------
711 
712  void OsTimeComponentBase ::
713  m_p_CmdDisp_in(
714  Fw::PassiveComponentBase* callComp,
715  FwIndexType portNum,
716  FwOpcodeType opCode,
717  U32 cmdSeq,
718  Fw::CmdArgBuffer& args
719  )
720  {
721  FW_ASSERT(callComp);
722  OsTimeComponentBase* compPtr = static_cast<OsTimeComponentBase*>(callComp);
723 
724  const U32 idBase = callComp->getIdBase();
725  FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
726 
727  // Select base class function based on opcode
728  switch (opCode - idBase) {
729  case OPCODE_SETCURRENTTIME: {
731  opCode,
732  cmdSeq,
733  args
734  );
735  break;
736  }
737  }
738  }
739 
740  // ----------------------------------------------------------------------
741  // Calls for messages received on typed input ports
742  // ----------------------------------------------------------------------
743 
744  void OsTimeComponentBase ::
745  m_p_setEpoch_in(
746  Fw::PassiveComponentBase* callComp,
747  FwIndexType portNum,
748  const Fw::Time& fw_time,
749  const Os::RawTime& os_time
750  )
751  {
752  FW_ASSERT(callComp);
753  OsTimeComponentBase* compPtr = static_cast<OsTimeComponentBase*>(callComp);
754  compPtr->setEpoch_handlerBase(
755  portNum,
756  fw_time,
757  os_time
758  );
759  }
760 
761  void OsTimeComponentBase ::
762  m_p_timeGetPort_in(
763  Fw::PassiveComponentBase* callComp,
764  FwIndexType portNum,
765  Fw::Time& time
766  )
767  {
768  FW_ASSERT(callComp);
769  OsTimeComponentBase* compPtr = static_cast<OsTimeComponentBase*>(callComp);
770  compPtr->timeGetPort_handlerBase(
771  portNum,
772  time
773  );
774  }
775 
776 }
static constexpr FwIndexType getNum_setEpoch_InputPorts()
Serialization/Deserialization operation was successful.
void addCallPort(InputTimePort *callPort)
Register an input port.
Definition: TimePortAc.cpp:134
static constexpr FwIndexType getNum_EventOut_OutputPorts()
Svc::InputOsTimeEpochPort * get_setEpoch_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_CmdDisp_InputPorts()
bool isConnected_CmdReg_OutputPort(FwIndexType portNum)
FwIdType FwOpcodeType
The type of a command opcode.
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
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.
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
An error occurred while attempting to set the current time.
static constexpr FwIndexType getNum_CmdStatus_OutputPorts()
Enum representing a command response.
No time base has been established (Required)
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.
bool isConnected_EventOut_OutputPort(FwIndexType portNum)
void init()
Object initializer.
Definition: ObjBase.cpp:24
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:26
void init()
Initialization function.
Definition: TimePortAc.cpp:128
static constexpr FwIndexType getNum_timeGetPort_InputPorts()
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.
Serializable::SizeType getDeserializeSizeLeft() const override
Get remaining deserialization buffer size.
void init()
Initialization function.
const char * toChar() const
Convert to a C-style char*.
Definition: ObjectName.hpp:50
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke a port interface.
void resetDeser() override
Reset deserialization pointer to beginning of buffer.
A serious but recoverable event.
bool isConnected() const
Definition: PortBase.cpp:38
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
#define PRI_FwIndexType
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
Definition: StringBase.cpp:39
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
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
PlatformIndexType FwIndexType
void set_EventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to EventOut[portNum].
void addCallPort(InputLogPort *callPort)
Register an input port.
Definition: LogPortAc.cpp:157
virtual ~OsTimeComponentBase()
Destroy OsTimeComponentBase object.
void init()
Initialization function.
RateGroupDivider component implementation.
SerializeStatus deserializeTo(U8 &val, Endianness mode=Endianness::BIG) override
Deserialize an 8-bit unsigned integer value.
virtual void timeGetPort_handler(FwIndexType portNum, Fw::Time &time)=0
Handler for input port timeGetPort.
Fw::InputTimePort * get_timeGetPort_InputPort(FwIndexType portNum)
void regCommands()
Register commands with the Command Dispatcher.
Implementation of malloc based allocator.
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.
static constexpr FwIndexType getNum_CmdReg_OutputPorts()