浏览代码

use integer shortnames in ua_types_encoding_binary.c

Julius Pfrommer 7 年之前
父节点
当前提交
168f143eaf
共有 3 个文件被更改,包括 439 次插入437 次删除
  1. 7 7
      src/server/ua_server_ns0.c
  2. 431 430
      src/ua_types_encoding_binary.c
  3. 1 0
      src/ua_util.h

+ 7 - 7
src/server/ua_server_ns0.c

@@ -29,16 +29,16 @@ readStatus(UA_Server *server, const UA_NodeId *sessionId,
         return UA_STATUSCODE_GOOD;
     }
 
-    UA_ServerStatusDataType *status = UA_ServerStatusDataType_new();
-    status->startTime = server->startTime;
-    status->currentTime = UA_DateTime_now();
-    status->state = UA_SERVERSTATE_RUNNING;
-    status->secondsTillShutdown = 0;
-    UA_BuildInfo_copy(&server->config.buildInfo, &status->buildInfo);
+    UA_ServerStatusDataType *statustype = UA_ServerStatusDataType_new();
+    statustype->startTime = server->startTime;
+    statustype->currentTime = UA_DateTime_now();
+    statustype->state = UA_SERVERSTATE_RUNNING;
+    statustype->secondsTillShutdown = 0;
+    UA_BuildInfo_copy(&server->config.buildInfo, &statustype->buildInfo);
 
     value->value.type = &UA_TYPES[UA_TYPES_SERVERSTATUSDATATYPE];
     value->value.arrayLength = 0;
-    value->value.data = status;
+    value->value.data = statustype;
     value->value.arrayDimensionsSize = 0;
     value->value.arrayDimensions = NULL;
     value->hasValue = true;

文件差异内容过多而无法显示
+ 431 - 430
src/ua_types_encoding_binary.c


+ 1 - 0
src/ua_util.h

@@ -55,6 +55,7 @@ typedef UA_UInt32 u32;
 typedef UA_Int32 i32;
 typedef UA_UInt64 u64;
 typedef UA_Int64 i64;
+typedef UA_StatusCode status;
 
 /* Atomic Operations
  * -----------------