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:
@@ -58,14 +58,15 @@ protected:
|
||||
|
||||
// Configuration
|
||||
CDataTree * DataTree;
|
||||
TDataMember * BaseMember;
|
||||
|
||||
// Channels
|
||||
TChannel * FirstChannel;
|
||||
|
||||
// Output
|
||||
CLogCore * Log;
|
||||
EDebugLevel DebugLevel;
|
||||
int OutputDisplay;
|
||||
EDebugLevel LogLevel;
|
||||
int LogOutput;
|
||||
|
||||
// Manage Channel
|
||||
inline TChannel * GetChannel( const char * Name ) {
|
||||
@@ -76,16 +77,23 @@ protected:
|
||||
return Channel;
|
||||
}
|
||||
|
||||
// Load configuraiton
|
||||
virtual bool LoadConfigData();
|
||||
|
||||
// Manual Data Input/Output
|
||||
virtual int Output( const TChannel * Channel, const char * Data, int Len );
|
||||
|
||||
public:
|
||||
// Life cycle
|
||||
CFunctionCore( const char * FunctionName, CLogCore * pLog, EDebugLevel pDebugLevel, int pOuputDisplay );
|
||||
CFunctionCore( const char * pName, CLogCore * pLog );
|
||||
virtual ~CFunctionCore();
|
||||
|
||||
// Configuration
|
||||
virtual bool LoadConfig( CDataTree * DataTree, const char * BasePath );
|
||||
// Load Configuration
|
||||
virtual bool LoadConfig( CDataTree * pDataTree, const char * pBasePath );
|
||||
virtual bool LoadConfig( CDataTree * pDataTree, TDataMember * pBaseMember );
|
||||
|
||||
// Set Parameters Manually
|
||||
bool InitLogging( EDebugLevel pDebugLevel, int pOutputDisplay );
|
||||
bool SetDebugLevel( EDebugLevel pDebugLevel );
|
||||
|
||||
// Miscellaneous
|
||||
|
||||
Reference in New Issue
Block a user