ua_nodes.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. #ifndef UA_NODES_H_
  2. #define UA_NODES_H_
  3. #include "ua_server.h"
  4. #include "ua_types_generated.h"
  5. #include "ua_types_encoding_binary.h"
  6. #define UA_STANDARD_NODEMEMBERS \
  7. UA_NodeId nodeId; \
  8. UA_NodeClass nodeClass; \
  9. UA_QualifiedName browseName; \
  10. UA_LocalizedText displayName; \
  11. UA_LocalizedText description; \
  12. UA_UInt32 writeMask; \
  13. UA_UInt32 userWriteMask; \
  14. UA_Int32 referencesSize; \
  15. UA_ReferenceNode *references;
  16. typedef struct {
  17. UA_STANDARD_NODEMEMBERS
  18. } UA_Node;
  19. typedef struct {
  20. UA_STANDARD_NODEMEMBERS
  21. UA_Byte eventNotifier;
  22. } UA_ObjectNode;
  23. UA_TYPE_HANDLING_FUNCTIONS(UA_ObjectNode)
  24. typedef struct {
  25. UA_STANDARD_NODEMEMBERS
  26. UA_Boolean isAbstract;
  27. } UA_ObjectTypeNode;
  28. UA_TYPE_HANDLING_FUNCTIONS(UA_ObjectTypeNode)
  29. typedef enum {
  30. UA_VALUESOURCE_VARIANT,
  31. UA_VALUESOURCE_DATASOURCE
  32. } UA_ValueSource;
  33. typedef struct {
  34. UA_STANDARD_NODEMEMBERS
  35. UA_Int32 valueRank; /**< n >= 1: the value is an array with the specified number of dimensions.
  36. n = 0: the value is an array with one or more dimensions.
  37. n = -1: the value is a scalar.
  38. n = -2: the value can be a scalar or an array with any number of dimensions.
  39. n = -3: the value can be a scalar or a one dimensional array. */
  40. UA_ValueSource valueSource;
  41. union {
  42. UA_Variant variant;
  43. UA_DataSource dataSource;
  44. } value;
  45. /* <--- similar to variabletypenodes up to there--->*/
  46. UA_Byte accessLevel;
  47. UA_Byte userAccessLevel;
  48. UA_Double minimumSamplingInterval;
  49. UA_Boolean historizing;
  50. } UA_VariableNode;
  51. UA_TYPE_HANDLING_FUNCTIONS(UA_VariableNode)
  52. /** Make a copy but leave out the references and the variable */
  53. UA_StatusCode UA_VariableNode_copyWithoutRefsAndVariable(const UA_VariableNode *src, UA_VariableNode *dst);
  54. typedef struct {
  55. UA_STANDARD_NODEMEMBERS
  56. UA_Int32 valueRank;
  57. UA_ValueSource valueSource;
  58. union {
  59. UA_Variant variant;
  60. UA_DataSource dataSource;
  61. } value;
  62. /* <--- similar to variablenodes up to there--->*/
  63. UA_Boolean isAbstract;
  64. } UA_VariableTypeNode;
  65. UA_TYPE_HANDLING_FUNCTIONS(UA_VariableTypeNode)
  66. typedef struct {
  67. UA_STANDARD_NODEMEMBERS
  68. UA_Boolean isAbstract;
  69. UA_Boolean symmetric;
  70. UA_LocalizedText inverseName;
  71. } UA_ReferenceTypeNode;
  72. UA_TYPE_HANDLING_FUNCTIONS(UA_ReferenceTypeNode)
  73. typedef struct {
  74. UA_STANDARD_NODEMEMBERS
  75. UA_Boolean executable;
  76. UA_Boolean userExecutable;
  77. } UA_MethodNode;
  78. UA_TYPE_HANDLING_FUNCTIONS(UA_MethodNode)
  79. typedef struct {
  80. UA_STANDARD_NODEMEMBERS
  81. UA_Boolean containsNoLoops;
  82. UA_Byte eventNotifier;
  83. } UA_ViewNode;
  84. UA_TYPE_HANDLING_FUNCTIONS(UA_ViewNode)
  85. typedef struct {
  86. UA_STANDARD_NODEMEMBERS
  87. UA_Boolean isAbstract;
  88. } UA_DataTypeNode;
  89. UA_TYPE_HANDLING_FUNCTIONS(UA_DataTypeNode)
  90. #endif /* UA_NODES_H_ */