Commit 538090e5 authored by Ivan Tyagov's avatar Ivan Tyagov

Fix wrong code.

parent 7bc630f5
...@@ -104,11 +104,11 @@ typedef struct PublishedVariable { ...@@ -104,11 +104,11 @@ typedef struct PublishedVariable {
static void addPubSubVariable(UA_Server *server, PublishedVariable varDetails) { static void addPubSubVariable(UA_Server *server, PublishedVariable varDetails) {
UA_VariableAttributes attr = UA_VariableAttributes_default; UA_VariableAttributes attr = UA_VariableAttributes_default;
//UA_Variant_setScalar(&attr.value, varDetails.pdefaultValue, &UA_TYPES[varDetails.type]); //UA_Variant_setScalar(&attr.value, varDetails.pdefaultValue, &varDetails.type);
UA_Variant_setScalar(&attr.value, varDetails.pdefaultValue, &UA_TYPES[UA_TYPES_INT32]); //XXX: hard-code for INT32 only, make generic UA_Variant_setScalar(&attr.value, varDetails.pdefaultValue, &UA_TYPES[UA_TYPES_INT32]); //XXX: hard-code for INT32 only, make generic
attr.description = UA_LOCALIZEDTEXT("en-US", varDetails.description); attr.description = UA_LOCALIZEDTEXT("en-US", varDetails.description);
attr.displayName = UA_LOCALIZEDTEXT("en-US", varDetails.description); attr.displayName = UA_LOCALIZEDTEXT("en-US", varDetails.description);
//attr.dataType = UA_TYPES[varDetails.type].typeId; //attr.dataType = varDetails.type.typeId;
attr.dataType = UA_TYPES[UA_TYPES_INT32].typeId; //XXX: hard-code for INT32 only, make generic attr.dataType = UA_TYPES[UA_TYPES_INT32].typeId; //XXX: hard-code for INT32 only, make generic
attr.accessLevel = UA_ACCESSLEVELMASK_READ | UA_ACCESSLEVELMASK_WRITE; attr.accessLevel = UA_ACCESSLEVELMASK_READ | UA_ACCESSLEVELMASK_WRITE;
......
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