F´ Flight Software - C/C++ Documentation  NASA-v1.5.0
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 
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 NATIVE_INT_TYPE queueDepth, const NATIVE_INT_TYPE instance);
65 
73  void setPingEntries(PingEntry* pingEntries, NATIVE_INT_TYPE numPingEntries, U32 watchDogCode);
74 
78  ~HealthImpl(void);
79 
81 
85  virtual void doOtherChecks(void);
86 
88 
95  void PingReturn_handler(const NATIVE_INT_TYPE portNum, U32 key);
96 
104 
113 
123 
133  void HLTH_CHNG_PING_cmdHandler(const FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg& entry, U32 warningValue, U32 fatalValue);
134 
138  struct PingTracker {
141  U32 key;
144 
146 
149  U32 m_key;
154 
155  };
156 
157 } // end namespace Svc
158 
159 #endif
Svc::HealthImpl::Run_handler
void Run_handler(const NATIVE_INT_TYPE portNum, NATIVE_UINT_TYPE context)
run handler
Definition: HealthComponentImpl.cpp:85
Svc::HealthComponentBase
Auto-generated base for Health component.
Definition: HealthComponentAc.hpp:49
PRIVATE
#define PRIVATE
overridable private for unit testing
Definition: BasicTypes.hpp:118
Svc::HealthImpl::PingTracker
ping tracker struct
Definition: HealthComponentImpl.hpp:138
Svc::HealthImpl::m_warnings
U32 m_warnings
number of slip warnings issued
Definition: HealthComponentImpl.hpp:151
Svc::HealthImpl::findEntry
NATIVE_INT_TYPE findEntry(Fw::CmdStringArg entry)
Definition: HealthComponentImpl.cpp:209
Svc::HealthComponentBase::HealthEnabled
PROTECTED HealthEnabled_MAX HealthEnabled
Definition: HealthComponentAc.hpp:536
Fw::EightyCharString
Definition: EightyCharString.hpp:10
Svc::HealthImpl::PingTracker::entry
PingEntry entry
entry passed by user
Definition: HealthComponentImpl.hpp:139
Svc::HealthImpl::PingEntry::warnCycles
NATIVE_UINT_TYPE warnCycles
number of cycles before WARNING
Definition: HealthComponentImpl.hpp:46
Fw::CmdStringArg
Definition: CmdString.hpp:11
Svc::HealthComponentBase::portNum
PRIVATE NATIVE_INT_TYPE portNum
Definition: HealthComponentAc.hpp:880
Svc::HealthImpl::~HealthImpl
~HealthImpl(void)
Component destructor.
Definition: HealthComponentImpl.cpp:64
Svc::HealthComponentBase::NUM_PINGSEND_OUTPUT_PORTS
@ NUM_PINGSEND_OUTPUT_PORTS
Definition: HealthComponentAc.hpp:434
Svc::HealthImpl::m_watchDogCode
U32 m_watchDogCode
stores code used for watchdog stroking
Definition: HealthComponentImpl.hpp:150
Svc::HealthImpl
Health component implementation class.
Definition: HealthComponentImpl.hpp:32
Svc::HealthComponentBase::cmdSeq
PROTECTED U32 cmdSeq
Definition: HealthComponentAc.hpp:566
HealthComponentAc.hpp
EightyCharString.hpp
Svc::HealthComponentBase::enable
PROTECTED U32 HealthEnabled enable
Definition: HealthComponentAc.hpp:568
Fw::ObjBase::init
void init(void)
Object initializer.
Definition: ObjBase.cpp:26
Svc::HealthImpl::PingTracker::cycleCount
U32 cycleCount
current cycle count
Definition: HealthComponentImpl.hpp:140
Svc::HealthImpl::PingTracker::enabled
PingEnabled enabled
if current ping result is checked
Definition: HealthComponentImpl.hpp:142
Svc::HealthImpl::m_enabled
HealthEnabled m_enabled
if the pinger is enabled
Definition: HealthComponentImpl.hpp:152
Svc::HealthImpl::key
PRIVATE U32 key
Definition: HealthComponentImpl.hpp:95
FwOpcodeType
#define FwOpcodeType
Type representation for a command opcode.
Definition: FpConfig.hpp:62
NATIVE_UINT_TYPE
unsigned int NATIVE_UINT_TYPE
native unsigned integer type declaration
Definition: BasicTypes.hpp:30
Svc::HealthImpl::setPingEntries
void setPingEntries(PingEntry *pingEntries, NATIVE_INT_TYPE numPingEntries, U32 watchDogCode)
Set ping entry tables.
Definition: HealthComponentImpl.cpp:45
Svc::HealthImpl::HealthImpl
HealthImpl(const char *const compName)
HealthImpl constructor.
Definition: HealthComponentImpl.cpp:23
Svc::HealthImpl::HLTH_ENABLE_cmdHandler
void HLTH_ENABLE_cmdHandler(const FwOpcodeType opCode, U32 cmdSeq, HealthEnabled enable)
HLTH_ENABLE handler.
Definition: HealthComponentImpl.cpp:148
Svc::HealthImpl::PingEntry
struct for ping entry
Definition: HealthComponentImpl.hpp:45
Svc::HealthComponentBase::PingEnabled
PingEnabled
Definition: HealthComponentAc.hpp:538
Svc::HealthImpl::queue_depth
U32 queue_depth
queue depth passed by user
Definition: HealthComponentImpl.hpp:153
Svc::HealthImpl::PingEntry::fatalCycles
NATIVE_UINT_TYPE fatalCycles
number of cycles before FATAL
Definition: HealthComponentImpl.hpp:47
Svc
Definition: ActiveLoggerComponentAc.cpp:22
Svc::HealthImpl::PingTracker::key
U32 key
key passed to ping
Definition: HealthComponentImpl.hpp:141
Svc::HealthImpl::m_numPingEntries
U32 m_numPingEntries
Private member data.
Definition: HealthComponentImpl.hpp:148
Svc::HealthImpl::HLTH_PING_ENABLE_cmdHandler
void HLTH_PING_ENABLE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &entry, PingEnabled enable)
HLTH_PING_ENABLE handler.
Definition: HealthComponentImpl.cpp:159
Svc::HealthImpl::PingEntry::entryName
Fw::EightyCharString entryName
the name of the entry
Definition: HealthComponentImpl.hpp:48
Svc::HealthImpl::HLTH_CHNG_PING_cmdHandler
void HLTH_CHNG_PING_cmdHandler(const FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &entry, U32 warningValue, U32 fatalValue)
HLTH_CHNG_PING handler.
Definition: HealthComponentImpl.cpp:185
Svc::HealthImpl::m_key
U32 m_key
current key value. Just increments for each ping entry.
Definition: HealthComponentImpl.hpp:149
Svc::HealthImpl::m_pingTrackerEntries
struct Svc::HealthImpl::PingTracker m_pingTrackerEntries[NUM_PINGSEND_OUTPUT_PORTS]
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition: BasicTypes.hpp:29
Svc::HealthComponentBase::PROTECTED
PROTECTED PROTECTED
Definition: HealthComponentAc.hpp:554