Browse Source

use integer shortnames in ua_types_encoding_binary.c

Julius Pfrommer 7 years ago
parent
commit
168f143eaf
3 changed files with 439 additions and 437 deletions
  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;

File diff suppressed because it is too large
+ 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
  * -----------------