![]() |
F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
|
Health component implementation class. More...
#include <Svc/Health/HealthComponentImpl.hpp>
Classes | |
| struct | PingEntry |
| struct for ping entry More... | |
Public Member Functions | |
| HealthImpl (const char *const compName) | |
| HealthImpl constructor. More... | |
| void | init (const FwSizeType queueDepth, const FwEnumStoreType instance) |
| HealthImpl initialization function. More... | |
| void | setPingEntries (PingEntry *pingEntries, FwIndexType numPingEntries, U32 watchDogCode) |
| Set ping entry tables. More... | |
| ~HealthImpl () | |
| Component destructor. More... | |
Public Member Functions inherited from Svc::HealthComponentBase | |
| void | init (FwSizeType queueDepth, FwEnumStoreType instance=0) |
| Initialize HealthComponentBase object. More... | |
| Fw::InputCmdPort * | get_CmdDisp_InputPort (FwIndexType portNum) |
| Svc::InputPingPort * | get_PingReturn_InputPort (FwIndexType portNum) |
| Svc::InputSchedPort * | get_Run_InputPort (FwIndexType portNum) |
| void | set_CmdReg_OutputPort (FwIndexType portNum, Fw::InputCmdRegPort *port) |
| Connect port to CmdReg[portNum]. More... | |
| void | set_CmdStatus_OutputPort (FwIndexType portNum, Fw::InputCmdResponsePort *port) |
| Connect port to CmdStatus[portNum]. More... | |
| void | set_Log_OutputPort (FwIndexType portNum, Fw::InputLogPort *port) |
| Connect port to Log[portNum]. More... | |
| void | set_Time_OutputPort (FwIndexType portNum, Fw::InputTimePort *port) |
| Connect port to Time[portNum]. More... | |
| void | set_Tlm_OutputPort (FwIndexType portNum, Fw::InputTlmPort *port) |
| Connect port to Tlm[portNum]. More... | |
| void | set_PingSend_OutputPort (FwIndexType portNum, Svc::InputPingPort *port) |
| Connect port to PingSend[portNum]. More... | |
| void | set_WdogStroke_OutputPort (FwIndexType portNum, Svc::InputWatchDogPort *port) |
| Connect port to WdogStroke[portNum]. More... | |
| void | regCommands () |
| Register commands with the Command Dispatcher. More... | |
Public Member Functions inherited from Fw::QueuedComponentBase | |
| void | deinit () override |
| Allows de-initialization on teardown. More... | |
Public Member Functions inherited from Fw::PassiveComponentBase | |
| void | setIdBase (const FwIdType) |
| Set the ID base. More... | |
| FwIdType | getIdBase () const |
Friends | |
| class | HealthTester |
Additional Inherited Members | |
Public Types inherited from Fw::QueuedComponentBase | |
| enum | MsgDispatchStatus { MSG_DISPATCH_OK, MSG_DISPATCH_EMPTY, MSG_DISPATCH_ERROR, MSG_DISPATCH_EXIT } |
Protected Types inherited from Svc::HealthComponentBase | |
| enum | { NUM_CMDDISP_INPUT_PORTS = 1 } |
| Enumerations for numbers of special input ports. More... | |
| enum | { NUM_PINGRETURN_INPUT_PORTS = 25, NUM_RUN_INPUT_PORTS = 1 } |
| Enumerations for numbers of typed input ports. More... | |
| enum | { NUM_CMDREG_OUTPUT_PORTS = 1, NUM_CMDSTATUS_OUTPUT_PORTS = 1, NUM_LOG_OUTPUT_PORTS = 1, NUM_LOGTEXT_OUTPUT_PORTS = 1, NUM_TIME_OUTPUT_PORTS = 1, NUM_TLM_OUTPUT_PORTS = 1 } |
| Enumerations for numbers of special output ports. More... | |
| enum | { NUM_PINGSEND_OUTPUT_PORTS = 25, NUM_WDOGSTROKE_OUTPUT_PORTS = 1 } |
| Enumerations for numbers of typed output ports. More... | |
| enum | { OPCODE_HLTH_ENABLE = 0x0, OPCODE_HLTH_PING_ENABLE = 0x1, OPCODE_HLTH_CHNG_PING = 0x2 } |
| Command opcodes. More... | |
| enum | { EVENTID_HLTH_PING_WARN = 0x0, EVENTID_HLTH_PING_LATE = 0x1, EVENTID_HLTH_PING_WRONG_KEY = 0x2, EVENTID_HLTH_CHECK_ENABLE = 0x3, EVENTID_HLTH_CHECK_PING = 0x4, EVENTID_HLTH_CHECK_LOOKUP_ERROR = 0x5, EVENTID_HLTH_PING_UPDATED = 0x6, EVENTID_HLTH_PING_INVALID_VALUES = 0x7 } |
| Event IDs. More... | |
| enum | { CHANNELID_PINGLATEWARNINGS = 0x0 } |
| Channel IDs. More... | |
Protected Member Functions inherited from Svc::HealthComponentBase | |
| HealthComponentBase (const char *compName="") | |
| Construct HealthComponentBase object. More... | |
| virtual | ~HealthComponentBase () |
| Destroy HealthComponentBase object. More... | |
| bool | isConnected_CmdReg_OutputPort (FwIndexType portNum) |
| bool | isConnected_CmdStatus_OutputPort (FwIndexType portNum) |
| bool | isConnected_Log_OutputPort (FwIndexType portNum) |
| bool | isConnected_Time_OutputPort (FwIndexType portNum) |
| bool | isConnected_Tlm_OutputPort (FwIndexType portNum) |
| bool | isConnected_PingSend_OutputPort (FwIndexType portNum) |
| bool | isConnected_WdogStroke_OutputPort (FwIndexType portNum) |
| void | PingReturn_handlerBase (FwIndexType portNum, U32 key) |
| Handler base-class function for input port PingReturn. More... | |
| void | Run_handlerBase (FwIndexType portNum, U32 context) |
| Handler base-class function for input port Run. More... | |
| virtual void | PingReturn_preMsgHook (FwIndexType portNum, U32 key) |
| Pre-message hook for async input port PingReturn. More... | |
| void | PingSend_out (FwIndexType portNum, U32 key) |
| Invoke output port PingSend. More... | |
| void | WdogStroke_out (FwIndexType portNum, U32 code) |
| Invoke output port WdogStroke. More... | |
| void | cmdResponse_out (FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response) |
| Emit command response. More... | |
| void | HLTH_ENABLE_cmdHandlerBase (FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args) |
| void | HLTH_PING_ENABLE_cmdHandlerBase (FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args) |
| void | HLTH_CHNG_PING_cmdHandlerBase (FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args) |
| virtual void | HLTH_ENABLE_preMsgHook (FwOpcodeType opCode, U32 cmdSeq) |
| Pre-message hook for command HLTH_ENABLE. More... | |
| virtual void | HLTH_PING_ENABLE_preMsgHook (FwOpcodeType opCode, U32 cmdSeq) |
| Pre-message hook for command HLTH_PING_ENABLE. More... | |
| virtual void | HLTH_CHNG_PING_preMsgHook (FwOpcodeType opCode, U32 cmdSeq) |
| Pre-message hook for command HLTH_CHNG_PING. More... | |
| void | log_WARNING_HI_HLTH_PING_WARN (const Fw::StringBase &entry) const |
| void | log_FATAL_HLTH_PING_LATE (const Fw::StringBase &entry) const |
| void | log_FATAL_HLTH_PING_WRONG_KEY (const Fw::StringBase &entry, U32 badKey) const |
| void | log_ACTIVITY_HI_HLTH_CHECK_ENABLE (Fw::Enabled enabled) const |
| void | log_ACTIVITY_HI_HLTH_CHECK_PING (Fw::Enabled enabled, const Fw::StringBase &entry) const |
| void | log_WARNING_LO_HLTH_CHECK_LOOKUP_ERROR (const Fw::StringBase &entry) const |
| void | log_ACTIVITY_HI_HLTH_PING_UPDATED (const Fw::StringBase &entry, U32 warn, U32 fatal) const |
| void | log_WARNING_HI_HLTH_PING_INVALID_VALUES (const Fw::StringBase &entry, U32 warn, U32 fatal) const |
| void | tlmWrite_PingLateWarnings (U32 arg, Fw::Time _tlmTime=Fw::Time()) const |
| Fw::Time | getTime () const |
| virtual MsgDispatchStatus | doDispatch () |
| Called in the message loop to dispatch a message from the queue. More... | |
| MsgDispatchStatus | dispatchCurrentMessages () |
| Dispatch all current messages unless ERROR or EXIT occurs. More... | |
Protected Member Functions inherited from Fw::QueuedComponentBase | |
| QueuedComponentBase (const char *name) | |
| Constructor. More... | |
| virtual | ~QueuedComponentBase () |
| Destructor. More... | |
| void | init (FwEnumStoreType instance) |
| initialization function More... | |
| Os::Queue::Status | createQueue (FwSizeType depth, FwSizeType msgSize) |
| MsgDispatchStatus | dispatchAvailableMessages () |
| dispatches all messages currently in the queue, returning status of the dispatch More... | |
| FwSizeType | getNumMsgsDropped () |
| return number of messages dropped More... | |
| void | incNumMsgDropped () |
| increment the number of messages dropped More... | |
Protected Member Functions inherited from Fw::PassiveComponentBase | |
| PassiveComponentBase (const char *name) | |
| Named constructor. More... | |
| virtual | ~PassiveComponentBase () |
| Destructor. More... | |
| void | init (FwEnumStoreType instance) |
| Initialization function. More... | |
| FwEnumStoreType | getInstance () const |
Protected Member Functions inherited from Fw::ObjBase | |
| ObjBase (const char *name) | |
| ObjBase constructor. More... | |
| virtual | ~ObjBase () |
| Destructor. More... | |
| void | init () |
| Object initializer. More... | |
Static Protected Member Functions inherited from Svc::HealthComponentBase | |
| static constexpr FwIndexType | getNum_CmdDisp_InputPorts () |
| static constexpr FwIndexType | getNum_PingReturn_InputPorts () |
| static constexpr FwIndexType | getNum_Run_InputPorts () |
| static constexpr FwIndexType | getNum_CmdReg_OutputPorts () |
| static constexpr FwIndexType | getNum_CmdStatus_OutputPorts () |
| static constexpr FwIndexType | getNum_Log_OutputPorts () |
| static constexpr FwIndexType | getNum_Time_OutputPorts () |
| static constexpr FwIndexType | getNum_Tlm_OutputPorts () |
| static constexpr FwIndexType | getNum_PingSend_OutputPorts () |
| static constexpr FwIndexType | getNum_WdogStroke_OutputPorts () |
Protected Attributes inherited from Fw::QueuedComponentBase | |
| Os::Queue | m_queue |
| queue object for active component More... | |
Health component implementation class.
The health component iterates through each entry in its table and checks its status. If a ping entry tracker is enabled, it will ping its corresponding port with a provided key. If a ping return is outstanding, a counter is decremented, and its value is checked against warning and fault thresholds. A watchdog is always stroked in the run handler.
Definition at line 32 of file HealthComponentImpl.hpp.
| Svc::HealthImpl::HealthImpl | ( | const char *const | compName | ) |
HealthImpl constructor.
The constructor for Health
| compName | component name |
Definition at line 23 of file HealthComponentImpl.cpp.
| Svc::HealthImpl::~HealthImpl | ( | ) |
Component destructor.
The destructor for HealthImpl is empty
Definition at line 66 of file HealthComponentImpl.cpp.
| void Svc::HealthImpl::init | ( | const FwSizeType | queueDepth, |
| const FwEnumStoreType | instance | ||
| ) |
HealthImpl initialization function.
Initializes the autocoded base class, ping table, and data members
| queueDepth | Depth of queue |
| instance | The instance number |
Definition at line 41 of file HealthComponentImpl.cpp.
| void Svc::HealthImpl::setPingEntries | ( | PingEntry * | pingEntries, |
| FwIndexType | numPingEntries, | ||
| U32 | watchDogCode | ||
| ) |
Set ping entry tables.
Provides a table of ping entries
| pingEntries | Pointer to provided ping table entries |
| numPingEntries | Number of ping entries in table |
| watchDogCode | Value that is sent to watchdog |
Definition at line 46 of file HealthComponentImpl.cpp.
|
friend |
Definition at line 33 of file HealthComponentImpl.hpp.