Commit bcd01d80 authored by Ivan Tyagov's avatar Ivan Tyagov

64 bits -> 32 bits

parent f2bfc98e
...@@ -125,11 +125,11 @@ typedef struct PublishedVariable { ...@@ -125,11 +125,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, &UA_TYPES[varDetails.type]);
UA_Variant_setScalar(&attr.value, varDetails.pdefaultValue, &UA_TYPES[UA_TYPES_INT64]); 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 = UA_TYPES[varDetails.type].typeId;
attr.dataType = UA_TYPES[UA_TYPES_INT64].typeId; 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;
UA_Server_addVariableNode(server, UA_NODEID_STRING(1, varDetails.name), UA_Server_addVariableNode(server, UA_NODEID_STRING(1, varDetails.name),
......
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