opcua_types.h 22 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048
  1. /*
  2. * opcua_types.h
  3. *
  4. * Created on: Jan 07, 2014
  5. * Author: opcua
  6. */
  7. #ifndef OPCUA_TYPES_H_
  8. #define OPCUA_TYPES_H_
  9. #include "opcua_builtInDatatypes.h"
  10. typedef enum
  11. {
  12. ApplicationType_SERVER_0,
  13. ApplicationType_CLIENUA_1,
  14. ApplicationType_CLIENTANDSERVER_2,
  15. ApplicationType_DISCOVERYSERVER_3
  16. }
  17. UA_AD_ApplicationType;
  18. /**
  19. * Index
  20. * Part: 4
  21. * Chapter: 7.12
  22. * Page: 118
  23. */
  24. typedef UA_UInt32 UA_AD_Index;
  25. /**
  26. * IntegerId
  27. * Part: 4
  28. * Chapter: 7.13
  29. * Page: 118
  30. */
  31. typedef UA_UInt32 UA_AD_IntegerId;
  32. /**
  33. * ApplicationDescription
  34. * Part: 4
  35. * Chapter: 7.1
  36. * Page: 103
  37. */
  38. typedef struct
  39. {
  40. UA_String applicationUri;
  41. UA_String productUri;
  42. UA_LocalizedText applicationName;
  43. UA_AD_ApplicationType applicationType;
  44. UA_String gatewayServerUri;
  45. UA_String discoveryProfileUri;
  46. UInt16 noOfDiscoerUrls;
  47. UA_String* discoverUrls;
  48. }
  49. UA_AD_ApplicationDescription;
  50. /**
  51. * ApplicationInstanceCertificate
  52. * Part: 4
  53. * Chapter: 7.2
  54. * Page: 104
  55. */
  56. typedef struct
  57. {
  58. UA_String version;
  59. UA_ByteString serialNumber;
  60. UA_String signatureAlgorithm;
  61. UA_ByteString signature;
  62. //ToDo struct issuer //????????????? S. 108 table 104
  63. UA_DateTime validFrom;
  64. UA_DateTime valdiTo;
  65. //ToDo struct subject; //????????????? S. 108 table 104
  66. UA_String applicationUri;
  67. UInt16 noOfHostnames;
  68. UA_String* hostnames;
  69. UA_ByteString pubicKey;
  70. UInt16 noOfKeyUsages;
  71. UA_String* keyUsage;
  72. }
  73. UA_AD_ApplicationInstanceCertificate;
  74. /**
  75. * ContinuationPoint //ToDo
  76. * Part: 4
  77. * Chapter: 7.6
  78. * Page: 114
  79. */
  80. typedef struct UA_AD_ContinuationPoint
  81. {
  82. }
  83. UA_AD_ContinuationPoint;
  84. /**
  85. * ReferenceDescription
  86. * Part: 4
  87. * Chapter: 7.24
  88. * Page: 131
  89. */
  90. typedef struct
  91. {
  92. UA_NodeId referenceTypeId;
  93. Boolean isForward;
  94. UA_ExpandedNodeId nodeId;
  95. UA_QualifiedName browseName;
  96. UA_LocalizedText displayName;
  97. //ToDo UA_NodeClass nodeClass; //ToDo
  98. UA_ExpandedNodeId typeDefinition;
  99. }
  100. UA_AD_ReferenceDescription;
  101. /**
  102. * BrowseResult
  103. * Part: 4
  104. * Chapter: 7.3
  105. * Page: 104
  106. */
  107. typedef struct
  108. {
  109. UA_StatusCode statusCode;
  110. UA_AD_ContinuationPoint continuationPoint;
  111. UInt16 noOfReferences;
  112. UA_AD_ReferenceDescription *references;
  113. }
  114. UA_AD_BrowseResult;
  115. /**
  116. * Counter
  117. * Part: 4
  118. * Chapter: 7.5
  119. * Page: 113
  120. */
  121. typedef UA_UInt32 UA_Counter;
  122. /**
  123. * DataValue
  124. * Part: 4
  125. * Chapter: 7.7.1
  126. * Page: 114
  127. */
  128. typedef struct UA_AD_DataValue
  129. {
  130. UA_Variant value; // BaseDataType are mapped to a UA_Variant -> part: 6 chapter: 5.1.5 page: 14
  131. UA_StatusCode statusCode;
  132. UA_DateTime sourceTimestamp;
  133. //ToDo UInt //toBeDiscussed: Resolution of PicoSeconds
  134. UA_DateTime serverTimestamp;
  135. //ToDo UInt //toBeDiscussed: Resolution of PicoSeconds
  136. }UA_AD_DataValue;
  137. /**
  138. * DiagnosticInfo
  139. * Part: 4
  140. * Chapter: 7.9
  141. * Page: 116
  142. */
  143. typedef struct
  144. {
  145. //ToDo struct ???? identifier; identifier is only needed for encoding????
  146. Int32 namespaceUri;
  147. Int32 symbolicId;
  148. Int32 locale;
  149. Int32 localizesText;
  150. UA_String additionalInfo;
  151. UA_StatusCode innerStatusCode;
  152. struct _UA_DiagnosticInfo* innerDiagnosticInfo;
  153. }
  154. UA_AD_DiagnosticInfo;
  155. /**
  156. * MessageSecurityMode
  157. * Part: 4
  158. * Chapter: 7.14
  159. * Page: 118
  160. */
  161. typedef enum
  162. {
  163. MessageSecurityMode_INVALID_0 = 0,
  164. MessageSecurityMode_SIGN_1 = 1,
  165. MessageSecurityMode_SIGNANDENCRYPUA_2 = 2
  166. }
  167. UA_AD_MessageSecurityMode;
  168. /**
  169. * UserTokenPolicy
  170. * Part: 4
  171. * Chapter: 7.36
  172. * Page: 142
  173. */
  174. typedef struct
  175. {
  176. UA_String policyId;
  177. //ToDo UA_UserIdentityTokenType tokenType;
  178. UA_String issuedTokenType;
  179. UA_String issuerEndpointUrl;
  180. UA_String securityPolicyUri;
  181. }
  182. UA_AD_UserTokenPolicy;
  183. /**
  184. * EndpointDescription
  185. * Part: 4
  186. * Chapter: 7.9
  187. * Page: 116
  188. */
  189. typedef struct
  190. {
  191. UA_String endpointUrl;
  192. UA_AD_ApplicationDescription server;
  193. UA_AD_ApplicationInstanceCertificate serverCertificate;
  194. UA_AD_MessageSecurityMode securityMode;
  195. UA_String securityPolicyUri;
  196. UInt16 noOfUserIdentyTokens;
  197. UA_AD_UserTokenPolicy* useridentyTokens;
  198. UA_String transportProfileUri;
  199. UA_Byte securtiyLevel;
  200. }
  201. UA_AD_EndpointDescription;
  202. /**
  203. * ExpandedNodeId
  204. * Part: 4
  205. * Chapter: 7.10
  206. * Page: 117
  207. */
  208. typedef struct
  209. {
  210. UA_AD_Index serverIndex;
  211. UA_String namespaceUri;
  212. UA_AD_Index namespaveIndex;
  213. //ToDo enum BED_IdentifierType identiferType; //ToDo: Is the enumeration correct?
  214. //ToDo UA_NodeIdentifier identifier; //ToDo -> Part 3: Address Space Model
  215. }
  216. UA_AD_ExpandedNodeId;
  217. /**
  218. * ExtensibleParameter
  219. * Part: 4
  220. * Chapter: 7.11
  221. * Page: 117
  222. */
  223. typedef struct
  224. {
  225. UA_NodeId parameterTypeId;
  226. //ToDo -- parameterData; //toBeDiscussed
  227. }
  228. UA_AD_ExtensibleParameter;
  229. /**
  230. * DataChangeFilter
  231. * Part: 4
  232. * Chapter: 7.16.2
  233. * Page: 119
  234. */
  235. typedef struct
  236. {
  237. //ToDo enum BED_MonitoringFilter trigger = BED_MonitoringFilter.DATA_CHANGE_FILTER;
  238. UA_UInt32 deadbandType;
  239. UA_Double deadbandValue;
  240. }
  241. UA_AD_DataChangeFilter;
  242. /**
  243. * ContentFilter //ToDo
  244. * Part: 4
  245. * Chapter: 7.4.1
  246. * Page: 104
  247. */
  248. typedef struct
  249. {
  250. //ToDo struct BED_ContentFilterElement elements[]; //ToDo
  251. //ToDo enum BED_FilterOperand filterOperator; //ToDo table 110
  252. //ToDo struct BED_ExtensibleParamterFilterOperand filterOperands[]; //ToDo 7.4.4
  253. }
  254. UA_AD_ContentFilter;
  255. /**
  256. * EventFilter
  257. * Part: 4
  258. * Chapter: 7.16.3
  259. * Page: 120
  260. */
  261. typedef struct
  262. {
  263. //ToDo SimpleAttributeOperantd selectClauses[]; //ToDo
  264. //ToDo ContenFilter whereClause; //ToDo
  265. }
  266. UA_AD_EventFilter;
  267. typedef struct
  268. {
  269. UA_StatusCode selectClauseResults[3];
  270. UA_DiagnosticInfo selectClauseDiagnosticInfos[3];
  271. //ToDo UA_ContentFilterResult whereClauseResult;
  272. }
  273. UA_AD_EventFilterResult;
  274. /**
  275. * AggregateFilter
  276. * Part: 4
  277. * Chapter: 7.16.4
  278. * Page: 122
  279. */
  280. typedef struct
  281. {
  282. UA_DateTime startTime;
  283. UA_NodeId aggregateType;
  284. UA_Duration processingInterval;
  285. //ToDo AggregateConfiguration aggregateConfiguration; //ToDo
  286. Boolean useServerCapabilitiesDafaults;
  287. Boolean treatUncertainAsBad;
  288. UA_Byte percentDataBad;
  289. UA_Byte percentDataGood;
  290. Boolean steppedSlopedExtrapolation;
  291. }
  292. UA_AD_AggregateFilter;
  293. typedef struct
  294. {
  295. UA_DateTime revisedStartTime;
  296. UA_Duration revisedProcessingInterval;
  297. }
  298. UA_AD_AggregateFilterResult;
  299. /**
  300. * MonitoringParameters
  301. * Part: 4
  302. * Chapter: 7.15
  303. * Page: 118
  304. */
  305. typedef struct
  306. {
  307. UA_AD_IntegerId clientHandle;
  308. //ToDo Duration???? samplingInterval; //ToDo
  309. //ToDo struct BED_ExtensibleParameterMonitoringFilter filter //ToDo
  310. UA_Counter queueSize;
  311. Boolean discardOldest;
  312. }
  313. UA_AD_MonitoringParameters;
  314. //->ExtensibleParameter ->Part:4 Chapter:7.11 Page:117
  315. typedef struct //ToDo: Ist die Umsetzung des ExtensibleParameter korrekt?
  316. {
  317. //ToDo UA_MonitoringFilter parameterTypeId;
  318. UA_AD_DataChangeFilter dataChangeFilter;
  319. UA_AD_EventFilter eventFilter;
  320. UA_AD_AggregateFilter aggregateFilter;
  321. }
  322. UA_AD_ExtensibleParameterMonitoringFilter;
  323. /**
  324. * MonitoringFilter parameterTypeIds
  325. * Part: 4
  326. * Chapter: 7.16.1
  327. * Page: 119
  328. */
  329. typedef enum
  330. {
  331. MonitoringFilter_DATA_CHANGE_FILTER = 1,
  332. MonitoringFilter_EVENUA_FILTER = 2,
  333. MonitoringFilter_AGGREGATE_FILTER = 3
  334. }
  335. UA_AD_MonitoringFilter;
  336. /**
  337. * MonitoringMode
  338. * Part: 4
  339. * Chapter: 7.17
  340. * Page: 123
  341. */
  342. typedef enum
  343. {
  344. MonitoringModeValues_DISABLED_0 = 0, //The item being monitored is not sampled or evaluated, and Notifications are not generated or queued. Notification reporting is disabled.
  345. MonitoringModeValues_SAMPLING_1 = 1, //The item being monitored is sampled and evaluated, and Notifications are generated and queued. Notification reporting is disabled.
  346. MonitoringModeValues_REPORTING_2 = 2 //The item being monitored is sampled and evaluated, and Notifications are generated and queued. Notification reporting is enabled.
  347. }
  348. UA_AD_MonitoringModeValues;
  349. /**
  350. * NodeAttributes parameters
  351. * Part: 4
  352. * Chapter: 7.18.1
  353. * Page: 124
  354. */
  355. typedef enum
  356. {
  357. NodeAttributesParamterTypeIds_ObjectAttributes, //Defines the Attributes for the Object NodeClass.
  358. NodeAttributesParamterTypeIds_VariableAttributes, //Defines the Attributes for the Variable NodeClass.
  359. NodeAttributesParamterTypeIds_MethodAttributes, //Defines the Attributes for the Method NodeClass.
  360. NodeAttributesParamterTypeIds_ObjectTypeAttributes, //Defines the Attributes for the ObjectType NodeClass.
  361. NodeAttributesParamterTypeIds_VariableTypeAttributes, //Defines the Attributes for the VariableType NodeClass.
  362. NodeAttributesParamterTypeIds_ReferenceTypeAttributes,//Defines the Attributes for the ReferenceType NodeClass.
  363. NodeAttributesParamterTypeIds_DataTypeAttributes, //Defines the Attributes for the DataType NodeClass.
  364. NodeAttributesParamterTypeIds_ViewAttributes //Defines the Attributes for the View NodeClass.
  365. }
  366. UA_AD_NodeAttributesParamterTypeIds;
  367. typedef enum
  368. {
  369. NodeAttributesBitMask_AccessLevel = 1, //Bit: 0 Indicates if the AccessLevel Attribute is set.
  370. NodeAttributesBitMask_ArrayDimensions = 2, //Bit: 1 Indicates if the ArrayDimensions Attribute is set.
  371. //Reserved = 4, //Bit: 2 Reserved to be consistent with WriteMask defined in IEC 62541-3.
  372. NodeAttributesBitMask_ContainsNoLoops = 8, //Bit: 3 Indicates if the ContainsNoLoops Attribute is set.
  373. NodeAttributesBitMask_DataType = 16, //Bit: 4 Indicates if the DataType Attribute is set.
  374. NodeAttributesBitMask_Description = 32, //Bit: 5 Indicates if the Description Attribute is set.
  375. NodeAttributesBitMask_DisplayName = 64, //Bit: 6 Indicates if the DisplayName Attribute is set.
  376. NodeAttributesBitMask_EventNotifier = 128, //Bit: 7 Indicates if the EventNotifier Attribute is set.
  377. NodeAttributesBitMask_Executable = 256, //Bit: 8 Indicates if the Executable Attribute is set.
  378. NodeAttributesBitMask_Historizing = 512, //Bit: 9 Indicates if the Historizing Attribute is set.
  379. NodeAttributesBitMask_InverseName = 1024, //Bit:10 Indicates if the InverseName Attribute is set.
  380. NodeAttributesBitMask_IsAbstract = 2048, //Bit:11 Indicates if the IsAbstract Attribute is set.
  381. NodeAttributesBitMask_MinimumSamplingInterval = 4096, //Bit:12 Indicates if the MinimumSamplingInterval Attribute is set.
  382. //Reserved = 8192, //Bit:13 Reserved to be consistent with WriteMask defined in IEC 62541-3.
  383. //Reserved = 16384, //Bit:14 Reserved to be consistent with WriteMask defined in IEC 62541-3.
  384. NodeAttributesBitMask_Symmetric = 32768, //Bit:15 Indicates if the Symmetric Attribute is set.
  385. NodeAttributesBitMask_UserAccessLevel = 65536,//Bit:16 Indicates if the UserAccessLevel Attribute is set.
  386. NodeAttributesBitMask_UserExecutable = 131072,//Bit:17 Indicates if the UserExecutable Attribute is set.
  387. NodeAttributesBitMask_UserWriteMask = 262144, //Bit:18 Indicates if the UserWriteMask Attribute is set.
  388. NodeAttributesBitMask_ValueRank = 524288, //Bit:19 Indicates if the ValueRank Attribute is set.
  389. NodeAttributesBitMask_WriteMask = 1048576, //Bit:20 Indicates if the WriteMask Attribute is set.
  390. NodeAttributesBitMask_Value = 2097152 //Bit:21 Indicates if the Value Attribute is set.
  391. //Reserved //Bit:22:32 Reserved for future use. Shall always be zero.
  392. }
  393. UA_AD_NodeAttributesBitMask;
  394. /**
  395. * ObjectAttributes parameters
  396. * Part: 4
  397. * Chapter: 7.18.2
  398. * Page: 125
  399. */
  400. typedef struct
  401. {
  402. UA_UInt32 specifiedAttribute; //BitMask corresponding to BED_NodeAttributesBitMask
  403. UA_LocalizedText displayName;
  404. UA_LocalizedText description;
  405. UA_Byte eventNotifier;
  406. UA_UInt32 writeMask;
  407. UA_UInt32 userWriteMask;
  408. }
  409. UA_AD_ObjectAttributes;
  410. /**
  411. * VariableAttributes parameters
  412. * Part: 4
  413. * Chapter: 7.18.3
  414. * Page: 125
  415. */
  416. typedef struct
  417. {
  418. UA_UInt32 specifiedAttributes; //BitMask corresponding to BED_NodeAttributesBitMask
  419. UA_LocalizedText displayName;
  420. UA_LocalizedText description;
  421. //ToDo DefinedByTheDataTypeAttribte??? value //ToDo
  422. UA_NodeId dataType;
  423. Int32 valueRank;
  424. UInt16 noOfArrayDimensions;
  425. UA_UInt32* arrayDimensions;
  426. UA_Byte accessLevel;
  427. UA_Byte userAccesLevel;
  428. //ToDo Duration???? minimumSamplingInterval; //ToDo
  429. Boolean historizing;
  430. UA_UInt32 writeMask;
  431. UA_UInt32 userWriteMask;
  432. }
  433. UA_AD_VariableAttributes;
  434. /**
  435. * MethodAttributes parameters
  436. * Part: 4
  437. * Chapter: 7.18.4
  438. * Page: 125
  439. */
  440. typedef struct
  441. {
  442. UA_UInt32 specifiedAttributes; //BitMask corresponding to BED_NodeAttributesBitMask
  443. UA_LocalizedText displayName;
  444. UA_LocalizedText description;
  445. Boolean executable;
  446. Boolean userExecutable;
  447. UA_UInt32 writeMask;
  448. UA_UInt32 userWriteMask;
  449. }
  450. UA_AD_MethodAttributes;
  451. /**
  452. * ObjectTypeAttributes parameters
  453. * Part: 4
  454. * Chapter: 7.18.5
  455. * Page: 125
  456. */
  457. typedef struct
  458. {
  459. UA_UInt32 specifiedAttributes; //BitMask corresponding to BED_NodeAttributesBitMask
  460. UA_LocalizedText displayName;
  461. UA_LocalizedText description;
  462. Boolean isAbstract;
  463. UA_UInt32 wirteMask;
  464. UA_UInt32 userWriteMask;
  465. }
  466. UA_AD_ObjectTypeAttributes;
  467. /**
  468. * VariableTypeAttributes parameters
  469. * Part: 4
  470. * Chapter: 7.18.6
  471. * Page: 126
  472. */
  473. typedef struct
  474. {
  475. UA_UInt32 specifiedAttributes; //BitMask corresponding to BED_NodeAttributesBitMask
  476. UA_LocalizedText displayName;
  477. UA_LocalizedText description;
  478. //ToDo DefinedByTheDataTypeAttribte??? value //ToDo
  479. UA_NodeId dataType;
  480. Int32 valueRank;
  481. UInt16 noOfArrayDimensions;
  482. UA_UInt32* arrayDimesions;
  483. Boolean isAbstract;
  484. UA_UInt32 writeMask;
  485. UA_UInt32 userWriteMask;
  486. }
  487. UA_AD_VariableTypeAttributes;
  488. /**
  489. * ReferenceTypeAttributes parameters
  490. * Part: 4
  491. * Chapter: 7.18.7
  492. * Page: 126
  493. */
  494. typedef struct
  495. {
  496. UA_UInt32 specifiedAttributes; //BitMask corresponding to BED_NodeAttributesBitMask
  497. UA_LocalizedText displayName;
  498. UA_LocalizedText description;
  499. Boolean isAbstract;
  500. Boolean symmetric;
  501. UA_LocalizedText inverseName;
  502. UA_UInt32 writeMask;
  503. UA_UInt32 userWriteMask;
  504. }
  505. UA_AD_ReferenceTypeAttributes;
  506. /**
  507. * DataTypeAttributes parameters
  508. * Part: 4
  509. * Chapter: 7.18.8
  510. * Page: 126
  511. */
  512. typedef struct
  513. {
  514. UA_UInt32 specifiedAttributes; //BitMask corresponding to BED_NodeAttributesBitMask
  515. UA_LocalizedText displayName;
  516. UA_LocalizedText description;
  517. Boolean isAbstract;
  518. UA_UInt32 writeMask;
  519. UA_UInt32 userWriteMask;
  520. }
  521. UA_AD_DataTypeAttributes;
  522. /**
  523. * ViewAttributes parameters
  524. * Part: 4
  525. * Chapter: 7.18.9
  526. * Page: 127
  527. */
  528. typedef struct
  529. {
  530. UA_UInt32 specifiedAttributes; //BitMask corresponding to BED_NodeAttributesBitMask
  531. UA_LocalizedText displayName;
  532. UA_LocalizedText description;
  533. Boolean containsNoLoops;
  534. UA_Byte eventNotifier;
  535. UA_UInt32 writeMask;
  536. UA_UInt32 userWriteMask;
  537. }
  538. UA_AD_ViewAttributes;
  539. /**
  540. * NotificationData parameters
  541. * Part: 4
  542. * Chapter: 7.19
  543. * Page: 127
  544. */
  545. typedef enum
  546. {
  547. NotificationDataParameterTypeIds_DATA_CHANGE = 1,
  548. NotificationDataParameterTypeIds_EVENT = 2,
  549. NotificationDataParameterTypeIds_STATUS_CHANGE = 3
  550. }
  551. UA_AD_NotificationDataParameterTypeIds;
  552. /**
  553. * DataChangeNotification parameter
  554. * Part: 4
  555. * Chapter: 7.19.2
  556. * Page: 127
  557. */
  558. typedef struct UA_DataChangeNotification
  559. {
  560. //ToDo struct BED_MonitoredItemNotification monitoredItems[]; //ToDo
  561. UA_AD_IntegerId clientHandle;
  562. UA_DataValue value;
  563. UInt16 noOfdiagnosticInfos;
  564. UA_DiagnosticInfo* diagnosticInfos;
  565. }
  566. UA_AD_DataChangeNotification;
  567. /**
  568. * EventNotificationList parameter
  569. * Part: 4
  570. * Chapter: 7.19.3
  571. * Page: 128
  572. */
  573. typedef struct
  574. {
  575. //ToDo struct EventFieldList events[]; //ToDo
  576. UA_AD_IntegerId clientHandle;
  577. UInt16 noOfEventFields;
  578. UA_Variant* eventFields; // BaseDataType are mapped to a UA_Variant -> part: 6 chapter: 5.1.5 page: 14
  579. }
  580. UA_AD_EventNotificationList;
  581. /**
  582. * StatusChangeNotification parameter
  583. * Part: 4
  584. * Chapter: 7.19.4
  585. * Page: 128
  586. */
  587. typedef struct
  588. {
  589. UA_StatusCode status;
  590. UA_DiagnosticInfo diagnosticInfo;
  591. }
  592. UA_AD_StatusChangeNotification;
  593. /**
  594. * NotificationMessage
  595. * Part: 4
  596. * Chapter: 7.20
  597. * Page: 129
  598. */
  599. //->ExtensibleParameter ->Part:4 Chapter:7.11 Page:117
  600. typedef struct //ToDo: Ist die Umsetzung des ExtensibleParameter korrekt?
  601. {
  602. UA_AD_NotificationDataParameterTypeIds parameterTypeId;
  603. UA_AD_DataChangeNotification dataChange;
  604. UA_AD_EventNotificationList event;
  605. UA_AD_StatusChangeNotification statusChange;
  606. }
  607. UA_AD_ExtensibleParameterNotificationData;
  608. typedef struct
  609. {
  610. UA_Counter sequenceNumber;
  611. UA_DateTime publishTime;
  612. UInt16 noOfNotificationData;
  613. UA_AD_ExtensibleParameterNotificationData* notificationData;
  614. }
  615. UA_AD_NotificationMessage;
  616. /**
  617. * NumericRange
  618. * Part: 4
  619. * Chapter: 7.21
  620. * Page: 129
  621. */
  622. typedef UA_String UA_NumericRange;
  623. /**
  624. * QueryDataSet
  625. * Part: 4
  626. * Chapter: 7.22
  627. * Page: 130
  628. */
  629. typedef struct
  630. {
  631. UA_ExpandedNodeId nodeId;
  632. UA_ExpandedNodeId typeDefinitionNode;
  633. UInt16 noOfValues;
  634. UA_Variant* values; // BaseDataType are mapped to a UA_Variant -> part: 6 chapter: 5.1.5 page: 14
  635. }
  636. UA_AD_QueryDataSet;
  637. /**
  638. * ReadValueId
  639. * Part: 4
  640. * Chapter: 7.23
  641. * Page: 130
  642. */
  643. typedef struct
  644. {
  645. UA_NodeId nodeId;
  646. UA_AD_IntegerId attributeId;
  647. UA_NumericRange indexRange;
  648. UA_QualifiedName dataEncoding;
  649. }
  650. UA_AD_ReadValueId;
  651. /**
  652. * RelativePath
  653. * Part: 4
  654. * Chapter: 7.25
  655. * Page: 131
  656. */
  657. typedef struct
  658. {
  659. //ToDo struct BED_RelativePathElement elements[]; //ToDo
  660. UA_NodeId referenceTypeId;
  661. Boolean isInverse;
  662. Boolean includeSubtypes;
  663. UA_QualifiedName targetName;
  664. }
  665. UA_AD_RelativePath;
  666. /**
  667. * RequestHeader
  668. * Part: 4
  669. * Chapter: 7.26
  670. * Page: 132
  671. */
  672. typedef struct
  673. {
  674. UA_NodeId authenticationToken;
  675. UA_DateTime timestamp;
  676. UA_AD_IntegerId requestHandle;
  677. UA_UInt32 returnDiagnostics;
  678. UA_String auditEntryId;
  679. UA_UInt32 timeoutHint;
  680. UA_ExtensionObject additionalHeader;
  681. }
  682. UA_AD_RequestHeader;
  683. typedef enum
  684. {
  685. RequestReturnDiagnositcs_SERVICE_LEVEL_SYMBOLIC_ID = 1, //Hex 0x01
  686. RequestReturnDiagnositcs_SERVICE_LEVEL_LOCALIZED_TEXT= 2, //Hex 0x02
  687. RequestReturnDiagnositcs_SERVICE_LEVEL_ADDITIONAL_INFO = 4, //Hex 0x04
  688. RequestReturnDiagnositcs_SERVICE_LEVEL_INNER_STATUS_CODE = 8, //Hex 0x08
  689. RequestReturnDiagnositcs_SERVICE_LEVEL_INNER_DIAGNOSTICS = 16, //Hex 0x10
  690. RequestReturnDiagnositcs_OPERATION_LEVEL_SYMBOLIC_ID = 32, //Hex 0x20
  691. RequestReturnDiagnositcs_OPERATION_LEVEL_LOCALIZED_TEXT= 64, //Hex 0x40
  692. RequestReturnDiagnositcs_OPERATION_LEVEL_ADDITIONAL_INFO = 128, //Hex 0x80
  693. RequestReturnDiagnositcs_OPERATION_LEVEL_INNER_STATUS_CODE = 256, //Hex 0x100
  694. RequestReturnDiagnositcs_OPERATION_LEVEL_INNER_DIAGNOSTICS = 512 //Hex 0x200
  695. }
  696. UA_AD_RequestReturnDiagnositcs;
  697. /**
  698. * ResponseHeader
  699. * Part: 4
  700. * Chapter: 7.27
  701. * Page: 133
  702. */
  703. typedef struct UA_AD_ResponseHeader
  704. {
  705. UA_DateTime timestamp;
  706. UA_AD_IntegerId requestHandle;
  707. UA_StatusCode serviceResult;
  708. UA_DiagnosticInfo *serviceDiagnostics;
  709. Int16 noOfStringTable; // Unsigned: -1 == Empty Array
  710. UA_String** stringTable; // this is an array of strings, i.e. String** or String* ... []
  711. UA_ExtensionObject *additionalHeader;
  712. }
  713. UA_AD_ResponseHeader;
  714. /**
  715. * ServiceFault
  716. * Part: 4
  717. * Chapter: 7.28
  718. * Page: 133
  719. */
  720. typedef struct
  721. {
  722. UA_AD_ResponseHeader responseHeader;
  723. }
  724. UA_AD_ServiceFault;
  725. //ToDo: Own DataType with typeDef?
  726. /**
  727. * SessionAuthenticationToken
  728. * Part: 4
  729. * Chapter: 7.29
  730. * Page: 133
  731. */
  732. /**
  733. * SignatureData
  734. * Part: 4
  735. * Chapter: 7.30
  736. * Page: 135
  737. */
  738. typedef struct
  739. {
  740. UA_ByteString signature;
  741. UA_String agorithm;
  742. }
  743. UA_AD_SignatureData;
  744. /**
  745. * SignedSoftwareCertificate
  746. * Part: 4
  747. * Chapter: 7.31
  748. * Page: 135
  749. */
  750. typedef struct
  751. {
  752. UA_String version;
  753. UA_ByteString serialNumber;
  754. UA_String signatureAlgorithm;
  755. UA_ByteString signature;
  756. //ToDo struct issuer //ToDo: ??? struct?
  757. UA_DateTime validFrom;
  758. UA_DateTime validTo;
  759. //ToDo struct subject; //ToDo: ??? struct?
  760. //ToDo struct subjectAltName[]; //ToDo: ??? struct?
  761. UA_ByteString publicKey;
  762. UInt16 noOfKeyUsage;
  763. UA_String* keyUsage;
  764. UA_ByteString softwareCertificate;
  765. }
  766. UA_AD_SignedSoftwareCertificate;
  767. /**
  768. * SoftwareCertificate
  769. * Part: 4
  770. * Chapter: 7.32
  771. * Page: 135
  772. */
  773. typedef enum
  774. {
  775. ComplianceLevel_UNTESTED_0 = 0, //the profiled capability has not been tested successfully.
  776. ComplianceLevel_PARTIAL_1 = 1, //the profiled capability has been partially tested and has
  777. //passed critical tests, as defined by the certifying authority.
  778. ComplianceLevel_SELFTESTED_2 = 2, //the profiled capability has been successfully tested using a
  779. //self-test system authorized by the certifying authority.
  780. ComplianceLevel_CERTIFIED_3 = 3 //the profiled capability has been successfully tested by a
  781. //testing organisation authorized by the certifying authority.
  782. }
  783. UA_AD_ComplianceLevel;
  784. typedef struct
  785. {
  786. UA_String oranizationUri;
  787. UA_String profileId;
  788. UA_String complianceTool;
  789. UA_DateTime complianceDate;
  790. UA_AD_ComplianceLevel complianceLevel;
  791. UInt16 noOfUnsupportedUnitIds;
  792. UA_String* unsupportedUnitIds;
  793. }
  794. UA_AD_SupportedProfiles;
  795. typedef struct
  796. {
  797. UA_String productName;
  798. UA_String productUri;
  799. UA_String vendorName;
  800. UA_ByteString vendorProductCertificate;
  801. UA_String softwareVersion;
  802. UA_String buildNumber;
  803. UA_DateTime buildDate;
  804. UA_String issuedBy;
  805. UA_DateTime issueDate;
  806. //ToDo UA_ByteString vendorProductCertificate; //Name is double in this struct
  807. UA_AD_SupportedProfiles supportedProfiles;
  808. }
  809. UA_AD_SoftwareCertificate;
  810. /**
  811. * StatusCode //ToDo: Do we need them? How do we implement them (enum)?
  812. * Part: 4
  813. * Chapter: 7.33
  814. * Page: 136
  815. */
  816. /**
  817. * TimestampsToReturn
  818. * Part: 4
  819. * Chapter: 7.34
  820. * Page: 140
  821. */
  822. typedef enum
  823. {
  824. TimestampsToReturn_SOURCE_0 = 1, //Return the source timestamp.
  825. //If used in HistoryRead the source timestamp is used to determine which historical data values are returned.
  826. TimestampsToReturn_SERVER_1 = 1, //Return the Server timestamp.
  827. //If used in HistoryRead the Server timestamp is used to determine which historical data values are returned.
  828. TimestampsToReturn_BOTH_2 = 2, //Return both the source and Server timestamps.
  829. //If used in HistoryRead the source timestamp is used to determine which historical data values are returned.
  830. TimestampsToReturn_NEITHER_3 = 3 //Return neither timestamp.
  831. //This is the default value for MonitoredItems if a Variable value is not being accessed.
  832. //For HistoryRead this is not a valid setting.
  833. }
  834. UA_AD_TimestampsToReturn;
  835. /**
  836. * UserIdentityToken Encrypted Token Format
  837. * Part: 4
  838. * Chapter: 7.35.1
  839. * Page: 140
  840. */
  841. typedef struct
  842. {
  843. UA_Byte length[4];
  844. UInt16 noOfTokenData;
  845. UA_Byte* tokenData;
  846. UInt16 noOfServerNonce;
  847. UA_Byte* serverNonce;
  848. }
  849. UA_AD_UserIdentityTokenEncryptedTokenFormat;
  850. /**
  851. * AnonymousIdentityToken
  852. * Part: 4
  853. * Chapter: 7.35.2
  854. * Page: 141
  855. */
  856. typedef struct
  857. {
  858. UA_String policyId;
  859. }
  860. UA_AD_AnonymousIdentityToken;
  861. /**
  862. * UserNameIdentityToken
  863. * Part: 4
  864. * Chapter: 7.35.3
  865. * Page: 141
  866. */
  867. typedef struct
  868. {
  869. UA_String policyId;
  870. UA_String userName;
  871. UA_ByteString password;
  872. UA_String encryptionAlogrithm;
  873. }
  874. UA_AD_UserNameIdentityToken;
  875. /**
  876. * X509IdentityTokens
  877. * Part: 4
  878. * Chapter: 7.35.4
  879. * Page: 141
  880. */
  881. typedef struct
  882. {
  883. UA_String policyId;
  884. UA_ByteString certificateData;
  885. }
  886. UA_AD_X509IdentityTokens;
  887. /**
  888. * IssuedIdentityToken
  889. * Part: 4
  890. * Chapter: 7.35.5
  891. * Page: 142
  892. */
  893. typedef struct
  894. {
  895. UA_String policyId;
  896. UA_ByteString tokenData;
  897. UA_String encryptionAlgorithm;
  898. }
  899. UA_AD_IssuedIdentityToken;
  900. /**
  901. * ViewDescription
  902. * Part: 4
  903. * Chapter: 7.37
  904. * Page: 143
  905. */
  906. typedef struct
  907. {
  908. UA_NodeId viewId;
  909. UA_DateTime timestamp;
  910. UA_UInt32 viewVersion;
  911. }
  912. UA_AD_ViewDescription;
  913. #endif /* OPCUA_TYPES_H_ */