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:
@@ -77,7 +77,7 @@ struct SHandle {
|
||||
// State
|
||||
int FD;
|
||||
EConnectState State;
|
||||
bool Auto;
|
||||
bool AutoManage;
|
||||
|
||||
// Callback functions
|
||||
FHandleCallback StateCallback[ 6 ];
|
||||
@@ -105,7 +105,7 @@ struct SHandle {
|
||||
|
||||
// Reopen Timer
|
||||
timeval ReopenStart;
|
||||
long ReopenTimeout; // millisecs
|
||||
long ReopenDelay; // millisecs
|
||||
|
||||
// List / Tree
|
||||
TChannel * Channel;
|
||||
@@ -134,11 +134,11 @@ protected:
|
||||
|
||||
// Output
|
||||
CLogCore * Log;
|
||||
EDebugLevel DebugLevel;
|
||||
EDebugLevel LogLevel;
|
||||
|
||||
public:
|
||||
// Life Cycle
|
||||
CSelect( long SelectTimeout, CLogCore * pLog, EDebugLevel DebugLevel );
|
||||
CSelect( long SelectTimeout, CLogCore * pLog, EDebugLevel pLogLevel );
|
||||
~CSelect();
|
||||
|
||||
// Parameters
|
||||
@@ -165,6 +165,9 @@ protected:
|
||||
// Select interface
|
||||
CSelect * Select;
|
||||
|
||||
// Configuration
|
||||
virtual bool LoadConfigData();
|
||||
|
||||
// Managing File Handles
|
||||
bool RemoveHandle( THandle * Handle );
|
||||
bool DestroyHandle( THandle * Handle );
|
||||
@@ -207,8 +210,8 @@ protected:
|
||||
|
||||
public:
|
||||
// Life Cycle
|
||||
CSelectableCore( const char * Name, CSelect * Selector, CLogCore * pLog, EDebugLevel pDebugLevel, int pOuputDisplay );
|
||||
~CSelectableCore();
|
||||
CSelectableCore( const char * Name, CSelect * pSelect, CLogCore * pLog );
|
||||
virtual ~CSelectableCore();
|
||||
|
||||
// Finding Handles
|
||||
inline THandle * GetHandle( const char * HandleName )
|
||||
@@ -228,7 +231,6 @@ public:
|
||||
return Handle;
|
||||
}
|
||||
|
||||
// Configuration
|
||||
THandle * CreateHandle( const char * HandleName, bool CreateChannel );
|
||||
bool SetCallback( THandle * Handle, EConnectState pState, FHandleCallback pCallback );
|
||||
bool SetAutoManage( THandle * Handle, bool AutoManage, int ReopenTime = 0 );
|
||||
|
||||
Reference in New Issue
Block a user