ua_services.h 8.5 KB

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