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  private:
88  void PingReturn_handler(const FwIndexType portNum, U32 key);
89 
96  void Run_handler(const FwIndexType portNum, U32 context);
97 
105  void HLTH_ENABLE_cmdHandler(const FwOpcodeType opCode, U32 cmdSeq, Fw::Enabled enable);
106 
115  void HLTH_PING_ENABLE_cmdHandler(FwOpcodeType opCode,
116  U32 cmdSeq,
117  const Fw::CmdStringArg& entry,
118  Fw::Enabled enable);
119 
129  void HLTH_CHNG_PING_cmdHandler(const FwOpcodeType opCode,
130  U32 cmdSeq,
131  const Fw::CmdStringArg& entry,
132  U32 warningValue,
133  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  FwIndexType findEntry(const Fw::CmdStringArg& entry);
146 
148  FwIndexType 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 } // end namespace Svc
157 
158 #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
~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.
enum T t
For backwards compatibility.
friend class HealthTester