ua_services.h 10 KB

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