ua_services.h 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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. // Service_UnregisterNodes
  123. /** @} */
  124. /**
  125. * @name Query Service Set
  126. *
  127. * This Service Set is used to issue a Query to a Server. OPC UA Query is
  128. * generic in that it provides an underlying storage mechanism independent Query
  129. * capability that can be used to access a wide variety of OPC UA data stores
  130. * and information management systems. OPC UA Query permits a Client to access
  131. * data maintained by a Server without any knowledge of the logical schema used
  132. * for internal storage of the data. Knowledge of the AddressSpace is
  133. * sufficient.
  134. *
  135. * @{
  136. */
  137. // Service_QueryFirst
  138. // Service_QueryNext
  139. /** @} */
  140. /**
  141. * @name Attribute Service Set
  142. *
  143. * This Service Set provides Services to access Attributes that are part of
  144. * Nodes.
  145. *
  146. * @{
  147. */
  148. /**
  149. * Used to read one or more Attributes of one or more Nodes. For constructed
  150. * Attribute values whose elements are indexed, such as an array, this Service
  151. * allows Clients to read the entire set of indexed values as a composite, to
  152. * read individual elements or to read ranges of elements of the composite.
  153. */
  154. void Service_Read(UA_Server *server, UA_Session *session, const UA_ReadRequest *request, UA_ReadResponse *response);
  155. // Service_HistoryRead
  156. /**
  157. * Used to write one or more Attributes of one or more Nodes. For constructed
  158. * Attribute values whose elements are indexed, such as an array, this Service
  159. * allows Clients to write the entire set of indexed values as a composite, to
  160. * write individual elements or to write ranges of elements of the composite.
  161. */
  162. void Service_Write(UA_Server *server, UA_Session *session, const UA_WriteRequest *request, UA_WriteResponse *response);
  163. // Service_HistoryUpdate
  164. /** @} */
  165. /**
  166. * @name Method Service Set
  167. *
  168. * The Method Service Set defines the means to invoke methods. A method shall be
  169. * a component of an Object.
  170. *
  171. * @{
  172. */
  173. // Service_Call
  174. /** @} */
  175. /**
  176. * @name MonitoredItem Service Set
  177. *
  178. * Clients define MonitoredItems to subscribe to data and Events. Each
  179. * MonitoredItem identifies the item to be monitored and the Subscription to use
  180. * to send Notifications. The item to be monitored may be any Node Attribute.
  181. *
  182. * @{
  183. */
  184. /*
  185. * Used to create and add one or more MonitoredItems to a Subscription. A
  186. * MonitoredItem is deleted automatically by the Server when the Subscription is
  187. * deleted. Deleting a MonitoredItem causes its entire set of triggered item
  188. * links to be deleted, but has no effect on the MonitoredItems referenced by
  189. * the triggered items.
  190. */
  191. /* UA_Int32 Service_CreateMonitoredItems(UA_Server *server, UA_Session *session, */
  192. /* const UA_CreateMonitoredItemsRequest *request, */
  193. /* UA_CreateMonitoredItemsResponse *response); */
  194. // Service_ModifyMonitoredItems
  195. // Service_SetMonitoringMode
  196. // Service_SetTriggering
  197. // Service_DeleteMonitoredItems
  198. /** @} */
  199. /**
  200. * @name Subscription Service Set
  201. *
  202. * Subscriptions are used to report Notifications to the Client.
  203. *
  204. * @{
  205. */
  206. // Service_CreateSubscription
  207. /* UA_Int32 Service_CreateSubscription(UA_Server *server, UA_Session *session, */
  208. /* const UA_CreateSubscriptionRequest *request, */
  209. /* UA_CreateSubscriptionResponse *response); */
  210. // Service_ModifySubscription
  211. // Service_SetPublishingMode
  212. /* UA_Int32 Service_SetPublishingMode(UA_Server *server, UA_Session *session, */
  213. /* const UA_SetPublishingModeRequest *request, */
  214. /* UA_SetPublishingModeResponse *response); */
  215. /* UA_Int32 Service_Publish(UA_Server *server, UA_Session *session, */
  216. /* const UA_PublishRequest *request, */
  217. /* UA_PublishResponse *response); */
  218. // Service_Republish
  219. // Service_TransferSubscription
  220. // Service_DeleteSubscription
  221. /** @} */
  222. /** @} */
  223. #endif /* UA_SERVICES_H_ */