ua_constants.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  4. *
  5. * Copyright 2016-2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
  6. * Copyright 2016 (c) Sten Grüner
  7. * Copyright 2016-2017 (c) Stefan Profanter, fortiss GmbH
  8. * Copyright 2017 (c) Florian Palm
  9. */
  10. #ifndef UA_CONSTANTS_H_
  11. #define UA_CONSTANTS_H_
  12. #include "ua_config.h"
  13. _UA_BEGIN_DECLS
  14. /**
  15. * Standard-Defined Constants
  16. * ==========================
  17. * This section contains numerical and string constants that are defined in the
  18. * OPC UA standard.
  19. *
  20. * .. _attribute-id:
  21. *
  22. * Attribute Id
  23. * ------------
  24. * Every node in an OPC UA information model contains attributes depending on
  25. * the node type. Possible attributes are as follows: */
  26. typedef enum {
  27. UA_ATTRIBUTEID_NODEID = 1,
  28. UA_ATTRIBUTEID_NODECLASS = 2,
  29. UA_ATTRIBUTEID_BROWSENAME = 3,
  30. UA_ATTRIBUTEID_DISPLAYNAME = 4,
  31. UA_ATTRIBUTEID_DESCRIPTION = 5,
  32. UA_ATTRIBUTEID_WRITEMASK = 6,
  33. UA_ATTRIBUTEID_USERWRITEMASK = 7,
  34. UA_ATTRIBUTEID_ISABSTRACT = 8,
  35. UA_ATTRIBUTEID_SYMMETRIC = 9,
  36. UA_ATTRIBUTEID_INVERSENAME = 10,
  37. UA_ATTRIBUTEID_CONTAINSNOLOOPS = 11,
  38. UA_ATTRIBUTEID_EVENTNOTIFIER = 12,
  39. UA_ATTRIBUTEID_VALUE = 13,
  40. UA_ATTRIBUTEID_DATATYPE = 14,
  41. UA_ATTRIBUTEID_VALUERANK = 15,
  42. UA_ATTRIBUTEID_ARRAYDIMENSIONS = 16,
  43. UA_ATTRIBUTEID_ACCESSLEVEL = 17,
  44. UA_ATTRIBUTEID_USERACCESSLEVEL = 18,
  45. UA_ATTRIBUTEID_MINIMUMSAMPLINGINTERVAL = 19,
  46. UA_ATTRIBUTEID_HISTORIZING = 20,
  47. UA_ATTRIBUTEID_EXECUTABLE = 21,
  48. UA_ATTRIBUTEID_USEREXECUTABLE = 22
  49. } UA_AttributeId;
  50. /**
  51. * Access Level Masks
  52. * ------------------
  53. * The access level to a node is given by the following constants that are ANDed
  54. * with the overall access level. */
  55. #define UA_ACCESSLEVELMASK_READ (0x01<<0)
  56. #define UA_ACCESSLEVELMASK_WRITE (0x01<<1)
  57. #define UA_ACCESSLEVELMASK_HISTORYREAD (0x01<<2)
  58. #define UA_ACCESSLEVELMASK_HISTORYWRITE (0x01<<3)
  59. #define UA_ACCESSLEVELMASK_SEMANTICCHANGE (0x01<<4)
  60. #define UA_ACCESSLEVELMASK_STATUSWRITE (0x01<<5)
  61. #define UA_ACCESSLEVELMASK_TIMESTAMPWRITE (0x01<<6)
  62. /**
  63. * Write Masks
  64. * -----------
  65. * The write mask and user write mask is given by the following constants that
  66. * are ANDed for the overall write mask. Part 3: 5.2.7 Table 2 */
  67. #define UA_WRITEMASK_ACCESSLEVEL (0x01<<0)
  68. #define UA_WRITEMASK_ARRRAYDIMENSIONS (0x01<<1)
  69. #define UA_WRITEMASK_BROWSENAME (0x01<<2)
  70. #define UA_WRITEMASK_CONTAINSNOLOOPS (0x01<<3)
  71. #define UA_WRITEMASK_DATATYPE (0x01<<4)
  72. #define UA_WRITEMASK_DESCRIPTION (0x01<<5)
  73. #define UA_WRITEMASK_DISPLAYNAME (0x01<<6)
  74. #define UA_WRITEMASK_EVENTNOTIFIER (0x01<<7)
  75. #define UA_WRITEMASK_EXECUTABLE (0x01<<8)
  76. #define UA_WRITEMASK_HISTORIZING (0x01<<9)
  77. #define UA_WRITEMASK_INVERSENAME (0x01<<10)
  78. #define UA_WRITEMASK_ISABSTRACT (0x01<<11)
  79. #define UA_WRITEMASK_MINIMUMSAMPLINGINTERVAL (0x01<<12)
  80. #define UA_WRITEMASK_NODECLASS (0x01<<13)
  81. #define UA_WRITEMASK_NODEID (0x01<<14)
  82. #define UA_WRITEMASK_SYMMETRIC (0x01<<15)
  83. #define UA_WRITEMASK_USERACCESSLEVEL (0x01<<16)
  84. #define UA_WRITEMASK_USEREXECUTABLE (0x01<<17)
  85. #define UA_WRITEMASK_USERWRITEMASK (0x01<<18)
  86. #define UA_WRITEMASK_VALUERANK (0x01<<19)
  87. #define UA_WRITEMASK_WRITEMASK (0x01<<20)
  88. #define UA_WRITEMASK_VALUEFORVARIABLETYPE (0x01<<21)
  89. /**
  90. * ValueRanks
  91. * ----------
  92. * The following are the most common ValueRanks used for Variables,
  93. * VariableTypes and method arguments. ValueRanks higher than 3 are valid as
  94. * well (but less common). */
  95. #define UA_VALUERANK_SCALAR_OR_ONE_DIMENSION -3
  96. #define UA_VALUERANK_ANY -2
  97. #define UA_VALUERANK_SCALAR -1
  98. #define UA_VALUERANK_ONE_OR_MORE_DIMENSIONS 0
  99. #define UA_VALUERANK_ONE_DIMENSION 1
  100. #define UA_VALUERANK_TWO_DIMENSIONS 2
  101. #define UA_VALUERANK_THREE_DIMENSIONS 3
  102. _UA_END_DECLS
  103. #endif /* UA_CONSTANTS_H_ */