ua_services.h 9.4 KB

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