mx_node_node_def.h
Go to the documentation of this file.
1 /* Copyright (C) 2019 Moxa Inc. All rights reserved. */
2 /* SPDX-License-Identifier: Apache-2.0 */
12 #ifndef __MX_NODE_NODE_DEFINE__
13 #define __MX_NODE_NODE_DEFINE__
14 
15 #include <stdint.h>
16 #include <stdbool.h>
17 
33 #define MAX_NODE_NAME_LEN 30
34 #define MAX_NODE_DESC_LEN 256
35 
39 typedef enum _MX_NODE_NODE_TYPE
40 {
47 
51 typedef struct _MX_NODE_FOLDER
52 {
54 
58 typedef struct _MX_NODE_OBJECT
59 {
61 
65 typedef enum _MX_NODE_VALUE_TYPE
66 {
81 
86 {
92 
97 typedef struct _MX_NODE_VARIANT
98 {
100  union
101  {
102  bool b;
103  int8_t i8;
104  int16_t i16;
105  int32_t i32;
106  int64_t i64;
107  uint8_t u8;
108  uint16_t u16;
109  uint32_t u32;
110  uint64_t u64;
111  float f;
112  double d;
113  char* s;
114  void* other;
115  } value;
117 
121 typedef struct _MX_NODE_VARIABLE
122 {
126 
130 typedef struct _MX_NODE_PROPERTY
131 {
135 
139 typedef struct _MX_NODE_NODE
140 {
141  char node_name[MAX_NODE_NAME_LEN];
142  char description[MAX_NODE_DESC_LEN];
144  union
145  {
150  };
151 } MX_NODE_NODE;
152 
156 typedef enum _MX_NODE_RESULT
157 {
161 
163 
165 
167 
168 #endif
MX_NODE_VARIANT value
A variant structure is used to store different type&#39;s data.
_MX_NODE_VALUE_TYPE
Variable node&#39;s data type.
struct _MX_NODE_FOLDER MX_NODE_FOLDER
Folder node&#39;s attributes, it is an empty sturcture.
_MX_NODE_RESULT
A result enumeration represents success or not.
MX_NODE_VARIABLE variable
Object node&#39;s attributes, it is an empty sturcture.
enum _MX_NODE_RESULT MX_NODE_RESULT
A result enumeration represents success or not.
#define MAX_NODE_NAME_LEN
MX_NODE_FOLDER folder
enum _MX_NODE_NODE_TYPE MX_NODE_NODE_TYPE
Type of OPC UA node.
_MX_NODE_ACCESS_RIGHT
Variable node&#39;s access right.
A node&#39;s sturcture contain name, description, node type and attribute.
#define MAX_NODE_DESC_LEN
enum _MX_NODE_ACCESS_RIGHT MX_NODE_ACCESS_RIGHT
Variable node&#39;s access right.
Property node&#39;s attributes.
MX_NODE_ACCESS_RIGHT access_right
Variable node&#39;s attributes.
struct _MX_NODE_VARIANT MX_NODE_VARIANT
A variant structure is used to store different type&#39;s data.
struct _MX_NODE_OBJECT MX_NODE_OBJECT
Object node&#39;s attributes, it is an empty sturcture.
MX_NODE_ACCESS_RIGHT access_right
MX_NODE_PROPERTY property
struct _MX_NODE_NODE MX_NODE_NODE
A node&#39;s sturcture contain name, description, node type and attribute.
Folder node&#39;s attributes, it is an empty sturcture.
struct _MX_NODE_PROPERTY MX_NODE_PROPERTY
Property node&#39;s attributes.
MX_NODE_VALUE_TYPE type
MX_NODE_OBJECT object
MX_NODE_VARIANT value
struct _MX_NODE_VARIABLE MX_NODE_VARIABLE
Variable node&#39;s attributes.
MX_NODE_NODE_TYPE node_type
_MX_NODE_NODE_TYPE
Type of OPC UA node.
enum _MX_NODE_VALUE_TYPE MX_NODE_VALUE_TYPE
Variable node&#39;s data type.