ua_services.h 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. #ifndef UA_SERVICES_H_
  2. #define UA_SERVICES_H_
  3. #include "ua_types.h"
  4. #include "ua_types_generated.h"
  5. #include "ua_server.h"
  6. /**
  7. * @defgroup services Services
  8. *
  9. * @brief This module describes all the services used to communicate in in OPC UA.
  10. *
  11. * @{
  12. */
  13. /**
  14. * @name Discovery Service Set
  15. *
  16. * This Service Set defines Services used to discover the Endpoints implemented
  17. * by a Server and to read the security configuration for those Endpoints.
  18. *
  19. * @{
  20. */
  21. // Service_FindServers
  22. /**
  23. * @brief This Service returns the Endpoints supported by a Server and all of
  24. * the configuration information required to establish a SecureChannel and a
  25. * Session.
  26. */
  27. UA_Int32 Service_GetEndpoints(UA_Server *server,
  28. const UA_GetEndpointsRequest *request,
  29. UA_GetEndpointsResponse *response);
  30. // Service_RegisterServer
  31. /** @} */
  32. /**
  33. * @name SecureChannel Service Set
  34. *
  35. * This Service Set defines Services used to open a communication channel that
  36. * ensures the confidentiality and Integrity of all Messages exchanged with the
  37. * Server.
  38. *
  39. * @{
  40. */
  41. /** @brief This Service is used to open or renew a SecureChannel that can be
  42. used to ensure Confidentiality and Integrity for Message exchange during a
  43. Session. */
  44. UA_Int32 Service_OpenSecureChannel(UA_Server *server, UA_Connection *connection,
  45. const UA_OpenSecureChannelRequest *request,
  46. UA_OpenSecureChannelResponse *response);
  47. /** @brief This Service is used to terminate a SecureChannel. */
  48. UA_Int32 Service_CloseSecureChannel(UA_Server *server, UA_SecureChannel *channel,
  49. const UA_CloseSecureChannelRequest *request,
  50. UA_CloseSecureChannelResponse *response);
  51. /** @} */
  52. /**
  53. * @name Session Service Set
  54. *
  55. * This Service Set defines Services for an application layer connection
  56. * establishment in the context of a Session.
  57. *
  58. * @{
  59. */
  60. /**
  61. * @brief This Service is used by an OPC UA Client to create a Session and the
  62. * Server returns two values which uniquely identify the Session. The first
  63. * value is the sessionId which is used to identify the Session in the audit
  64. * logs and in the Server’s address space. The second is the authenticationToken
  65. * which is used to associate an incoming request with a Session.
  66. */
  67. UA_Int32 Service_CreateSession(UA_Server *server, UA_SecureChannel *channel,
  68. const UA_CreateSessionRequest *request,
  69. UA_CreateSessionResponse *response);
  70. /**
  71. * @brief This Service is used by the Client to submit its SoftwareCertificates
  72. * to the Server for validation and to specify the identity of the user
  73. * associated with the Session. This Service request shall be issued by the
  74. * Client before it issues any other Service request after CreateSession.
  75. * Failure to do so shall cause the Server to close the Session.
  76. */
  77. UA_Int32 Service_ActivateSession(UA_Server *server, UA_Session *session,
  78. const UA_ActivateSessionRequest *request,
  79. UA_ActivateSessionResponse *response);
  80. /**
  81. * @brief This Service is used to terminate a Session.
  82. */
  83. UA_Int32 Service_CloseSession(UA_Server *server, UA_Session *session,
  84. const UA_CloseSessionRequest *request,
  85. UA_CloseSessionResponse *response);
  86. // Service_Cancel
  87. /** @} */
  88. /**
  89. * @name NodeManagement Service Set
  90. *
  91. * This Service Set defines Services to add and delete AddressSpace Nodes and References between
  92. * them. All added Nodes continue to exist in the AddressSpace even if the Client that created them
  93. * disconnects from the Server.
  94. *
  95. * @{
  96. */
  97. /**
  98. * @brief This Service is used to add one or more Nodes into the AddressSpace hierarchy.
  99. */
  100. UA_Int32 Service_AddNodes(UA_Server *server, UA_Session *session,
  101. const UA_AddNodesRequest *request, UA_AddNodesResponse *response);
  102. /**
  103. * @brief This Service is used to add one or more References to one or more Nodes
  104. */
  105. UA_Int32 Service_AddReferences(UA_Server *server, UA_Session *session,
  106. const UA_AddReferencesRequest *request,
  107. UA_AddReferencesResponse *response);
  108. // Service_DeleteNodes
  109. // Service_DeleteReferences
  110. /** @} */
  111. /**
  112. * @name View Service Set
  113. *
  114. * Clients use the browse Services of the View Service Set to navigate through
  115. * the AddressSpace or through a View which is a subset of the AddressSpace.
  116. *
  117. * @{
  118. */
  119. /**
  120. * @brief This Service is used to discover the References of a specified Node.
  121. * The browse can be further limited by the use of a View. This Browse Service
  122. * also supports a primitive filtering capability.
  123. */
  124. UA_Int32 Service_Browse(UA_Server *server, UA_Session *session,
  125. const UA_BrowseRequest *request, UA_BrowseResponse *response);
  126. /**
  127. * @brief This Service is used to translate textual node paths to their respective ids.
  128. */
  129. UA_Int32 Service_TranslateBrowsePathsToNodeIds(UA_Server *server, UA_Session *session,
  130. const UA_TranslateBrowsePathsToNodeIdsRequest *request,
  131. UA_TranslateBrowsePathsToNodeIdsResponse *response);
  132. // Service_BrowseNext
  133. // Service_TranslateBrowsePathsToNodeIds
  134. // Service_RegisterNodes
  135. // Service_UnregisterNodes
  136. /** @} */
  137. /* Part 4: 5.9 Query Service Set */
  138. /**
  139. * @name Query Service Set
  140. *
  141. * This Service Set is used to issue a Query to a Server. OPC UA Query is
  142. * generic in that it provides an underlying storage mechanism independent Query
  143. * capability that can be used to access a wide variety of OPC UA data stores
  144. * and information management systems. OPC UA Query permits a Client to access
  145. * data maintained by a Server without any knowledge of the logical schema used
  146. * for internal storage of the data. Knowledge of the AddressSpace is
  147. * sufficient.
  148. *
  149. * @{
  150. */
  151. // Service_QueryFirst
  152. // Service_QueryNext
  153. /** @} */
  154. /* Part 4: 5.10 Attribute Service Set */
  155. /**
  156. * @name Attribute Service Set
  157. *
  158. * This Service Set provides Services to access Attributes that are part of
  159. * Nodes.
  160. *
  161. * @{
  162. */
  163. /**
  164. * @brief This Service is used to read one or more Attributes of one or more
  165. * Nodes. For constructed Attribute values whose elements are indexed, such as
  166. * an array, this Service allows Clients to read the entire set of indexed
  167. * values as a composite, to read individual elements or to read ranges of
  168. * elements of the composite.
  169. */
  170. UA_Int32 Service_Read(UA_Server *server, UA_Session *session, const UA_ReadRequest *request,
  171. UA_ReadResponse *response);
  172. // Service_HistoryRead
  173. /**
  174. * @brief This Service is used to write one or more Attributes of one or more
  175. * Nodes. For constructed Attribute values whose elements are indexed, such as
  176. * an array, this Service allows Clients to write the entire set of indexed
  177. * values as a composite, to write individual elements or to write ranges of
  178. * elements of the composite.
  179. */
  180. UA_Int32 Service_Write(UA_Server *server, UA_Session *session, const UA_WriteRequest *request,
  181. UA_WriteResponse *response);
  182. // Service_HistoryUpdate
  183. /** @} */
  184. /**
  185. * @name Method Service Set
  186. *
  187. * The Method Service Set defines the means to invoke methods. A method shall be
  188. a component of an Object.
  189. *
  190. * @{
  191. */
  192. // Service_Call
  193. /** @} */
  194. /**
  195. * @name MonitoredItem Service Set
  196. *
  197. * Clients define MonitoredItems to subscribe to data and Events. Each
  198. * MonitoredItem identifies the item to be monitored and the Subscription to use
  199. * to send Notifications. The item to be monitored may be any Node Attribute.
  200. *
  201. * @{
  202. */
  203. /**
  204. * @brief This Service is used to create and add one or more MonitoredItems to a
  205. * Subscription. A MonitoredItem is deleted automatically by the Server when the
  206. * Subscription is deleted. Deleting a MonitoredItem causes its entire set of
  207. * triggered item links to be deleted, but has no effect on the MonitoredItems
  208. * referenced by the triggered items.
  209. */
  210. UA_Int32 Service_CreateMonitoredItems(UA_Server *server, UA_Session *session,
  211. const UA_CreateMonitoredItemsRequest *request,
  212. UA_CreateMonitoredItemsResponse *response);
  213. // Service_ModifyMonitoredItems
  214. // Service_SetMonitoringMode
  215. // Service_SetTriggering
  216. // Service_DeleteMonitoredItems
  217. /** @} */
  218. /**
  219. * @name Subscription Service Set
  220. *
  221. * Subscriptions are used to report Notifications to the Client.
  222. *
  223. * @{
  224. */
  225. // Service_CreateSubscription
  226. UA_Int32 Service_CreateSubscription(UA_Server *server, UA_Session *session,
  227. const UA_CreateSubscriptionRequest *request,
  228. UA_CreateSubscriptionResponse *response);
  229. // Service_ModifySubscription
  230. // Service_SetPublishingMode
  231. UA_Int32 Service_SetPublishingMode(UA_Server *server, UA_Session *session,
  232. const UA_SetPublishingModeRequest *request,
  233. UA_SetPublishingModeResponse *response);
  234. UA_Int32 Service_Publish(UA_Server *server, UA_Session *session,
  235. const UA_PublishRequest *request,
  236. UA_PublishResponse *response);
  237. // Service_Republish
  238. // Service_TransferSubscription
  239. // Service_DeleteSubscription
  240. /** @} */
  241. /** @} */ // end of group
  242. #endif