ua_nodes.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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 struct {
  30. UA_STANDARD_NODEMEMBERS
  31. UA_Int32 valueRank; /**< n >= 1: the value is an array with the specified number of dimensions.
  32. n = 0: the value is an array with one or more dimensions.
  33. n = -1: the value is a scalar.
  34. n = -2: the value can be a scalar or an array with any number of dimensions.
  35. n = -3: the value can be a scalar or a one dimensional array. */
  36. enum {
  37. UA_VARIABLENODETYPE_VARIANT,
  38. UA_VARIABLENODETYPE_DATASOURCE
  39. } variableType;
  40. union {
  41. UA_Variant variant;
  42. UA_DataSource dataSource;
  43. } variable;
  44. UA_Byte accessLevel;
  45. UA_Byte userAccessLevel;
  46. UA_Double minimumSamplingInterval;
  47. UA_Boolean historizing;
  48. } UA_VariableNode;
  49. UA_TYPE_HANDLING_FUNCTIONS(UA_VariableNode)
  50. /** Make a copy but leave out the references and the variable */
  51. UA_StatusCode UA_VariableNode_copyWithoutRefsAndVariable(const UA_VariableNode *src, UA_VariableNode *dst);
  52. typedef struct {
  53. UA_STANDARD_NODEMEMBERS
  54. UA_Boolean isAbstract;
  55. UA_Int32 valueRank;
  56. UA_Variant value;
  57. } UA_VariableTypeNode;
  58. UA_TYPE_HANDLING_FUNCTIONS(UA_VariableTypeNode)
  59. typedef struct {
  60. UA_STANDARD_NODEMEMBERS
  61. UA_Boolean isAbstract;
  62. UA_Boolean symmetric;
  63. UA_LocalizedText inverseName;
  64. } UA_ReferenceTypeNode;
  65. UA_TYPE_HANDLING_FUNCTIONS(UA_ReferenceTypeNode)
  66. typedef struct {
  67. UA_STANDARD_NODEMEMBERS
  68. UA_Boolean executable;
  69. UA_Boolean userExecutable;
  70. } UA_MethodNode;
  71. UA_TYPE_HANDLING_FUNCTIONS(UA_MethodNode)
  72. typedef struct {
  73. UA_STANDARD_NODEMEMBERS
  74. UA_Boolean containsNoLoops;
  75. UA_Byte eventNotifier;
  76. } UA_ViewNode;
  77. UA_TYPE_HANDLING_FUNCTIONS(UA_ViewNode)
  78. typedef struct {
  79. UA_STANDARD_NODEMEMBERS
  80. UA_Boolean isAbstract;
  81. } UA_DataTypeNode;
  82. UA_TYPE_HANDLING_FUNCTIONS(UA_DataTypeNode)
  83. #endif /* UA_NODES_H_ */