Minor Update:

- DeviceCore:
  - Initialise params in header file
- JSONparseCore:
  - Increase Read buffer to handle large queries
- UtilCore:
  - Bug fix: handle NULL seperator in Hex conversions
This commit is contained in:
Charl Wentzel
2019-05-28 09:22:28 +02:00
parent 316b27b19f
commit ac649bf4fb
4 changed files with 21 additions and 32 deletions

View File

@@ -121,10 +121,10 @@ class CDeviceCore : public CFunctionCore
{
protected:
// Configuration
CDataMember * ConfigTypes = NULL;
CDataMember * ValueTree = NULL;
CJSONparse * JSONparse = NULL;
bool DeviceInit = false;
CDataMember * ConfigTypes = NULL;
CDataMember * ValueTree = NULL;
CJSONparse * JSONparse = NULL;
bool DeviceInit = false; // Initialise device on start
// Devices & Type
TDevice * FirstDeviceType = NULL;
@@ -132,25 +132,25 @@ protected:
TDevice * ActiveDevice = NULL;
// Standard channels
TChannel * DeviceChannel = NULL;
TChannel * CmdChannel = NULL;
TChannel * EventChannel = NULL;
TChannel * DeviceChannel = NULL;
TChannel * CmdChannel = NULL;
TChannel * EventChannel = NULL;
// Poll
int PollCycle; // Device Polling state, e.g. Init, Connect, Run, Disonnect, Shutdown
int PollStep; // Position in polling sequence
timeval PollWait; // Time at which last poll was done
long PollInterval; // Minimum delay between polls
int PollCycle = 0; // Device Polling state, e.g. Init, Connect, Run, Disonnect, Shutdown
int PollStep = 0; // Position in polling sequence
timeval PollWait = {0,0}; // Time at which last poll was done
long PollInterval = 250; // Minimum delay between polls
// Reply
bool WaitingForReply; // Command sent, waiting for reply
bool InvalidReply; // Invalid reply received
long DefReplyTimeout; // Default Max waiting time for reply
long ReplyTimeout; // Max waiting time for reply
bool WaitingForReply = false; // Command sent, waiting for reply
bool InvalidReply = false; // Invalid reply received
long DefReplyTimeout = 500; // Default Max waiting time for reply
long ReplyTimeout = 500; // Max waiting time for reply
// Retry
int PollRetry; // No of polling retries that has timed out
int MaxRetries; // Max allowed retries
int PollRetry = 0; // No of polling retries that has timed out
int MaxRetries = 3; // Max allowed retries
// Manage Devices
bool DestroyDevice( TDevice ** Device );