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 
17 #include <Fw/Types/String.hpp>
18 
19 namespace Svc {
20 
31 
32  class HealthImpl final : public HealthComponentBase {
33 
34  friend class HealthTester;
35 
36  public:
47  struct PingEntry {
51  };
52 
58  HealthImpl(const char * const compName);
59 
66  void init(const FwSizeType queueDepth, const FwEnumStoreType instance);
67 
75  void setPingEntries(PingEntry* pingEntries, FwIndexType numPingEntries, U32 watchDogCode);
76 
80  ~HealthImpl();
81 
82  protected:
83 
87  virtual void doOtherChecks();
88 
89  private:
90 
97  void PingReturn_handler(const FwIndexType portNum, U32 key);
98 
105  void Run_handler(const FwIndexType portNum, U32 context);
106 
114  void HLTH_ENABLE_cmdHandler(const FwOpcodeType opCode, U32 cmdSeq, Fw::Enabled enable);
115 
124  void HLTH_PING_ENABLE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg& entry, Fw::Enabled enable);
125 
135  void HLTH_CHNG_PING_cmdHandler(const FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg& entry, U32 warningValue, U32 fatalValue);
136 
140  struct PingTracker {
141  PingEntry entry;
142  U32 cycleCount;
143  U32 key;
144  Fw::Enabled::t enabled;
145  } m_pingTrackerEntries[NUM_PINGSEND_OUTPUT_PORTS];
146 
147  FwIndexType findEntry(const Fw::CmdStringArg& entry);
148 
150  FwIndexType m_numPingEntries;
151  U32 m_key;
152  U32 m_watchDogCode;
153  U32 m_warnings;
154  Fw::Enabled m_enabled;
155  FwSizeType queue_depth;
156 
157  };
158 
159 } // end namespace Svc
160 
161 #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:26
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