7 #ifndef Svc_TimeConverterComponentAc_HPP 8 #define Svc_TimeConverterComponentAc_HPP 21 #if !FW_DIRECT_PORT_CALLS 24 #if !FW_DIRECT_PORT_CALLS 122 #if !FW_DIRECT_PORT_CALLS 139 #if !FW_DIRECT_PORT_CALLS 163 #if !FW_DIRECT_PORT_CALLS 189 #if FW_ENABLE_TEXT_LOGGING == 1 192 void set_textEventOut_OutputPort(
207 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 218 Fw::InputSerializePort* port
224 Fw::InputSerializePort* port
230 Fw::InputSerializePort* port
233 #if FW_ENABLE_TEXT_LOGGING == 1 236 void set_textEventOut_OutputPort(
238 Fw::InputSerializePort* port
246 Fw::InputSerializePort* port
270 const char* compName =
"" 336 #if FW_ENABLE_TEXT_LOGGING == 1 341 static constexpr
FwIndexType getNum_textEventOut_OutputPorts() {
381 #if FW_ENABLE_TEXT_LOGGING == 1 386 bool isConnected_textEventOut_OutputPort(
399 #if FW_DIRECT_PORT_CALLS 438 #if FW_DIRECT_PORT_CALLS 714 static void m_p_cmdIn_in(
737 static void m_p_offsetUpdate_in(
756 void cmdResponseOut_out(
772 #if FW_ENABLE_TEXT_LOGGING 775 void textEventOut_out(
791 #if !FW_DIRECT_PORT_CALLS 804 #if !FW_DIRECT_PORT_CALLS 820 #if !FW_DIRECT_PORT_CALLS 837 #if FW_ENABLE_TEXT_LOGGING == 1 856 std::atomic<FwIndexType> m_NoConversionAvailableThrottle;
859 std::atomic<FwIndexType> m_InvalidTimeThrottle;
862 std::atomic<FwIndexType> m_OffsetTableFullThrottle;
865 std::atomic<FwIndexType> m_IdenticalTimeBasesThrottle;
868 std::atomic<FwIndexType> m_OffsetOutOfRangeThrottle;
871 std::atomic<FwIndexType> m_UnusableTimeBaseThrottle;
void log_WARNING_LO_InvalidTime_ThrottleClear()
Reset throttle value for InvalidTime.
Throttle reset count for UnusableTimeBase.
void log_WARNING_LO_InvalidTime(const TimeBase &in_tb, const TimeBase &out_tb, I64 offset_us, I64 in_time_us)
No offset is stored for the requested pair of time bases.
void log_ACTIVITY_HI_OffsetReport(const TimeBase &from, const TimeBase &to, I64 offset_us) const
FwIdType FwOpcodeType
The type of a command opcode.
virtual Svc::ConvertTimeStatus convertTime_handler(FwIndexType portNum, const Fw::Time &in_time, Fw::Time &out_time)=0
Handler for input port convertTime.
Discard every stored offset.
void log_WARNING_LO_IdenticalTimeBases_ThrottleClear()
Reset throttle value for IdenticalTimeBases.
Every stored offset was discarded.
The offset table holds no entries.
static constexpr FwIndexType getNum_offsetUpdate_InputPorts()
A time base that denotes no clock was supplied as an end of a pair.
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
Throttle reset count for InvalidTime.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
Auto-generated base for TimeConverter component.
virtual void offsetUpdate_handler(FwIndexType portNum, const Svc::TimeOffset &offset)=0
Handler for input port offsetUpdate.
friend class TimeConverterTesterBase
Friend class tester to support autocoded test harness.
TimeConverterComponentBase(const char *compName="")
Construct TimeConverterComponentBase object.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
void log_WARNING_HI_OffsetTableFull(const TimeBase &from, const TimeBase &to, U32 capacity)
static constexpr FwIndexType getNum_eventOut_OutputPorts()
Svc::InputTimeOffsetSendPort * get_offsetUpdate_InputPort(FwIndexType portNum)
void CLEAR_OFFSETS_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
bool isConnected_eventOut_OutputPort(FwIndexType portNum) const
Enum representing a command response.
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
void log_WARNING_HI_OffsetTableFull_ThrottleClear()
Reset throttle value for OffsetTableFull.
An offset was stored for a pair of time bases by command.
Svc::ConvertTimeStatus convertTime_handlerBase(FwIndexType portNum, const Fw::Time &in_time, Fw::Time &out_time)
Handler base-class function for input port convertTime.
Report of a stored offset.
An offset was supplied for a single time base rather than a pair.
virtual void CLEAR_OFFSETS_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
virtual void unLock()
Unlock the guarded mutex.
void init()
Object initializer.
friend class TimeConverterTester
Friend class tester implementation to support white-box testing.
Throttle reset count for IdenticalTimeBases.
virtual void DUMP_OFFSETS_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
FwIdType FwEventIdType
The type of an event identifier.
void log_WARNING_LO_NoConversionAvailable(const TimeBase &in_tb, const TimeBase &out_tb)
Conversion result is not representable as an Fw::Time.
virtual void SET_OFFSET_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const TimeBase &from, const TimeBase &to, I64 offset_us)=0
Report every stored offset as events.
void log_WARNING_HI_UnusableTimeBase_ThrottleClear()
Reset throttle value for UnusableTimeBase.
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_convertTime_InputPorts()
void log_WARNING_HI_UnusableTimeBase(const TimeBase &tb)
An offset could not be stored because the offset table is full.
Throttle reset count for OffsetTableFull.
Throttle reset count for OffsetOutOfRange.
void log_ACTIVITY_HI_OffsetTableEmpty() const
Report the offset stored for a pair of time bases as an event.
void log_WARNING_HI_OffsetOutOfRange(const TimeBase &from, const TimeBase &to, I64 offset_us)
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
void DUMP_OFFSETS_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Enum representing event severity.
void GET_OFFSET_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Result of a time base conversion.
No offset is stored for the requested pair of time bases.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const
virtual void lock()
Lock the guarded mutex.
void regCommands()
Register commands with the Command Dispatcher.
void offsetUpdate_handlerBase(FwIndexType portNum, const Svc::TimeOffset &offset)
Handler base-class function for input port offsetUpdate.
void log_ACTIVITY_HI_OffsetsCleared(U32 entries) const
void log_ACTIVITY_HI_OffsetSet(const TimeBase &from, const TimeBase &to, I64 offset_us) const
void SET_OFFSET_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual ~TimeConverterComponentBase()
Destroy TimeConverterComponentBase object.
static constexpr FwIndexType getNum_cmdIn_InputPorts()
void log_WARNING_LO_NoConversionAvailable_ThrottleClear()
Reset throttle value for NoConversionAvailable.
Svc::InputConvertTimePort * get_convertTime_InputPort(FwIndexType portNum)
PlatformIndexType FwIndexType
RateGroupDivider component implementation.
An offset was rejected because no time can be shifted that far.
void log_WARNING_LO_IdenticalTimeBases(const TimeBase &tb)
void log_WARNING_HI_OffsetOutOfRange_ThrottleClear()
Reset throttle value for OffsetOutOfRange.
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
virtual void GET_OFFSET_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const TimeBase &from, const TimeBase &to)=0
Set the offset between a pair of time bases.
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
Define enumeration for Time base types.
Throttle reset count for NoConversionAvailable.
void log_WARNING_LO_NoOffsetStored(const TimeBase &from, const TimeBase &to) const