F´ Flight Software - C/C++ Documentation NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
HealthComponentImpl.hpp
Go to the documentation of this file.
1// ======================================================================
2// \title Health.hpp
3// \author Tim, J.Perez
4// \brief hpp file for Health component implementation class
5//
6// \copyright
7// Copyright 2009-2015, by the California Institute of Technology.
8// ALL RIGHTS RESERVED. United States Government Sponsorship
9// acknowledged.
10//
11// ======================================================================
12
13#ifndef Health_HPP
14#define Health_HPP
15
16#include <Svc/Health/HealthComponentAc.hpp>
17#include <Fw/Types/String.hpp>
18
19namespace Svc {
20
31
32 class HealthImpl: public HealthComponentBase {
33
34 public:
45 struct PingEntry {
49 };
50
56 HealthImpl(const char * const compName);
57
64 void init(const NATIVE_INT_TYPE queueDepth, const NATIVE_INT_TYPE instance);
65
73 void setPingEntries(PingEntry* pingEntries, NATIVE_INT_TYPE numPingEntries, U32 watchDogCode);
74
79
80 PROTECTED:
81
85 virtual void doOtherChecks();
86
87 PRIVATE:
88
95 void PingReturn_handler(const NATIVE_INT_TYPE portNum, U32 key);
96
103 void Run_handler(const NATIVE_INT_TYPE portNum, NATIVE_UINT_TYPE context);
104
112 void HLTH_ENABLE_cmdHandler(const FwOpcodeType opCode, U32 cmdSeq, Fw::Enabled enable);
113
122 void HLTH_PING_ENABLE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg& entry, Fw::Enabled enable);
123
133 void HLTH_CHNG_PING_cmdHandler(const FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg& entry, U32 warningValue, U32 fatalValue);
134
138 struct PingTracker {
139 PingEntry entry;
140 U32 cycleCount;
141 U32 key;
142 Fw::Enabled::t enabled;
143 } m_pingTrackerEntries[NUM_PINGSEND_OUTPUT_PORTS];
144
145 NATIVE_INT_TYPE findEntry(const Fw::CmdStringArg& entry);
146
148 U32 m_numPingEntries;
149 U32 m_key;
150 U32 m_watchDogCode;
151 U32 m_warnings;
152 Fw::Enabled m_enabled;
153 U32 queue_depth;
154
155 };
156
157} // end namespace Svc
158
159#endif
PlatformIntType NATIVE_INT_TYPE
Definition BasicTypes.h:51
PlatformUIntType NATIVE_UINT_TYPE
Definition BasicTypes.h:52
U32 FwOpcodeType
Definition FpConfig.h:56
Health component implementation class.
virtual void doOtherChecks()
additional checks function
void init(const NATIVE_INT_TYPE queueDepth, const NATIVE_INT_TYPE instance)
HealthImpl initialization function.
~HealthImpl()
Component destructor.
void setPingEntries(PingEntry *pingEntries, NATIVE_INT_TYPE numPingEntries, U32 watchDogCode)
Set ping entry tables.
struct for ping entry
Fw::String entryName
the name of the entry
NATIVE_UINT_TYPE warnCycles
number of cycles before WARNING
NATIVE_UINT_TYPE fatalCycles
number of cycles before FATAL