|
@@ -42,6 +42,7 @@ addCurrentTimeVariable(UA_Server *server) {
|
|
UA_DateTime now = 0;
|
|
UA_DateTime now = 0;
|
|
UA_VariableAttributes attr = UA_VariableAttributes_default;
|
|
UA_VariableAttributes attr = UA_VariableAttributes_default;
|
|
attr.displayName = UA_LOCALIZEDTEXT("en_US", "Current time");
|
|
attr.displayName = UA_LOCALIZEDTEXT("en_US", "Current time");
|
|
|
|
+ attr.accessLevel = UA_ACCESSLEVELMASK_READ | UA_ACCESSLEVELMASK_WRITE;
|
|
UA_Variant_setScalar(&attr.value, &now, &UA_TYPES[UA_TYPES_DATETIME]);
|
|
UA_Variant_setScalar(&attr.value, &now, &UA_TYPES[UA_TYPES_DATETIME]);
|
|
|
|
|
|
UA_NodeId currentNodeId = UA_NODEID_STRING(1, "current-time");
|
|
UA_NodeId currentNodeId = UA_NODEID_STRING(1, "current-time");
|
|
@@ -133,6 +134,7 @@ static void
|
|
addCurrentTimeDataSourceVariable(UA_Server *server) {
|
|
addCurrentTimeDataSourceVariable(UA_Server *server) {
|
|
UA_VariableAttributes attr = UA_VariableAttributes_default;
|
|
UA_VariableAttributes attr = UA_VariableAttributes_default;
|
|
attr.displayName = UA_LOCALIZEDTEXT("en_US", "Current time - data source");
|
|
attr.displayName = UA_LOCALIZEDTEXT("en_US", "Current time - data source");
|
|
|
|
+ attr.accessLevel = UA_ACCESSLEVELMASK_READ | UA_ACCESSLEVELMASK_WRITE;
|
|
|
|
|
|
UA_NodeId currentNodeId = UA_NODEID_STRING(1, "current-time-datasource");
|
|
UA_NodeId currentNodeId = UA_NODEID_STRING(1, "current-time-datasource");
|
|
UA_QualifiedName currentName = UA_QUALIFIEDNAME(1, "current-time-datasource");
|
|
UA_QualifiedName currentName = UA_QUALIFIEDNAME(1, "current-time-datasource");
|