41 this->queue_depth = queueDepth;
51 this->m_numPingEntries =
static_cast<U32
>(numPingEntries);
52 this->m_watchDogCode = watchDogCode;
57 pingEntries[entry].warnCycles <= pingEntries[entry].fatalCycles,
58 static_cast<FwAssertArgType>(pingEntries[entry].warnCycles),
59 static_cast<FwAssertArgType>(pingEntries[entry].fatalCycles));
60 this->m_pingTrackerEntries[entry].entry = pingEntries[entry];
61 this->m_pingTrackerEntries[entry].cycleCount = 0;
63 this->m_pingTrackerEntries[entry].key = 0;
75 void HealthImpl::PingReturn_handler(
const NATIVE_INT_TYPE portNum, U32 key) {
77 if (key != this->m_pingTrackerEntries[portNum].key) {
82 this->m_pingTrackerEntries[portNum].cycleCount = 0;
83 this->m_pingTrackerEntries[portNum].key = 0;
88 void HealthImpl::Run_handler(
const NATIVE_INT_TYPE portNum, U32 context) {
106 if (0 == this->m_pingTrackerEntries[entry].cycleCount) {
108 this->m_pingTrackerEntries[entry].key = this->m_key;
110 this->
PingSend_out(static_cast<FwIndexType>(entry), this->m_pingTrackerEntries[entry].key);
114 this->m_pingTrackerEntries[entry].cycleCount++;
117 if (this->m_pingTrackerEntries[entry].cycleCount ==
118 this->m_pingTrackerEntries[entry].entry.warnCycles) {
124 if (this->m_pingTrackerEntries[entry].entry.fatalCycles ==
125 this->m_pingTrackerEntries[entry].cycleCount) {
131 this->m_pingTrackerEntries[entry].cycleCount++;
152 this->m_enabled = enable;
166 if (-1 == entryIndex) {
171 this->m_pingTrackerEntries[entryIndex].enabled = enable.
e;
182 void HealthImpl::HLTH_CHNG_PING_cmdHandler(
const FwOpcodeType opCode, U32 cmdSeq,
const Fw::CmdStringArg& entry, U32 warningValue, U32 fatalValue) {
185 if (-1 == entryIndex) {
191 if (warningValue > fatalValue) {
199 this->m_pingTrackerEntries[entryIndex].entry.warnCycles = warningValue;
200 this->m_pingTrackerEntries[entryIndex].entry.fatalCycles = fatalValue;
210 if (entry == this->m_pingTrackerEntries[tableEntry].entry.entryName) {
PlatformUIntType NATIVE_UINT_TYPE
Auto-generated base for Health component.
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void tlmWrite_PingLateWarnings(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void log_FATAL_HLTH_PING_WRONG_KEY(const Fw::StringBase &entry, U32 badKey) const
virtual MsgDispatchStatus doDispatch()
Called in the message loop to dispatch a message from the queue.
PlatformIntType NATIVE_INT_TYPE
void log_WARNING_LO_HLTH_CHECK_LOOKUP_ERROR(const Fw::StringBase &entry) const
PlatformSizeType FwSizeType
void log_WARNING_HI_HLTH_PING_INVALID_VALUES(const Fw::StringBase &entry, U32 warn, U32 fatal) const
void init()
Object initializer.
virtual void doOtherChecks()
additional checks function
~HealthImpl()
Component destructor.
void log_ACTIVITY_HI_HLTH_CHECK_PING(Fw::Enabled enabled, const Fw::StringBase &entry) const
void WdogStroke_out(FwIndexType portNum, U32 code)
Invoke output port WdogStroke.
Enabled and disabled states.
Command successfully executed.
bool isConnected_WdogStroke_OutputPort(FwIndexType portNum)
C++-compatible configuration header for fprime configuration.
HealthImpl(const char *const compName)
HealthImpl constructor.
void setPingEntries(PingEntry *pingEntries, NATIVE_INT_TYPE numPingEntries, U32 watchDogCode)
Set ping entry tables.
void log_FATAL_HLTH_PING_LATE(const Fw::StringBase &entry) const
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
Command failed validation.
Enabled and disabled state.
void log_ACTIVITY_HI_HLTH_CHECK_ENABLE(Fw::Enabled enabled) const
No more messages in the queue.
void log_WARNING_HI_HLTH_PING_WARN(const Fw::StringBase &entry) const
void PingSend_out(FwIndexType portNum, U32 key)
Invoke output port PingSend.
void log_ACTIVITY_HI_HLTH_PING_UPDATED(const Fw::StringBase &entry, U32 warn, U32 fatal) const