Files
redAcore/WatchdogCore.h
Charl Wentzel 434377f122 Major Update:
- Implement new ApplicationCore:
  - Manage Tools: Log, DataTree, JSONparser & Selector
  - Load configuration, Manage FunctionBlocks
- FunctionCore & dirived classes, SignalCore:
  - affects: SelectableCore, DeviceCore, FileCore, WatchdogCore
  - Do not pass Log()
  - Define and pass Type
  - Update/reduce included headers
  - Use ProcessName and Application global vars
  - Get Log, DataTree from Application
  - Use virtual Init() function to set must have Channels/Handles
- DataTreeCore:
  - Bug fix: Check if child members exist and destroy in SetValuePtr()
  - Add method GetFirstChild with BaseMember & Path
  - Bug fix: do not use RootMember if no Parent in GetChildxxx() methods
- SignalCore, SelectCore:
  - Use Application->Log()
- FunctionCore:
  - Add itself to Application (function list)
  - Add parameter: LinkConfigMember, Type
  - Use virtual LoadConfigData() to configure from DataTree
  - Rename methods: LoadConfig() -> InitConfig(),
      InitLogging() -> SetLogParam(), SetDebugLevel() -> SetLogLevel()
  - Add method: GetType(), LoadChannelLinkData(), InitChannelLinks()
  - Modify LinkIn/OutputChannel() to use name for InFunction, not pointer
- SelectableCore & Dirived classes:
  - Affects DeviceCore & WatchdogClient
  - Rename parameter: Select -> Selector, BaseMember -> ConfigMember
  - Get Selector from Application->Selector
  - Change Handles JSON structure from Array to Key:Value pairs
  - Bug fix: check if Selector exist during Input()
  - Bug fix: do not set PortNo if not exist
2017-07-16 20:29:01 +02:00

53 lines
1019 B
C++

/*
* WatchdogCore.h
*
* Created on: July 2017
* Author: wentzelc
*/
#ifndef REDACORE_WATCHDOGCORE_H_
#define REDACORE_WATCHDOGCORE_H_
// redA Libraries
#include "SelectableCore.h"
#include "LiteProtocolCore.h"
// Standard C/C++ Libraries
/*none*/
//---------------------------------------------------------------------------
class CWatchdogCore : public CSelectableCore
{
private:
// Command
CLiteProtocol * Protocol;
// Timing
timeval PingTimer;
int PingInterval;
// Handle
THandle * Ping;
public:
// Life Cycle
CWatchdogCore( const char * pName );
virtual ~CWatchdogCore();
// Load Configuration
virtual bool LoadConfigData();
// Manually set Configuration
bool SetInterval( int pPingInterval );
// Initialisation
virtual bool Init();
// Process
virtual bool Process();
};
//---------------------------------------------------------------------------
#endif /* REDACORE_WATCHDOGCORE_H_ */