Commit 6f0a1c34 authored by Ivan Tyagov's avatar Ivan Tyagov

By default we are subscribed to ourselves thus filter us out from rest of external coupler_id's.

parent d37dad6a
...@@ -31,9 +31,12 @@ static void dataChangeNotificationCallback(UA_Server *server, UA_UInt32 monitore ...@@ -31,9 +31,12 @@ static void dataChangeNotificationCallback(UA_Server *server, UA_UInt32 monitore
// filter out ID from Data Set // filter out ID from Data Set
if(UA_Variant_hasScalarType(&var->value, &UA_TYPES[UA_TYPES_UINT32])) { if(UA_Variant_hasScalarType(&var->value, &UA_TYPES[UA_TYPES_UINT32])) {
unsigned int coupler_id = *(UA_UInt32*) var->value.data; unsigned int coupler_id = *(UA_UInt32*) var->value.data;
UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, if (coupler_id!=COUPLER_ID) {
"ID = %d", coupler_id); // care for other coupler_id NOT ourselves
UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "ID = %d", coupler_id);
}
} }
// filter out heart_beat from Data Set // filter out heart_beat from Data Set
if(UA_Variant_hasScalarType(&var->value, &UA_TYPES[UA_TYPES_FLOAT])) { if(UA_Variant_hasScalarType(&var->value, &UA_TYPES[UA_TYPES_FLOAT])) {
float heart_beat = *(UA_Float*) var->value.data; float heart_beat = *(UA_Float*) var->value.data;
......
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