9 #if FW_ENABLE_TEXT_LOGGING 32 this->m_CmdDisp_InputPort[port].
init();
37 this->m_CmdDisp_InputPort[port].
setPortNum(port);
39 #if FW_OBJECT_NAMES == 1 43 this->m_objName.toChar(),
46 this->m_CmdDisp_InputPort[port].setObjName(portName.
toChar());
56 this->m_setEpoch_InputPort[port].
init();
61 this->m_setEpoch_InputPort[port].
setPortNum(port);
63 #if FW_OBJECT_NAMES == 1 67 this->m_objName.toChar(),
70 this->m_setEpoch_InputPort[port].setObjName(portName.
toChar());
80 this->m_timeGetPort_InputPort[port].
init();
85 this->m_timeGetPort_InputPort[port].
setPortNum(port);
87 #if FW_OBJECT_NAMES == 1 91 this->m_objName.toChar(),
94 this->m_timeGetPort_InputPort[port].setObjName(portName.
toChar());
104 this->m_CmdReg_OutputPort[port].
init();
106 #if FW_OBJECT_NAMES == 1 110 this->m_objName.toChar(),
113 this->m_CmdReg_OutputPort[port].setObjName(portName.
toChar());
123 this->m_CmdStatus_OutputPort[port].
init();
125 #if FW_OBJECT_NAMES == 1 129 this->m_objName.toChar(),
132 this->m_CmdStatus_OutputPort[port].setObjName(portName.
toChar());
142 this->m_EventOut_OutputPort[port].
init();
144 #if FW_OBJECT_NAMES == 1 148 this->m_objName.toChar(),
151 this->m_EventOut_OutputPort[port].setObjName(portName.
toChar());
155 #if FW_ENABLE_TEXT_LOGGING == 1 159 port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
162 this->m_LogText_OutputPort[port].
init();
164 #if FW_OBJECT_NAMES == 1 168 this->m_objName.toChar(),
171 this->m_LogText_OutputPort[port].setObjName(portName.
toChar());
182 this->m_timeCaller_OutputPort[port].
init();
184 #if FW_OBJECT_NAMES == 1 188 this->m_objName.toChar(),
191 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
205 static_cast<FwAssertArgType>(portNum)
208 return &this->m_CmdDisp_InputPort[portNum];
220 static_cast<FwAssertArgType>(portNum)
223 return &this->m_setEpoch_InputPort[portNum];
231 static_cast<FwAssertArgType>(portNum)
234 return &this->m_timeGetPort_InputPort[portNum];
249 static_cast<FwAssertArgType>(portNum)
252 this->m_CmdReg_OutputPort[portNum].
addCallPort(port);
263 static_cast<FwAssertArgType>(portNum)
266 this->m_CmdStatus_OutputPort[portNum].
addCallPort(port);
277 static_cast<FwAssertArgType>(portNum)
280 this->m_EventOut_OutputPort[portNum].
addCallPort(port);
283 #if FW_ENABLE_TEXT_LOGGING == 1 285 void OsTimeComponentBase ::
286 set_LogText_OutputPort(
292 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
293 static_cast<FwAssertArgType>(portNum)
296 this->m_LogText_OutputPort[portNum].addCallPort(port);
309 static_cast<FwAssertArgType>(portNum)
312 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
315 #if FW_PORT_SERIALIZATION 324 Fw::InputSerializePort* port
329 static_cast<FwAssertArgType>(portNum)
332 this->m_CmdReg_OutputPort[portNum].registerSerialPort(port);
338 Fw::InputSerializePort* port
343 static_cast<FwAssertArgType>(portNum)
346 this->m_CmdStatus_OutputPort[portNum].registerSerialPort(port);
352 Fw::InputSerializePort* port
357 static_cast<FwAssertArgType>(portNum)
360 this->m_EventOut_OutputPort[portNum].registerSerialPort(port);
363 #if FW_ENABLE_TEXT_LOGGING == 1 365 void OsTimeComponentBase ::
366 set_LogText_OutputPort(
368 Fw::InputSerializePort* port
372 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
373 static_cast<FwAssertArgType>(portNum)
376 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
384 Fw::InputSerializePort* port
389 static_cast<FwAssertArgType>(portNum)
392 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
404 FW_ASSERT(this->m_CmdReg_OutputPort[0].isConnected());
406 this->m_CmdReg_OutputPort[0].
invoke(
417 Fw::PassiveComponentBase(compName)
476 #if FW_ENABLE_TEXT_LOGGING == 1 479 getNum_LogText_OutputPorts()
const 501 static_cast<FwAssertArgType>(portNum)
504 return this->m_CmdReg_OutputPort[portNum].
isConnected();
512 static_cast<FwAssertArgType>(portNum)
515 return this->m_CmdStatus_OutputPort[portNum].
isConnected();
523 static_cast<FwAssertArgType>(portNum)
526 return this->m_EventOut_OutputPort[portNum].
isConnected();
529 #if FW_ENABLE_TEXT_LOGGING == 1 531 bool OsTimeComponentBase ::
532 isConnected_LogText_OutputPort(
FwIndexType portNum)
535 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
536 static_cast<FwAssertArgType>(portNum)
539 return this->m_LogText_OutputPort[portNum].isConnected();
549 static_cast<FwAssertArgType>(portNum)
552 return this->m_timeCaller_OutputPort[portNum].
isConnected();
571 static_cast<FwAssertArgType>(portNum)
591 static_cast<FwAssertArgType>(portNum)
612 FW_ASSERT(this->m_CmdStatus_OutputPort[0].isConnected());
613 this->m_CmdStatus_OutputPort[0].
invoke(opCode, cmdSeq, response);
638 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
639 this->m_CmdStatus_OutputPort[0].
invoke(
648 #if FW_CMD_CHECK_RESIDUAL 652 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
653 this->m_CmdStatus_OutputPort[0].
invoke(
678 if (this->m_timeCaller_OutputPort[0].isConnected()) {
679 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
687 if (this->m_EventOut_OutputPort[0].isConnected()) {
691 #if FW_AMPCS_COMPATIBLE 693 _status = _logBuff.
serialize(static_cast<U8>(1));
696 static_cast<FwAssertArgType>(_status)
700 #if FW_AMPCS_COMPATIBLE 703 static_cast<U8>(
sizeof(U32))
707 static_cast<FwAssertArgType>(_status)
713 static_cast<FwAssertArgType>(_status)
716 this->m_EventOut_OutputPort[0].
invoke(
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
"";
731 const char* _formatString =
732 "%s: Could not set current time due to RawTime error status %" PRIu32
"";
739 this->m_objName.toChar(),
741 "SetCurrentTimeError ",
745 this->m_LogText_OutputPort[0].invoke(
762 if (this->m_timeCaller_OutputPort[0].isConnected()) {
764 this->m_timeCaller_OutputPort[0].
invoke(_time);
776 void OsTimeComponentBase ::
788 const U32 idBase = callComp->
getIdBase();
789 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
792 switch (opCode - idBase) {
808 void OsTimeComponentBase ::
818 compPtr->setEpoch_handlerBase(
825 void OsTimeComponentBase ::
834 compPtr->timeGetPort_handlerBase(
Serialization/Deserialization operation was successful.
FwIndexType getNum_CmdStatus_OutputPorts() const
void addCallPort(InputTimePort *callPort)
Register an input port.
Svc::InputOsTimeEpochPort * get_setEpoch_InputPort(FwIndexType portNum)
bool isConnected_CmdReg_OutputPort(FwIndexType portNum)
FwIdType FwOpcodeType
The type of a command opcode.
FwIdType getIdBase() const
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
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].
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.
SerializeStatus
forward declaration for string
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) ...
Serializable::SizeType getBuffLeft() const
returns how much deserialization buffer is left
void init()
Initialization function.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
void invoke(Fw::Time &time) const
Invoke a port interface.
void SetCurrentTime_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Base-class handler function for command SetCurrentTime.
const char * toChar() const
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_timeCaller_OutputPort(FwIndexType portNum)
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
void timeGetPort_handlerBase(FwIndexType portNum, Fw::Time &time)
Handler base-class function for input port timeGetPort.
bool isConnected_CmdStatus_OutputPort(FwIndexType portNum)
Command failed to deserialize.
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port interface.
Auto-generated base for OsTime component.
No time base has been established.
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
void addCallPort(InputLogPort *callPort)
Register an input port.
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.
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
FwIndexType getNum_EventOut_OutputPorts() const