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,
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;
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) {
PlatformIntType NATIVE_INT_TYPE
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
PlatformUIntType NATIVE_UINT_TYPE
PlatformAssertArgType FwAssertArgType
PlatformSizeType FwSizeType
PlatformIndexType FwIndexType
C++-compatible configuration header for fprime configuration.
@ VALIDATION_ERROR
Command failed validation.
@ OK
Command successfully executed.
Enabled and disabled states.
@ DISABLED
Disabled state.
void init()
Object initializer.
@ MSG_DISPATCH_EMPTY
No more messages in the queue.
@ MSG_DISPATCH_OK
Dispatch was normal.
Enabled and disabled state.
Auto-generated base for Health component.
bool isConnected_WdogStroke_OutputPort(FwIndexType portNum)
void log_FATAL_HLTH_PING_WRONG_KEY(const Fw::StringBase &entry, U32 badKey)
void WdogStroke_out(FwIndexType portNum, U32 code)
Invoke output port WdogStroke.
void tlmWrite_PingLateWarnings(U32 arg, Fw::Time _tlmTime=Fw::Time())
virtual MsgDispatchStatus doDispatch()
Called in the message loop to dispatch a message from the queue.
void log_ACTIVITY_HI_HLTH_CHECK_PING(Fw::Enabled enabled, const Fw::StringBase &entry)
void log_ACTIVITY_HI_HLTH_PING_UPDATED(const Fw::StringBase &entry, U32 warn, U32 fatal)
void log_WARNING_LO_HLTH_CHECK_LOOKUP_ERROR(const Fw::StringBase &entry)
void log_ACTIVITY_HI_HLTH_CHECK_ENABLE(Fw::Enabled enabled)
@ NUM_PINGSEND_OUTPUT_PORTS
void log_WARNING_HI_HLTH_PING_INVALID_VALUES(const Fw::StringBase &entry, U32 warn, U32 fatal)
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void PingSend_out(FwIndexType portNum, U32 key)
Invoke output port PingSend.
void log_WARNING_HI_HLTH_PING_WARN(const Fw::StringBase &entry)
void log_FATAL_HLTH_PING_LATE(const Fw::StringBase &entry)
virtual void doOtherChecks()
additional checks function
~HealthImpl()
Component destructor.
void setPingEntries(PingEntry *pingEntries, NATIVE_INT_TYPE numPingEntries, U32 watchDogCode)
Set ping entry tables.
HealthImpl(const char *const compName)
HealthImpl constructor.