Commit ae465954 authored by Ivan Tyagov's avatar Ivan Tyagov

Rename text representations.

parent 7e67e1f3
...@@ -77,24 +77,24 @@ static void addVariable(UA_Server *server) { ...@@ -77,24 +77,24 @@ static void addVariable(UA_Server *server) {
// relay 0 // relay 0
UA_VariableAttributes attr0 = UA_VariableAttributes_default; UA_VariableAttributes attr0 = UA_VariableAttributes_default;
UA_Variant_setScalar(&attr0.value, &myInteger, &UA_TYPES[UA_TYPES_INT32]); UA_Variant_setScalar(&attr0.value, &myInteger, &UA_TYPES[UA_TYPES_INT32]);
attr0.description = UA_LOCALIZEDTEXT("en-US","Relay 0"); attr0.description = UA_LOCALIZEDTEXT("en-US","I2C0 / Relay 0");
attr0.displayName = UA_LOCALIZEDTEXT("en-US", "Relay 0"); attr0.displayName = UA_LOCALIZEDTEXT("en-US", "I2C0 / Relay 0");
attr0.dataType = UA_TYPES[UA_TYPES_INT32].typeId; attr0.dataType = UA_TYPES[UA_TYPES_INT32].typeId;
attr0.accessLevel = UA_ACCESSLEVELMASK_READ | UA_ACCESSLEVELMASK_WRITE; attr0.accessLevel = UA_ACCESSLEVELMASK_READ | UA_ACCESSLEVELMASK_WRITE;
UA_NodeId myIntegerNodeId0 = UA_NODEID_STRING(1, "i2c0.relay0"); UA_NodeId myIntegerNodeId0 = UA_NODEID_STRING(1, "i2c0.relay0");
UA_QualifiedName myIntegerName0 = UA_QUALIFIEDNAME(1, "Relay 0"); UA_QualifiedName myIntegerName0 = UA_QUALIFIEDNAME(1, "I2C0 / Relay 0");
UA_Server_addVariableNode(server, myIntegerNodeId0, parentNodeId, UA_Server_addVariableNode(server, myIntegerNodeId0, parentNodeId,
parentReferenceNodeId, myIntegerName0, parentReferenceNodeId, myIntegerName0,
UA_NODEID_NUMERIC(0, UA_NS0ID_BASEDATAVARIABLETYPE), attr0, NULL, NULL); UA_NODEID_NUMERIC(0, UA_NS0ID_BASEDATAVARIABLETYPE), attr0, NULL, NULL);
// relay 1 // relay 1
UA_VariableAttributes attr1 = UA_VariableAttributes_default; UA_VariableAttributes attr1 = UA_VariableAttributes_default;
UA_Variant_setScalar(&attr1.value, &myInteger, &UA_TYPES[UA_TYPES_INT32]); UA_Variant_setScalar(&attr1.value, &myInteger, &UA_TYPES[UA_TYPES_INT32]);
attr1.description = UA_LOCALIZEDTEXT("en-US","Relay 1"); attr1.description = UA_LOCALIZEDTEXT("en-US","I2C0 / Relay 1");
attr1.displayName = UA_LOCALIZEDTEXT("en-US", "Relay 1"); attr1.displayName = UA_LOCALIZEDTEXT("en-US", "I2C0 / Relay 1");
attr1.dataType = UA_TYPES[UA_TYPES_INT32].typeId; attr1.dataType = UA_TYPES[UA_TYPES_INT32].typeId;
attr1.accessLevel = UA_ACCESSLEVELMASK_READ | UA_ACCESSLEVELMASK_WRITE; attr1.accessLevel = UA_ACCESSLEVELMASK_READ | UA_ACCESSLEVELMASK_WRITE;
UA_NodeId myIntegerNodeId1 = UA_NODEID_STRING(1, "i2c0.relay1"); UA_NodeId myIntegerNodeId1 = UA_NODEID_STRING(1, "i2c0.relay1");
UA_QualifiedName myIntegerName1 = UA_QUALIFIEDNAME(1, "Relay 1"); UA_QualifiedName myIntegerName1 = UA_QUALIFIEDNAME(1, "I2C0 / Relay 1");
UA_Server_addVariableNode(server, myIntegerNodeId1, parentNodeId, UA_Server_addVariableNode(server, myIntegerNodeId1, parentNodeId,
parentReferenceNodeId, myIntegerName1, parentReferenceNodeId, myIntegerName1,
UA_NODEID_NUMERIC(0, UA_NS0ID_BASEDATAVARIABLETYPE), attr1, NULL, NULL); UA_NODEID_NUMERIC(0, UA_NS0ID_BASEDATAVARIABLETYPE), attr1, NULL, NULL);
...@@ -102,12 +102,12 @@ static void addVariable(UA_Server *server) { ...@@ -102,12 +102,12 @@ static void addVariable(UA_Server *server) {
// relay 2 // relay 2
UA_VariableAttributes attr2 = UA_VariableAttributes_default; UA_VariableAttributes attr2 = UA_VariableAttributes_default;
UA_Variant_setScalar(&attr2.value, &myInteger, &UA_TYPES[UA_TYPES_INT32]); UA_Variant_setScalar(&attr2.value, &myInteger, &UA_TYPES[UA_TYPES_INT32]);
attr2.description = UA_LOCALIZEDTEXT("en-US","Relay 2"); attr2.description = UA_LOCALIZEDTEXT("en-US","I2C0 / Relay 2");
attr2.displayName = UA_LOCALIZEDTEXT("en-US", "Relay 2"); attr2.displayName = UA_LOCALIZEDTEXT("en-US", "I2C0 / Relay 2");
attr2.dataType = UA_TYPES[UA_TYPES_INT32].typeId; attr2.dataType = UA_TYPES[UA_TYPES_INT32].typeId;
attr2.accessLevel = UA_ACCESSLEVELMASK_READ | UA_ACCESSLEVELMASK_WRITE; attr2.accessLevel = UA_ACCESSLEVELMASK_READ | UA_ACCESSLEVELMASK_WRITE;
UA_NodeId myIntegerNodeId2 = UA_NODEID_STRING(1, "i2c0.relay2"); UA_NodeId myIntegerNodeId2 = UA_NODEID_STRING(1, "i2c0.relay2");
UA_QualifiedName myIntegerName2 = UA_QUALIFIEDNAME(1, "Relay 2"); UA_QualifiedName myIntegerName2 = UA_QUALIFIEDNAME(1, "I2C0 / Relay 2");
UA_Server_addVariableNode(server, myIntegerNodeId2, parentNodeId, UA_Server_addVariableNode(server, myIntegerNodeId2, parentNodeId,
parentReferenceNodeId, myIntegerName2, parentReferenceNodeId, myIntegerName2,
UA_NODEID_NUMERIC(0, UA_NS0ID_BASEDATAVARIABLETYPE), attr2, NULL, NULL); UA_NODEID_NUMERIC(0, UA_NS0ID_BASEDATAVARIABLETYPE), attr2, NULL, NULL);
...@@ -115,12 +115,12 @@ static void addVariable(UA_Server *server) { ...@@ -115,12 +115,12 @@ static void addVariable(UA_Server *server) {
// relay 3 // relay 3
UA_VariableAttributes attr3 = UA_VariableAttributes_default; UA_VariableAttributes attr3 = UA_VariableAttributes_default;
UA_Variant_setScalar(&attr3.value, &myInteger, &UA_TYPES[UA_TYPES_INT32]); UA_Variant_setScalar(&attr3.value, &myInteger, &UA_TYPES[UA_TYPES_INT32]);
attr3.description = UA_LOCALIZEDTEXT("en-US","Relay 3"); attr3.description = UA_LOCALIZEDTEXT("en-US","I2C0 / Relay 3");
attr3.displayName = UA_LOCALIZEDTEXT("en-US", "Relay 3"); attr3.displayName = UA_LOCALIZEDTEXT("en-US", "I2C0 / Relay 3");
attr3.dataType = UA_TYPES[UA_TYPES_INT32].typeId; attr3.dataType = UA_TYPES[UA_TYPES_INT32].typeId;
attr3.accessLevel = UA_ACCESSLEVELMASK_READ | UA_ACCESSLEVELMASK_WRITE; attr3.accessLevel = UA_ACCESSLEVELMASK_READ | UA_ACCESSLEVELMASK_WRITE;
UA_NodeId myIntegerNodeId3 = UA_NODEID_STRING(1, "i2c0.relay3"); UA_NodeId myIntegerNodeId3 = UA_NODEID_STRING(1, "i2c0.relay3");
UA_QualifiedName myIntegerName3 = UA_QUALIFIEDNAME(1, "Relay 3"); UA_QualifiedName myIntegerName3 = UA_QUALIFIEDNAME(1, "I2C0 / Relay 3");
UA_Server_addVariableNode(server, myIntegerNodeId3, parentNodeId, UA_Server_addVariableNode(server, myIntegerNodeId3, parentNodeId,
parentReferenceNodeId, myIntegerName3, parentReferenceNodeId, myIntegerName3,
UA_NODEID_NUMERIC(0, UA_NS0ID_BASEDATAVARIABLETYPE), attr3, NULL, NULL); UA_NODEID_NUMERIC(0, UA_NS0ID_BASEDATAVARIABLETYPE), attr3, NULL, NULL);
......
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