瀏覽代碼

CTT: Deterministic NodeId for the CurrentTime node

Julius Pfrommer 5 年之前
父節點
當前提交
53e117df7f
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      examples/server_ctt.c

+ 2 - 1
examples/server_ctt.c

@@ -158,7 +158,8 @@ setInformationModel(UA_Server *server) {
     v_attr.dataType = UA_TYPES[UA_TYPES_DATETIME].typeId;
     v_attr.valueRank = UA_VALUERANK_SCALAR;
     const UA_QualifiedName dateName = UA_QUALIFIEDNAME(1, "current time");
-    UA_Server_addDataSourceVariableNode(server, UA_NODEID_NULL, UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER),
+    UA_Server_addDataSourceVariableNode(server, UA_NODEID_NUMERIC(1, 2345),
+                                        UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER),
                                         UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES), dateName,
                                         baseDataVariableType, v_attr, dateDataSource, NULL, NULL);