9 #if FW_ENABLE_TEXT_LOGGING 26 #if !FW_DIRECT_PORT_CALLS 33 this->m_CmdDisp_InputPort[port].
init();
38 this->m_CmdDisp_InputPort[port].
setPortNum(port);
40 #if FW_OBJECT_NAMES == 1 44 this->m_objName.toChar(),
47 this->m_CmdDisp_InputPort[port].setObjName(portName.
toChar());
52 #if !FW_DIRECT_PORT_CALLS 59 this->m_setEpoch_InputPort[port].
init();
64 this->m_setEpoch_InputPort[port].
setPortNum(port);
66 #if FW_OBJECT_NAMES == 1 70 this->m_objName.toChar(),
73 this->m_setEpoch_InputPort[port].setObjName(portName.
toChar());
78 #if !FW_DIRECT_PORT_CALLS 85 this->m_timeGetPort_InputPort[port].
init();
90 this->m_timeGetPort_InputPort[port].
setPortNum(port);
92 #if FW_OBJECT_NAMES == 1 96 this->m_objName.toChar(),
99 this->m_timeGetPort_InputPort[port].setObjName(portName.
toChar());
104 #if !FW_DIRECT_PORT_CALLS 111 this->m_CmdReg_OutputPort[port].
init();
113 #if FW_OBJECT_NAMES == 1 117 this->m_objName.toChar(),
120 this->m_CmdReg_OutputPort[port].setObjName(portName.
toChar());
125 #if !FW_DIRECT_PORT_CALLS 132 this->m_CmdStatus_OutputPort[port].
init();
134 #if FW_OBJECT_NAMES == 1 138 this->m_objName.toChar(),
141 this->m_CmdStatus_OutputPort[port].setObjName(portName.
toChar());
146 #if !FW_DIRECT_PORT_CALLS 153 this->m_EventOut_OutputPort[port].
init();
155 #if FW_OBJECT_NAMES == 1 159 this->m_objName.toChar(),
162 this->m_EventOut_OutputPort[port].setObjName(portName.
toChar());
167 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING 171 port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
174 this->m_LogText_OutputPort[port].
init();
176 #if FW_OBJECT_NAMES == 1 180 this->m_objName.toChar(),
183 this->m_LogText_OutputPort[port].setObjName(portName.
toChar());
188 #if !FW_DIRECT_PORT_CALLS 195 this->m_timeCaller_OutputPort[port].
init();
197 #if FW_OBJECT_NAMES == 1 201 this->m_objName.toChar(),
204 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
210 #if !FW_DIRECT_PORT_CALLS 221 static_cast<FwAssertArgType>(portNum)
224 return &this->m_CmdDisp_InputPort[portNum];
229 #if !FW_DIRECT_PORT_CALLS 240 static_cast<FwAssertArgType>(portNum)
243 return &this->m_setEpoch_InputPort[portNum];
251 static_cast<FwAssertArgType>(portNum)
254 return &this->m_timeGetPort_InputPort[portNum];
259 #if !FW_DIRECT_PORT_CALLS 273 static_cast<FwAssertArgType>(portNum)
276 this->m_CmdReg_OutputPort[portNum].
addCallPort(port);
287 static_cast<FwAssertArgType>(portNum)
290 this->m_CmdStatus_OutputPort[portNum].
addCallPort(port);
301 static_cast<FwAssertArgType>(portNum)
304 this->m_EventOut_OutputPort[portNum].
addCallPort(port);
307 #if FW_ENABLE_TEXT_LOGGING == 1 309 void OsTimeComponentBase ::
310 set_LogText_OutputPort(
316 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
317 static_cast<FwAssertArgType>(portNum)
320 this->m_LogText_OutputPort[portNum].addCallPort(port);
333 static_cast<FwAssertArgType>(portNum)
336 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
341 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 350 Fw::InputSerializePort* port
355 static_cast<FwAssertArgType>(portNum)
358 this->m_CmdReg_OutputPort[portNum].registerSerialPort(port);
364 Fw::InputSerializePort* port
369 static_cast<FwAssertArgType>(portNum)
372 this->m_CmdStatus_OutputPort[portNum].registerSerialPort(port);
378 Fw::InputSerializePort* port
383 static_cast<FwAssertArgType>(portNum)
386 this->m_EventOut_OutputPort[portNum].registerSerialPort(port);
389 #if FW_ENABLE_TEXT_LOGGING == 1 391 void OsTimeComponentBase ::
392 set_LogText_OutputPort(
394 Fw::InputSerializePort* port
398 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
399 static_cast<FwAssertArgType>(portNum)
402 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
410 Fw::InputSerializePort* port
415 static_cast<FwAssertArgType>(portNum)
418 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
444 Fw::PassiveComponentBase(compName)
455 #if !FW_DIRECT_PORT_CALLS 466 static_cast<FwAssertArgType>(portNum)
469 return this->m_CmdReg_OutputPort[portNum].
isConnected();
477 static_cast<FwAssertArgType>(portNum)
480 return this->m_CmdStatus_OutputPort[portNum].
isConnected();
488 static_cast<FwAssertArgType>(portNum)
491 return this->m_EventOut_OutputPort[portNum].
isConnected();
494 #if FW_ENABLE_TEXT_LOGGING == 1 496 bool OsTimeComponentBase ::
497 isConnected_LogText_OutputPort(
FwIndexType portNum)
const 500 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
501 static_cast<FwAssertArgType>(portNum)
504 return this->m_LogText_OutputPort[portNum].isConnected();
514 static_cast<FwAssertArgType>(portNum)
517 return this->m_timeCaller_OutputPort[portNum].
isConnected();
538 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
541 switch (opCode - idBase) {
572 static_cast<FwAssertArgType>(portNum)
592 static_cast<FwAssertArgType>(portNum)
614 this->CmdStatus_out(0, opCode, cmdSeq, response);
650 #if FW_CMD_CHECK_RESIDUAL 682 this->timeCaller_out(0, _logTime);
692 #if FW_AMPCS_COMPATIBLE 697 static_cast<FwAssertArgType>(_status)
701 #if FW_AMPCS_COMPATIBLE 704 static_cast<U8>(
sizeof(U32))
708 static_cast<FwAssertArgType>(_status)
714 static_cast<FwAssertArgType>(_status)
727 #if FW_ENABLE_TEXT_LOGGING 728 if (this->isConnected_LogText_OutputPort(0)) {
729 #if FW_OBJECT_NAMES == 1 730 const char* _formatString =
731 "(%s) %s: Could not set current time due to RawTime error status %" PRIu32
"";
733 const char* _formatString =
734 "%s: Could not set current time due to RawTime error status %" PRIu32
"";
741 this->m_objName.toChar(),
743 "SetCurrentTimeError ",
767 this->timeCaller_out(0, _time);
779 void OsTimeComponentBase ::
802 void OsTimeComponentBase ::
812 compPtr->setEpoch_handlerBase(
819 void OsTimeComponentBase ::
828 compPtr->timeGetPort_handlerBase(
834 #if !FW_DIRECT_PORT_CALLS 840 void OsTimeComponentBase ::
848 static_cast<FwAssertArgType>(portNum)
852 this->m_CmdReg_OutputPort[portNum].isConnected(),
853 static_cast<FwAssertArgType>(portNum)
855 this->m_CmdReg_OutputPort[portNum].
invoke(
860 void OsTimeComponentBase ::
870 static_cast<FwAssertArgType>(portNum)
874 this->m_CmdStatus_OutputPort[portNum].isConnected(),
875 static_cast<FwAssertArgType>(portNum)
877 this->m_CmdStatus_OutputPort[portNum].
invoke(
884 void OsTimeComponentBase ::
895 static_cast<FwAssertArgType>(portNum)
899 this->m_EventOut_OutputPort[portNum].isConnected(),
900 static_cast<FwAssertArgType>(portNum)
902 this->m_EventOut_OutputPort[portNum].
invoke(
910 #if FW_ENABLE_TEXT_LOGGING 912 void OsTimeComponentBase ::
922 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
923 static_cast<FwAssertArgType>(portNum)
927 this->m_LogText_OutputPort[portNum].isConnected(),
928 static_cast<FwAssertArgType>(portNum)
930 this->m_LogText_OutputPort[portNum].invoke(
940 void OsTimeComponentBase ::
948 static_cast<FwAssertArgType>(portNum)
952 this->m_timeCaller_OutputPort[portNum].isConnected(),
953 static_cast<FwAssertArgType>(portNum)
955 this->m_timeCaller_OutputPort[portNum].
invoke(
static constexpr FwIndexType getNum_setEpoch_InputPorts()
Serialization/Deserialization operation was successful.
bool isConnected_CmdReg_OutputPort(FwIndexType portNum) const
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()
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.
void set_CmdStatus_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to CmdStatus[portNum].
SerializeStatus deserializeTo(U8 &val, Endianness mode=Endianness::BIG) override
Deserialize an 8-bit unsigned integer value.
Fw::InputCmdPort * get_CmdDisp_InputPort(FwIndexType portNum)
void log_WARNING_HI_SetCurrentTimeError(U32 status) const
void CmdDisp_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port CmdDisp.
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].
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
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.
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 connection.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
void init()
Initialization function.
An error occurred while attempting to set the current time.
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 connection.
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 invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke a port connection.
void resetDeser() override
Reset deserialization pointer to beginning of buffer.
A serious but recoverable event.
const char * toChar() const
Convert to a C-style char*.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
Enum representing event severity.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
bool isConnected_EventOut_OutputPort(FwIndexType portNum) const
void timeGetPort_handlerBase(FwIndexType portNum, Fw::Time &time)
Handler base-class function for input port timeGetPort.
Command failed to deserialize.
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port connection.
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.
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.
bool isConnected_CmdStatus_OutputPort(FwIndexType portNum) const
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
static constexpr FwIndexType getNum_CmdReg_OutputPorts()