Commit c98bc7e0 authored by Ivan Tyagov's avatar Ivan Tyagov

Fix heart beat

See merge request !60
parents 0d1095f7 0c3cca1b
...@@ -56,8 +56,8 @@ const int DEFAULT_HEART_BEAT_TIMEOUT_INTERVAL = 4 * DEFAULT_HEART_BEAT_INTERVAL; ...@@ -56,8 +56,8 @@ const int DEFAULT_HEART_BEAT_TIMEOUT_INTERVAL = 4 * DEFAULT_HEART_BEAT_INTERVAL;
static int HEART_BEAT_TIMEOUT_INTERVAL = DEFAULT_HEART_BEAT_TIMEOUT_INTERVAL; static int HEART_BEAT_TIMEOUT_INTERVAL = DEFAULT_HEART_BEAT_TIMEOUT_INTERVAL;
// the list of couplers onto which we depend for properly running // the list of couplers onto which we depend for properly running
// XXX: assume ONLY 8 couplers! // assume maximum of 127 couplers!
unsigned int HEART_BEAT_ID_LIST[] = {0, 0, 0, 0, 0, 0, 0, 0}; unsigned int HEART_BEAT_ID_LIST[127] = {0};
// the interval for publishing messages // the interval for publishing messages
static int PUBLISHING_INTERVAL = 10; static int PUBLISHING_INTERVAL = 10;
......
...@@ -471,7 +471,8 @@ static void addValueCallbackToCurrentTimeVariable(UA_Server *server) ...@@ -471,7 +471,8 @@ static void addValueCallbackToCurrentTimeVariable(UA_Server *server)
int device_number, offset_number; int device_number, offset_number;
char *node_id = malloc(sizeof(char) * 10); char *node_id = malloc(sizeof(char) * 10);
// list of relays, digital and analog callbacks for all devices (XXX: for now only 4 out of 127 possible!) // list of relays, digital and analog callbacks for all devices
// XXX: for now only 4 out of 127 added!
static void (*callables[40]) static void (*callables[40])
(UA_Server *server, const UA_NodeId *sessionId, void *sessionContext, (UA_Server *server, const UA_NodeId *sessionId, void *sessionContext,
const UA_NodeId *nodeId, void *nodeContext, const UA_NumericRange *range, const UA_NodeId *nodeId, void *nodeContext, const UA_NumericRange *range,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment