Major update:
- DataTreeCore:
- Bug fix: GetMember() error if member not found
- FunctionCore: (affected: SelectableCore, FileCore, WatchdogCore)
- Made destructor virual
- Standardize method parameter naming, e.g. pName, pLog
- Renamed parameters: DebugLevel -> LogLevel, OutputDisplay -> LogOutput
- Reinstated parameter BaseMember
- Removed logging parameters from constructor
- Created method InitLoggging() (shows "Function Created" message)
- Split LoadConfig() method into parts:
- Implemented public LoadConfig() methods
- Implemented LoadConfigData() method, load parameters from DataTree
- WatchdogCore:
- Derive from CSelectableCore instead of CFunctionCore
- Rename parameter: PingTimeout -> PingInterval
- Replace Ping Channel with Handle only
- Add method SetInterval()
- Send command direct to handle with (channel) Input()
- SelectableCore:
- Rename parameters: Auto -> AutoManage, ReopenTimeout -> ReopenDelay
- Implemented own virtual LoadConfigData() method
- DeviceCore:
- Made all logging conditional: if (Log) Log->Message(...)
- SelectCore:
- Renamed parameters: DebugLevel -> LogLevel
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
#define REDACORE_WATCHDOGCORE_H_
|
||||
|
||||
// redA Libraries
|
||||
#include "FunctionCore.h"
|
||||
#include "SelectableCore.h"
|
||||
#include "LiteProtocolCore.h"
|
||||
|
||||
// Standard C/C++ Libraries
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class CWatchdogCore : public CFunctionCore
|
||||
class CWatchdogCore : public CSelectableCore
|
||||
{
|
||||
private:
|
||||
// Command
|
||||
@@ -25,15 +25,20 @@ private:
|
||||
|
||||
// Timing
|
||||
timeval PingTimer;
|
||||
int PingTimeout;
|
||||
int PingInterval;
|
||||
|
||||
// Channel
|
||||
TChannel * Ping;
|
||||
// Handle
|
||||
THandle * Ping;
|
||||
|
||||
public:
|
||||
CWatchdogCore( const char * WatchdogName, const int pInterval, CLogCore * pLog, EDebugLevel pDebugLevel );
|
||||
// Life Cycle
|
||||
CWatchdogCore( const char * pName, CSelect * pSelect, CLogCore * pLog );
|
||||
virtual ~CWatchdogCore();
|
||||
|
||||
// Configuration
|
||||
bool SetInterval( int pPingInterval );
|
||||
|
||||
// Process
|
||||
virtual bool Process();
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user