F´ Flight Software - C/C++ Documentation  devel
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 
33 
34  public:
45  struct PingEntry {
49  };
50 
56  HealthImpl(const char * const compName);
57 
64  void init(const FwSizeType queueDepth, const NATIVE_INT_TYPE instance);
65 
73  void setPingEntries(PingEntry* pingEntries, NATIVE_INT_TYPE numPingEntries, U32 watchDogCode);
74 
78  ~HealthImpl();
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, U32 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  FwSizeType queue_depth;
154 
155  };
156 
157 } // end namespace Svc
158 
159 #endif
PlatformIntType NATIVE_INT_TYPE
Definition: BasicTypes.h:55
PlatformUIntType NATIVE_UINT_TYPE
Definition: BasicTypes.h:56
U32 FwOpcodeType
Definition: FpConfig.h:91
PlatformSizeType FwSizeType
Definition: FpConfig.h:35
Enabled and disabled states.
T
The raw enum type.
void init()
Object initializer.
Definition: ObjBase.cpp:27
Auto-generated base for Health component.
Health component implementation class.
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.
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