ua_services.h 9.1 KB

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