F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
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 <Fw/Types/String.hpp>
18 
19 namespace Svc {
20 
31 
32 class HealthImpl final : public HealthComponentBase {
33  friend class HealthTester;
34 
35  public:
46  struct PingEntry {
50  };
51 
57  HealthImpl(const char* const compName);
58 
65  void init(const FwSizeType queueDepth, const FwEnumStoreType instance);
66 
74  void setPingEntries(PingEntry* pingEntries, FwIndexType numPingEntries, U32 watchDogCode);
75 
79  ~HealthImpl();
80 
81  protected:
85  virtual void doOtherChecks();
86 
87  private:
94  void PingReturn_handler(const FwIndexType portNum, U32 key);
95 
102  void Run_handler(const FwIndexType portNum, U32 context);
103 
111  void HLTH_ENABLE_cmdHandler(const FwOpcodeType opCode, U32 cmdSeq, Fw::Enabled enable);
112 
121  void HLTH_PING_ENABLE_cmdHandler(FwOpcodeType opCode,
122  U32 cmdSeq,
123  const Fw::CmdStringArg& entry,
124  Fw::Enabled enable);
125 
135  void HLTH_CHNG_PING_cmdHandler(const FwOpcodeType opCode,
136  U32 cmdSeq,
137  const Fw::CmdStringArg& entry,
138  U32 warningValue,
139  U32 fatalValue);
140 
144  struct PingTracker {
145  PingEntry entry;
146  U32 cycleCount;
147  U32 key;
148  Fw::Enabled::t enabled;
149  } m_pingTrackerEntries[NUM_PINGSEND_OUTPUT_PORTS];
150 
151  FwIndexType findEntry(const Fw::CmdStringArg& entry);
152 
154  FwIndexType m_numPingEntries;
155  U32 m_key;
156  U32 m_watchDogCode;
157  U32 m_warnings;
158  Fw::Enabled m_enabled;
159  FwSizeType queue_depth;
160 };
161 
162 } // end namespace Svc
163 
164 #endif
Auto-generated base for Health component.
FwIdType FwOpcodeType
The type of a command opcode.
PlatformSizeType FwSizeType
I32 FwEnumStoreType
FwSizeType fatalCycles
number of cycles before FATAL
struct for ping entry
void init()
Object initializer.
Definition: ObjBase.cpp:24
virtual void doOtherChecks()
additional checks function
~HealthImpl()
Component destructor.
void setPingEntries(PingEntry *pingEntries, FwIndexType numPingEntries, U32 watchDogCode)
Set ping entry tables.
Fw::String entryName
the name of the entry
Enabled and disabled states.
HealthImpl(const char *const compName)
HealthImpl constructor.
PlatformIndexType FwIndexType
FwSizeType warnCycles
number of cycles before WARNING
RateGroupDivider component implementation.
Health component implementation class.
T
The raw enum type.
friend class HealthTester