Major update:
- Add CWatchdogCore component. Sends ping to watchdog server
This commit is contained in:
41
WatchdogCore.h
Normal file
41
WatchdogCore.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* WatchdogCore.h
|
||||
*
|
||||
* Created on: July 2017
|
||||
* Author: wentzelc
|
||||
*/
|
||||
|
||||
#ifndef REDACORE_WATCHDOGCORE_H_
|
||||
#define REDACORE_WATCHDOGCORE_H_
|
||||
|
||||
// redA Libraries
|
||||
#include "FunctionCore.h"
|
||||
#include "LiteProtocolCore.h"
|
||||
|
||||
// Standard C/C++ Libraries
|
||||
/*none*/
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class CWatchdogCore : public CFunctionCore
|
||||
{
|
||||
private:
|
||||
// Command
|
||||
CLiteProtocol * Protocol;
|
||||
|
||||
// Timing
|
||||
timeval PingTimer;
|
||||
int PingTimeout;
|
||||
|
||||
// Channel
|
||||
TChannel * Ping;
|
||||
|
||||
public:
|
||||
CWatchdogCore( const char * WatchdogName, const int pInterval, CLogCore * pLog, EDebugLevel pDebugLevel );
|
||||
virtual ~CWatchdogCore();
|
||||
|
||||
virtual bool Process();
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#endif /* REDACORE_WATCHDOGCORE_H_ */
|
||||
Reference in New Issue
Block a user