Commit 05031e3c authored by Ivan Tyagov's avatar Ivan Tyagov

Cosmetics.

parent 0dd8cab8
......@@ -145,12 +145,10 @@ static void addPubSubDataSetField(UA_Server *server, PublishedVariable varDetail
&dataSetFieldConfig, &dataSetFieldIdent);
}
void callbackTicHeartBeat()
{
/* Increase periodically heart beats of the server */
HEART_BEATS += 1;
//UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "\theart_beat %d", HEART_BEATS);
// set OPC UA's heat_beat node value
UA_NodeId myFloatNodeId = UA_NODEID_STRING(1, "heart_beat");
......@@ -178,7 +176,6 @@ void callbackTicHeartBeat()
UA_Server_writeValue(server, myFloatNodeId, myVar);
}
static void enablePublishHeartBeat(UA_Server *server){
size_t i;
// add a callback which will increment heart beat tics
......
......@@ -240,11 +240,10 @@ static void fillTestDataSetMetaData(UA_DataSetMetaDataType *pMetaData) {
}
void callbackCheckHeartBeat() {
/*
* Check if for liveness of related couplers. Called upon a certain interval.
* If a related coupler is down got to safe mode.
* If a related coupler is down go to safe mode.
*/
int coupler_id, last_seen_timestamp_int, timestamp_delta;
bool is_down;
......@@ -256,7 +255,6 @@ void callbackCheckHeartBeat() {
// convert to str as this is the hash key
char* coupler_id_str = convertInt2Str(coupler_id);
char *last_seen_timestamp = getItem(SUBSCRIBER_DICT, coupler_id_str);
//UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "Check ID=%s, last_seen=%s", coupler_id_str, last_seen_timestamp);
if (last_seen_timestamp != NULL){
// we do have timestamp for this coupler ID
last_seen_timestamp_int = atoi(last_seen_timestamp);
......@@ -301,7 +299,6 @@ void callbackCheckHeartBeat() {
}
}
static void enableSubscribeToHeartBeat(UA_Server *server, UA_ServerConfig *config){
// enable subscribe to keep-alive messages
UA_String transportProfile = UA_STRING(DEFAULT_TRANSPORT_PROFILE);
......
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