opcua_advancedDatatypes.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974
  1. /*
  2. * opcua_advancedDatatypes.h
  3. *
  4. * Created on: Jan 13, 2014
  5. * Author: opcua
  6. */
  7. #ifndef OPCUA_ADVANCEDDATATYPES_H_
  8. #define OPCUA_ADVANCEDDATATYPES_H_
  9. #include "opcua_builtInDatatypes.h"
  10. typedef struct AD_RawMessage_t AD_RawMessage;
  11. struct AD_RawMessage_t
  12. {
  13. char *message;
  14. UInt32 length;
  15. };
  16. enum BED_ApplicationType {SERVER_0, CLIENT_1, CLIENTANDSERVER_2, DISCOVERYSERVER_3};
  17. /**
  18. * ApplicationDescription
  19. * Part: 4
  20. * Chapter: 7.1
  21. * Page: 103
  22. */
  23. struct BED_ApplicationDescription
  24. {
  25. UA_String applicationUri;
  26. UA_String productUri;
  27. UA_LocalizedText applicationName;
  28. enum BED_ApplicationType applicationType;
  29. UA_String gatewayServerUri;
  30. UA_String discoveryProfileUri;
  31. UA_String discoverUrls[];
  32. };
  33. /**
  34. * ApplicationInstanceCertificate
  35. * Part: 4
  36. * Chapter: 7.2
  37. * Page: 104
  38. */
  39. struct BED_ApplicationInstanceCertificate
  40. {
  41. UA_String version;
  42. UA_ByteString serialNumber;
  43. UA_String signatureAlgorithm;
  44. UA_ByteString signature;
  45. //ToDo struct issuer //????????????? S. 108 table 104
  46. UA_DateTime validFrom;
  47. UA_DateTime valdiTo;
  48. //ToDo struct subject; //????????????? S. 108 table 104
  49. UA_String applicationUri;
  50. UA_String *hostnames;
  51. UA_ByteString pubicKey;
  52. UA_String keyUsage[];
  53. };
  54. /**
  55. * BrowseResult
  56. * Part: 4
  57. * Chapter: 7.3
  58. * Page: 104
  59. */
  60. struct BED_BrowseResult
  61. {
  62. UA_StatusCode statusCode;
  63. // struct BED_ContinuationPoint continuationPoint;
  64. // struct BED_ReferenceDescription references[];
  65. };
  66. /**
  67. * ContentFilter //ToDo
  68. * Part: 4
  69. * Chapter: 7.4.1
  70. * Page: 104
  71. */
  72. struct BED_ContentFilter
  73. {
  74. //ToDo struct BED_ContentFilterElement elements[]; //ToDo
  75. //ToDo enum BED_FilterOperand filterOperator; //ToDo table 110
  76. //ToDo struct BED_ExtensibleParamterFilterOperand filterOperands[]; //ToDo 7.4.4
  77. };
  78. /**
  79. * Counter
  80. * Part: 4
  81. * Chapter: 7.5
  82. * Page: 113
  83. */
  84. typedef UInt32 BED_Counter;
  85. /**
  86. * ContinuationPoint //ToDo
  87. * Part: 4
  88. * Chapter: 7.6
  89. * Page: 114
  90. */
  91. struct BED_ContinuationPoint
  92. {
  93. };
  94. /**
  95. * DataValue
  96. * Part: 4
  97. * Chapter: 7.7.1
  98. * Page: 114
  99. */
  100. struct BED_DataValue
  101. {
  102. UA_Variant value; // BaseDataType are mapped to a UA_Variant -> part: 6 chapter: 5.1.5 page: 14
  103. UA_StatusCode statusCode;
  104. UA_DateTime sourceTimestamp;
  105. //ToDo UInt //toBeDiscussed: Resolution of PicoSeconds
  106. UA_DateTime serverTimestamp;
  107. //ToDo UInt //toBeDiscussed: Resolution of PicoSeconds
  108. };
  109. /**
  110. * DiagnosticInfo
  111. * Part: 4
  112. * Chapter: 7.9*/
  113. struct BED_DiagnosticInfo
  114. {
  115. //ToDo struct ???? identifier; //ToDo: what kind of strcuture?
  116. Int32 namespaceUri;
  117. Int32 symbolicId;
  118. Int32 locale;
  119. Int32 localizesText;
  120. UA_String additionalInfo;
  121. UA_StatusCode innerStatusCode;
  122. struct BED_DiagnosticInfo *innerDiagnosticInfo;
  123. };
  124. /**
  125. * EndpointDescription
  126. * Part: 4
  127. * Chapter: 7.9
  128. * Page: 116
  129. */
  130. struct BED_EndpointDescription
  131. {
  132. UA_String endpointUrl;
  133. struct BED_ApplicationDescription server;
  134. struct BED_ApplicationInstanceCertificate serverCertificate;
  135. // enum BED_MessageSecurityMode securityMode;
  136. UA_String securityPolicyUri;
  137. // struct BED_UserTokenPolicy useridentyTokens[];
  138. UA_String transportProfileUri;
  139. Byte securtiyLevel;
  140. };
  141. /**
  142. * ExpandedNodeId
  143. * Part: 4
  144. * Chapter: 7.10
  145. * Page: 117
  146. */
  147. struct BED_ExpandedNodeId
  148. {
  149. // BED_Index serverIndex;
  150. UA_String namespaceUri;
  151. // BED_Index namespaveIndex;
  152. //ToDo enum BED_IdentifierType identiferType; //ToDo: Is the enumeration correct?
  153. //ToDo UA_NodeIdentifier identifier; //ToDo -> Part 3: Address Space Model
  154. };
  155. /**
  156. * ExtensibleParameter
  157. * Part: 4
  158. * Chapter: 7.11
  159. * Page: 117
  160. */
  161. struct BED_ExtensibleParameter
  162. {
  163. // struct UA_NodeId parameterTypeId;
  164. //ToDo -- parameterData; //toBeDiscussed
  165. };
  166. /**
  167. * Index
  168. * Part: 4
  169. * Chapter: 7.12
  170. * Page: 118
  171. */
  172. typedef UInt32 BED_Index;
  173. /**
  174. * IntegerId
  175. * Part: 4
  176. * Chapter: 7.13
  177. * Page: 118
  178. */
  179. typedef UInt32 BED_IntegerId;
  180. /**
  181. * MessageSecurityMode
  182. * Part: 4
  183. * Chapter: 7.14
  184. * Page: 118
  185. */
  186. enum BED_MessageSecurityMode
  187. {
  188. INVALID_0 = 0,
  189. SIGN_1 = 1,
  190. SIGNANDENCRYPT_2 = 2
  191. };
  192. /**
  193. * MonitoringParameters
  194. * Part: 4
  195. * Chapter: 7.15
  196. * Page: 118
  197. */
  198. struct BED_MonitoringParameters
  199. {
  200. BED_IntegerId clientHandle;
  201. //ToDo Duration???? samplingInterval; //ToDo
  202. //ToDo struct BED_ExtensibleParameterMonitoringFilter filter //ToDo
  203. BED_Counter queueSize;
  204. Boolean discardOldest;
  205. };
  206. //->ExtensibleParameter ->Part:4 Chapter:7.11 Page:117
  207. struct BED_ExtensibleParameterMonitoringFilter //ToDo: Ist die Umsetzung des ExtensibleParameter korrekt?
  208. {
  209. // enum BED_MonitoringFilter parameterTypeId;
  210. // struct BED_DataChangeFilter dataChangeFilter;
  211. // struct BED_EventFilter eventFilter;
  212. // struct BED_AggregateFilter aggregateFilter;
  213. };
  214. /**
  215. * MonitoringFilter parameterTypeIds
  216. * Part: 4
  217. * Chapter: 7.16.1
  218. * Page: 119
  219. */
  220. enum BED_MonitoringFilter
  221. {
  222. DATA_CHANGE_FILTER = 1,
  223. EVENT_FILTER = 2,
  224. AGGREGATE_FILTER = 3
  225. };
  226. /**
  227. * DataChangeFilter
  228. * Part: 4
  229. * Chapter: 7.16.2
  230. * Page: 119
  231. */
  232. struct BED_DataChangeFilter
  233. {
  234. //ToDo enum BED_MonitoringFilter trigger = BED_MonitoringFilter.DATA_CHANGE_FILTER;
  235. UInt32 deadbandType;
  236. Double deadbandValue;
  237. };
  238. /**
  239. * EventFilter
  240. * Part: 4
  241. * Chapter: 7.16.3
  242. * Page: 120
  243. */
  244. struct BED_EventFilter
  245. {
  246. //ToDo SimpleAttributeOperantd selectClauses[]; //ToDo
  247. //ToDo ContenFilter whereClause; //ToDo
  248. };
  249. struct BED_EventFilterResult
  250. {
  251. UA_StatusCode selectClauseResults[3];
  252. // struct UA_DiagnosticInfo selectClauseDiagnosticInfos[3];
  253. // struct BED_ContentFilterResult whereClauseResult;
  254. };
  255. /**
  256. * AggregateFilter
  257. * Part: 4
  258. * Chapter: 7.16.4
  259. * Page: 122
  260. */
  261. struct BED_AggregateFilter
  262. {
  263. UA_DateTime startTime;
  264. // struct UA_NodeId aggregateType;
  265. UA_Duration processingInterval;
  266. //ToDo AggregateConfiguration aggregateConfiguration; //ToDo
  267. Boolean useServerCapabilitiesDafaults;
  268. Boolean treatUncertainAsBad;
  269. Byte percentDataBad;
  270. Byte percentDataGood;
  271. Boolean steppedSlopedExtrapolation;
  272. };
  273. struct BED_AggregateFilterResult
  274. {
  275. UA_DateTime revisedStartTime;
  276. UA_Duration revisedProcessingInterval;
  277. };
  278. /**
  279. * MonitoringMode
  280. * Part: 4
  281. * Chapter: 7.17
  282. * Page: 123
  283. */
  284. enum BED_MonitoringModeValues
  285. {
  286. DISABLED_0 = 0, //The item being monitored is not sampled or evaluated, and Notifications are not generated or queued. Notification reporting is disabled.
  287. SAMPLING_1 = 1, //The item being monitored is sampled and evaluated, and Notifications are generated and queued. Notification reporting is disabled.
  288. REPORTING_2 = 2 //The item being monitored is sampled and evaluated, and Notifications are generated and queued. Notification reporting is enabled.
  289. };
  290. /**
  291. * NodeAttributes parameters
  292. * Part: 4
  293. * Chapter: 7.18.1
  294. * Page: 124
  295. */
  296. enum BED_NodeAttributesParamterTypeIds
  297. {
  298. ObjectAttributes, //Defines the Attributes for the Object NodeClass.
  299. VariableAttributes, //Defines the Attributes for the Variable NodeClass.
  300. MethodAttributes, //Defines the Attributes for the Method NodeClass.
  301. ObjectTypeAttributes, //Defines the Attributes for the ObjectType NodeClass.
  302. VariableTypeAttributes, //Defines the Attributes for the VariableType NodeClass.
  303. ReferenceTypeAttributes,//Defines the Attributes for the ReferenceType NodeClass.
  304. DataTypeAttributes, //Defines the Attributes for the DataType NodeClass.
  305. ViewAttributes //Defines the Attributes for the View NodeClass.
  306. };
  307. enum BED_NodeAttributesBitMask
  308. {
  309. AccessLevel = 1, //Bit: 0 Indicates if the AccessLevel Attribute is set.
  310. ArrayDimensions = 2, //Bit: 1 Indicates if the ArrayDimensions Attribute is set.
  311. //Reserved = 4, //Bit: 2 Reserved to be consistent with WriteMask defined in IEC 62541-3.
  312. ContainsNoLoops = 8, //Bit: 3 Indicates if the ContainsNoLoops Attribute is set.
  313. DataType = 16, //Bit: 4 Indicates if the DataType Attribute is set.
  314. Description = 32, //Bit: 5 Indicates if the Description Attribute is set.
  315. DisplayName = 64, //Bit: 6 Indicates if the DisplayName Attribute is set.
  316. EventNotifier = 128, //Bit: 7 Indicates if the EventNotifier Attribute is set.
  317. Executable = 256, //Bit: 8 Indicates if the Executable Attribute is set.
  318. Historizing = 512, //Bit: 9 Indicates if the Historizing Attribute is set.
  319. InverseName = 1024, //Bit:10 Indicates if the InverseName Attribute is set.
  320. IsAbstract = 2048, //Bit:11 Indicates if the IsAbstract Attribute is set.
  321. MinimumSamplingInterval = 4096, //Bit:12 Indicates if the MinimumSamplingInterval Attribute is set.
  322. //Reserved = 8192, //Bit:13 Reserved to be consistent with WriteMask defined in IEC 62541-3.
  323. //Reserved = 16384, //Bit:14 Reserved to be consistent with WriteMask defined in IEC 62541-3.
  324. Symmetric = 32768, //Bit:15 Indicates if the Symmetric Attribute is set.
  325. UserAccessLevel = 65536,//Bit:16 Indicates if the UserAccessLevel Attribute is set.
  326. UserExecutable = 131072,//Bit:17 Indicates if the UserExecutable Attribute is set.
  327. UserWriteMask = 262144, //Bit:18 Indicates if the UserWriteMask Attribute is set.
  328. ValueRank = 524288, //Bit:19 Indicates if the ValueRank Attribute is set.
  329. WriteMask = 1048576, //Bit:20 Indicates if the WriteMask Attribute is set.
  330. Value = 2097152 //Bit:21 Indicates if the Value Attribute is set.
  331. //Reserved //Bit:22:32 Reserved for future use. Shall always be zero.
  332. };
  333. /**
  334. * ObjectAttributes parameters
  335. * Part: 4
  336. * Chapter: 7.18.2
  337. * Page: 125
  338. */
  339. struct BED_ObjectAttributes
  340. {
  341. UInt32 specifiedAttribute; //BitMask corresponding to BED_NodeAttributesBitMask
  342. // struct UA_LocalizedText displayName;
  343. // struct UA_LocalizedText description;
  344. Byte eventNotifier;
  345. UInt32 writeMask;
  346. UInt32 userWriteMask;
  347. };
  348. /**
  349. * VariableAttributes parameters
  350. * Part: 4
  351. * Chapter: 7.18.3
  352. * Page: 125
  353. */
  354. struct BED_VariableAttributes
  355. {
  356. UInt32 specifiedAttributes; //BitMask corresponding to BED_NodeAttributesBitMask
  357. // struct UA_LocalizedText displayName;
  358. // struct UA_LocalizedText description;
  359. //ToDo DefinedByTheDataTypeAttribte??? value //ToDo
  360. // struct UA_NodeId dataType;
  361. Int32 valueRank;
  362. // UInt32 arrayDimensions[];
  363. Byte accessLevel;
  364. Byte userAccesLevel;
  365. //ToDo Duration???? minimumSamplingInterval; //ToDo
  366. Boolean historizing;
  367. UInt32 writeMask;
  368. UInt32 userWriteMask;
  369. };
  370. /**
  371. * MethodAttributes parameters
  372. * Part: 4
  373. * Chapter: 7.18.4
  374. * Page: 125
  375. */
  376. struct BED_MethodAttributes
  377. {
  378. UInt32 specifiedAttributes; //BitMask corresponding to BED_NodeAttributesBitMask
  379. // struct UA_LocalizedText displayName;
  380. // struct UA_LocalizedText description;
  381. Boolean executable;
  382. Boolean userExecutable;
  383. UInt32 writeMask;
  384. UInt32 userWriteMask;
  385. };
  386. /**
  387. * ObjectTypeAttributes parameters
  388. * Part: 4
  389. * Chapter: 7.18.5
  390. * Page: 125
  391. */
  392. struct BED_ObjectTypeAttributes
  393. {
  394. UInt32 specifiedAttributes; //BitMask corresponding to BED_NodeAttributesBitMask
  395. // struct UA_LocalizedText displayName;
  396. // struct UA_LocalizedText description;
  397. Boolean isAbstract;
  398. UInt32 wirteMask;
  399. UInt32 userWriteMask;
  400. };
  401. /**
  402. * VariableTypeAttributes parameters
  403. * Part: 4
  404. * Chapter: 7.18.6
  405. * Page: 126
  406. */
  407. struct BED_VariableTypeAttributes
  408. {
  409. UInt32 specifiedAttributes; //BitMask corresponding to BED_NodeAttributesBitMask
  410. // struct UA_LocalizedText displayName;
  411. // struct UA_LocalizedText description;
  412. //ToDo DefinedByTheDataTypeAttribte??? value //ToDo
  413. // struct UA_NodeId dataType;
  414. Int32 valueRank;
  415. // UInt32 arrayDimesions[];
  416. Boolean isAbstract;
  417. UInt32 writeMask;
  418. UInt32 userWriteMask;
  419. };
  420. /**
  421. * ReferenceTypeAttributes parameters
  422. * Part: 4
  423. * Chapter: 7.18.7
  424. * Page: 126
  425. */
  426. struct BED_ReferenceTypeAttributes
  427. {
  428. UInt32 specifiedAttributes; //BitMask corresponding to BED_NodeAttributesBitMask
  429. // struct UA_LocalizedText displayName;
  430. // struct UA_LocalizedText description;
  431. Boolean isAbstract;
  432. Boolean symmetric;
  433. // struct UA_LocalizedText inverseName;
  434. UInt32 writeMask;
  435. UInt32 userWriteMask;
  436. };
  437. /**
  438. * DataTypeAttributes parameters
  439. * Part: 4
  440. * Chapter: 7.18.8
  441. * Page: 126
  442. */
  443. struct BED_DataTypeAttributes
  444. {
  445. UInt32 specifiedAttributes; //BitMask corresponding to BED_NodeAttributesBitMask
  446. // struct UA_LocalizedText displayName;
  447. // struct UA_LocalizedText description;
  448. Boolean isAbstract;
  449. UInt32 writeMask;
  450. UInt32 userWriteMask;
  451. };
  452. /**
  453. * ViewAttributes parameters
  454. * Part: 4
  455. * Chapter: 7.18.9
  456. * Page: 127
  457. */
  458. struct BED_ViewAttributes
  459. {
  460. UInt32 specifiedAttributes; //BitMask corresponding to BED_NodeAttributesBitMask
  461. // struct UA_LocalizedText displayName;
  462. // struct UA_LocalizedText description;
  463. Boolean containsNoLoops;
  464. Byte eventNotifier;
  465. UInt32 writeMask;
  466. UInt32 userWriteMask;
  467. };
  468. /**
  469. * NotificationData parameters
  470. * Part: 4
  471. * Chapter: 7.19
  472. * Page: 127
  473. */
  474. enum BED_NotificationDataParameterTypeIds
  475. {
  476. DATA_CHANGE = 1,
  477. EVENT = 2,
  478. STATUS_CHANGE = 3
  479. };
  480. /**
  481. * DataChangeNotification parameter
  482. * Part: 4
  483. * Chapter: 7.19.2
  484. * Page: 127
  485. */
  486. struct BED_DataChangeNotification
  487. {
  488. //ToDo struct BED_MonitoredItemNotification monitoredItems[]; //ToDo
  489. BED_IntegerId clientHandle;
  490. // struct UA_DataValue value;
  491. UA_DiagnosticInfo diagnositcInfos[];
  492. };
  493. /**
  494. * EventNotificationList parameter
  495. * Part: 4
  496. * Chapter: 7.19.3
  497. * Page: 128
  498. */
  499. struct BED_EventNotificationList
  500. {
  501. //ToDo struct EventFieldList events[]; //ToDo
  502. BED_IntegerId clientHandle;
  503. UA_Variant eventFields[]; // BaseDataType are mapped to a UA_Variant -> part: 6 chapter: 5.1.5 page: 14
  504. };
  505. /**
  506. * StatusChangeNotification parameter
  507. * Part: 4
  508. * Chapter: 7.19.4
  509. * Page: 128
  510. */
  511. struct BED_StatusChangeNotification
  512. {
  513. UA_StatusCode status;
  514. // struct UA_DiagnosticInfo diagnosticInfo;
  515. };
  516. /**
  517. * NotificationMessage
  518. * Part: 4
  519. * Chapter: 7.20
  520. * Page: 129
  521. */
  522. struct BED_NotificationMessage
  523. {
  524. BED_Counter sequenceNumber;
  525. // struct UA_DateTime publishTime;
  526. // struct ExtensibleParameterNotificationData notificationData[];
  527. };
  528. //->ExtensibleParameter ->Part:4 Chapter:7.11 Page:117
  529. struct ExtensibleParameterNotificationData //ToDo: Ist die Umsetzung des ExtensibleParameter korrekt?
  530. {
  531. enum BED_NotificationDataParameterTypeIds parameterTypeId;
  532. struct BED_DataChangeNotification dataChange;
  533. struct BED_EventNotificationList event;
  534. struct BED_StatusChangeNotification statusChange;
  535. };
  536. /**
  537. * NumericRange
  538. * Part: 4
  539. * Chapter: 7.21
  540. * Page: 129
  541. */
  542. typedef UA_String NumericRange;
  543. /**
  544. * QueryDataSet
  545. * Part: 4
  546. * Chapter: 7.22
  547. * Page: 130
  548. */
  549. /*
  550. struct BED_QueryDataSet
  551. {
  552. // struct UA_ExpandedNodeId nodeId;
  553. // struct UA_ExpandedNodeId typeDefinitionNode;
  554. // struct UA_Variant values[]; // BaseDataType are mapped to a UA_Variant -> part: 6 chapter: 5.1.5 page: 14
  555. };
  556. */
  557. /**
  558. * ReadValueId
  559. * Part: 4
  560. * Chapter: 7.23
  561. * Page: 130
  562. */
  563. struct BED_QueryDataSet
  564. {
  565. // struct UA_NodeId nodeId;
  566. BED_IntegerId attributeId;
  567. // struct BED_NumericRange indexRange;
  568. // struct UA_QualifiedName dataEncoding;
  569. };
  570. /**
  571. * ReferenceDescription
  572. * Part: 4
  573. * Chapter: 7.24
  574. * Page: 131
  575. */
  576. struct BED_ReferenceDescription
  577. {
  578. // struct UA_NodeId referenceTypeId;
  579. Boolean isForward;
  580. // struct UA_ExpandedNodeId nodeId;
  581. // struct UA_QualifiedName browseName;
  582. // struct UA_LocalizedText displayName;
  583. //ToDo struct BED_NodeClass nodeClass; //ToDo
  584. // struct UA_ExpandedNodeId typeDefinition;
  585. };
  586. /**
  587. * RelativePath
  588. * Part: 4
  589. * Chapter: 7.25
  590. * Page: 131
  591. */
  592. struct BED_RelativePath
  593. {
  594. //ToDo struct BED_RelativePathElement elements[]; //ToDo
  595. // struct UA_NodeId referenceTypeId;
  596. Boolean isInverse;
  597. Boolean includeSubtypes;
  598. // struct UA_QualifiedName targetName;
  599. };
  600. /**
  601. * RequestHeader
  602. * Part: 4
  603. * Chapter: 7.26
  604. * Page: 132
  605. */
  606. struct BED_RequestHeader
  607. {
  608. UA_NodeId authenticationToken; //ToDo
  609. UA_DateTime timestamp;
  610. BED_IntegerId requestHandle;
  611. UInt32 returnDiagnostics;
  612. UA_String auditEntryId;
  613. UInt32 timeoutHint;
  614. UA_ExtensionObject additionalHeader;
  615. };
  616. enum BED_RequestReturnDiagnositcs
  617. {
  618. SERVICE_LEVEL_SYMBOLIC_ID = 1, //Hex 0x01
  619. SERVICE_LEVEL_LOCALIZED_TEXT= 2, //Hex 0x02
  620. SERVICE_LEVEL_ADDITIONAL_INFO = 4, //Hex 0x04
  621. SERVICE_LEVEL_INNER_STATUS_CODE = 8, //Hex 0x08
  622. SERVICE_LEVEL_INNER_DIAGNOSTICS = 16, //Hex 0x10
  623. OPERATION_LEVEL_SYMBOLIC_ID = 32, //Hex 0x20
  624. OPERATION_LEVEL_LOCALIZED_TEXT= 64, //Hex 0x40
  625. OPERATION_LEVEL_ADDITIONAL_INFO = 128, //Hex 0x80
  626. OPERATION_LEVEL_INNER_STATUS_CODE = 256, //Hex 0x100
  627. OPERATION_LEVEL_INNER_DIAGNOSTICS = 512 //Hex 0x200
  628. };
  629. /**
  630. * ResponseHeader
  631. * Part: 4
  632. * Chapter: 7.27
  633. * Page: 133
  634. */
  635. struct BED_ResponseHeader
  636. {
  637. UA_DateTime timestamp;
  638. BED_IntegerId requestHandle;
  639. UA_StatusCode serviceResult;
  640. UA_DiagnosticInfo *serviceDiagnostics;
  641. UA_String stringTable[];
  642. //ToDo struct BED_ExtensibleParameterAdditionalHeader additionalHeader; //ToDo
  643. };
  644. /**
  645. * ServiceFault
  646. * Part: 4
  647. * Chapter: 7.28
  648. * Page: 133
  649. */
  650. struct BED_ServiceFault
  651. {
  652. struct BED_ResponseHeader responseHeader;
  653. };
  654. //ToDo: Own DataType with typeDef?
  655. /**
  656. * SessionAuthenticationToken
  657. * Part: 4
  658. * Chapter: 7.29
  659. * Page: 133
  660. */
  661. /**
  662. * SignatureData
  663. * Part: 4
  664. * Chapter: 7.30
  665. * Page: 135
  666. */
  667. struct BED_SignatureData
  668. {
  669. UA_ByteString signature;
  670. UA_String agorithm;
  671. };
  672. /**
  673. * SignedSoftwareCertificate
  674. * Part: 4
  675. * Chapter: 7.31
  676. * Page: 135
  677. */
  678. struct BED_SignedSoftwareCertificate
  679. {
  680. UA_String version;
  681. UA_ByteString serialNumber;
  682. UA_String signatureAlgorithm;
  683. UA_ByteString signature;
  684. //ToDo struct issuer //ToDo: ??? struct?
  685. UA_DateTime validFrom;
  686. UA_DateTime validTo;
  687. //ToDo struct subject; //ToDo: ??? struct?
  688. //ToDo struct subjectAltName[]; //ToDo: ??? struct?
  689. UA_ByteString publicKey;
  690. // UA_String keyUsage[];
  691. UA_ByteString softwareCertificate;
  692. };
  693. /**
  694. * SoftwareCertificate
  695. * Part: 4
  696. * Chapter: 7.32
  697. * Page: 135
  698. */
  699. struct BED_SoftwareCertificate
  700. {
  701. UA_String productName;
  702. UA_String productUri;
  703. UA_String vendorName;
  704. UA_ByteString vendorProductCertificate;
  705. UA_String softwareVersion;
  706. UA_String buildNumber;
  707. UA_DateTime buildDate;
  708. UA_String issuedBy;
  709. UA_DateTime issueDate;
  710. // UA_ByteString vendorProductCertificate;
  711. // struct BED_SupportedProfiles supportedProfiles;
  712. };
  713. struct BED_SupportedProfiles
  714. {
  715. UA_String oranizationUri;
  716. UA_String profileId;
  717. UA_String complianceTool;
  718. UA_DateTime complianceDate;
  719. // enum BED_ComplianceLevel complianceLevel;
  720. UA_String unsupportedUnitIds[];
  721. };
  722. enum BED_ComplianceLevel
  723. {
  724. UNTESTED_0 = 0, //the profiled capability has not been tested successfully.
  725. PARTIAL_1 = 1, //the profiled capability has been partially tested and has
  726. //passed critical tests, as defined by the certifying authority.
  727. SELFTESTED_2 = 2, //the profiled capability has been successfully tested using a
  728. //self-test system authorized by the certifying authority.
  729. CERTIFIED_3 = 3 //the profiled capability has been successfully tested by a
  730. //testing organisation authorized by the certifying authority.
  731. };
  732. /**
  733. * StatusCode //ToDo: Do we need them? How do we implement them (enum)?
  734. * Part: 4
  735. * Chapter: 7.33
  736. * Page: 136
  737. */
  738. /**
  739. * TimestampsToReturn
  740. * Part: 4
  741. * Chapter: 7.34
  742. * Page: 140
  743. */
  744. enum BED_TimestampsToReturn
  745. {
  746. SOURCE_0 = 1, //Return the source timestamp.
  747. //If used in HistoryRead the source timestamp is used to determine which historical data values are returned.
  748. SERVER_1 = 1, //Return the Server timestamp.
  749. //If used in HistoryRead the Server timestamp is used to determine which historical data values are returned.
  750. BOTH_2 = 2, //Return both the source and Server timestamps.
  751. //If used in HistoryRead the source timestamp is used to determine which historical data values are returned.
  752. NEITHER_3 = 3 //Return neither timestamp.
  753. //This is the default value for MonitoredItems if a Variable value is not being accessed.
  754. //For HistoryRead this is not a valid setting.
  755. };
  756. /**
  757. * UserIdentityToken Encrypted Token Format
  758. * Part: 4
  759. * Chapter: 7.35.1
  760. * Page: 140
  761. */
  762. struct BED_UserIdentityTokenEncryptedTokenFormat
  763. {
  764. Byte length[4];
  765. // Byte tokenData[];
  766. // Byte serverNonce[];
  767. };
  768. /**
  769. * AnonymousIdentityToken
  770. * Part: 4
  771. * Chapter: 7.35.2
  772. * Page: 141
  773. */
  774. struct BED_AnonymousIdentityToken
  775. {
  776. UA_String policyId;
  777. };
  778. /**
  779. * UserNameIdentityToken
  780. * Part: 4
  781. * Chapter: 7.35.3
  782. * Page: 141
  783. */
  784. struct BED_UserNameIdentityToken
  785. {
  786. UA_String policyId;
  787. UA_String userName;
  788. UA_ByteString password;
  789. UA_String encryptionAlogrithm;
  790. };
  791. /**
  792. * X509IdentityTokens
  793. * Part: 4
  794. * Chapter: 7.35.4
  795. * Page: 141
  796. */
  797. struct BED_X509IdentityTokens
  798. {
  799. UA_String policyId;
  800. UA_ByteString certificateData;
  801. };
  802. /**
  803. * IssuedIdentityToken
  804. * Part: 4
  805. * Chapter: 7.35.5
  806. * Page: 142
  807. */
  808. struct BED_IssuedIdentityToken
  809. {
  810. UA_String policyId;
  811. UA_ByteString tokenData;
  812. UA_String encryptionAlgorithm;
  813. };
  814. enum BED_UserIdentityTokenType
  815. {
  816. ANONYMOUS_0 = 0,
  817. USERNAME_1 = 1,
  818. CERTIFICATE_2 = 2,
  819. ISSUEDTOKEN_3 = 3
  820. };
  821. /**
  822. * UserTokenPolicy
  823. * Part: 4
  824. * Chapter: 7.36
  825. * Page: 142
  826. */
  827. struct BED_UserTokenPolicy
  828. {
  829. UA_String policyId;
  830. enum BED_UserIdentityTokenType tokenType;
  831. UA_String issuedTokenType;
  832. UA_String issuerEndpointUrl;
  833. UA_String securityPolicyUri;
  834. };
  835. /**
  836. * ViewDescription
  837. * Part: 4
  838. * Chapter: 7.37
  839. * Page: 143
  840. */
  841. struct BED_ViewDescription
  842. {
  843. // struct UA_NodeId viewId;
  844. UA_DateTime timestamp;
  845. UInt32 viewVersion;
  846. };
  847. #endif /* OPCUA_ADVANCEDDATATYPES_H_ */