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)
437 static_cast<FwAssertArgType>(portNum)
440 return this->m_CmdReg_OutputPort[portNum].
isConnected();
448 static_cast<FwAssertArgType>(portNum)
451 return this->m_CmdStatus_OutputPort[portNum].
isConnected();
459 static_cast<FwAssertArgType>(portNum)
462 return this->m_EventOut_OutputPort[portNum].
isConnected();
465 #if FW_ENABLE_TEXT_LOGGING == 1 467 bool OsTimeComponentBase ::
468 isConnected_LogText_OutputPort(
FwIndexType portNum)
471 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
472 static_cast<FwAssertArgType>(portNum)
475 return this->m_LogText_OutputPort[portNum].isConnected();
485 static_cast<FwAssertArgType>(portNum)
488 return this->m_timeCaller_OutputPort[portNum].
isConnected();
507 static_cast<FwAssertArgType>(portNum)
527 static_cast<FwAssertArgType>(portNum)
548 FW_ASSERT(this->m_CmdStatus_OutputPort[0].isConnected());
549 this->m_CmdStatus_OutputPort[0].
invoke(opCode, cmdSeq, response);
574 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
575 this->m_CmdStatus_OutputPort[0].
invoke(
584 #if FW_CMD_CHECK_RESIDUAL 588 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
589 this->m_CmdStatus_OutputPort[0].
invoke(
614 if (this->m_timeCaller_OutputPort[0].isConnected()) {
615 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
623 if (this->m_EventOut_OutputPort[0].isConnected()) {
627 #if FW_AMPCS_COMPATIBLE 632 static_cast<FwAssertArgType>(_status)
636 #if FW_AMPCS_COMPATIBLE 639 static_cast<U8>(
sizeof(U32))
643 static_cast<FwAssertArgType>(_status)
649 static_cast<FwAssertArgType>(_status)
652 this->m_EventOut_OutputPort[0].
invoke(
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
"";
667 const char* _formatString =
668 "%s: Could not set current time due to RawTime error status %" PRIu32
"";
675 this->m_objName.toChar(),
677 "SetCurrentTimeError ",
681 this->m_LogText_OutputPort[0].invoke(
698 if (this->m_timeCaller_OutputPort[0].isConnected()) {
700 this->m_timeCaller_OutputPort[0].
invoke(_time);
712 void OsTimeComponentBase ::
724 const U32 idBase = callComp->
getIdBase();
725 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
728 switch (opCode - idBase) {
744 void OsTimeComponentBase ::
754 compPtr->setEpoch_handlerBase(
761 void OsTimeComponentBase ::
770 compPtr->timeGetPort_handlerBase(
static constexpr FwIndexType getNum_setEpoch_InputPorts()
Serialization/Deserialization operation was successful.
void addCallPort(InputTimePort *callPort)
Register an input port.
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.
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.
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
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.
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) ...
void init()
Initialization function.
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.
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.
const char * toChar() const
Convert to a C-style char*.
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_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.
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.
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.
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
static constexpr FwIndexType getNum_CmdReg_OutputPorts()