Major update:

- Add CWatchdogCore component.  Sends ping to watchdog server
This commit is contained in:
Charl Wentzel
2017-07-05 17:06:31 +02:00
parent c50d920f94
commit 04edaf6e34
3 changed files with 109 additions and 1 deletions

41
WatchdogCore.h Normal file
View 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_ */