ua_client.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  4. *
  5. * Copyright 2015-2017 (c) Julius Pfrommer, Fraunhofer IOSB
  6. * Copyright 2015-2016 (c) Sten Grüner
  7. * Copyright 2015-2016 (c) Chris Iatrou
  8. * Copyright 2015-2017 (c) Florian Palm
  9. * Copyright 2015 (c) Holger Jeromin
  10. * Copyright 2015 (c) Oleksiy Vasylyev
  11. * Copyright 2017 (c) Stefan Profanter, fortiss GmbH
  12. * Copyright 2017 (c) Mark Giraud, Fraunhofer IOSB
  13. * Copyright 2018 (c) Thomas Stalder
  14. */
  15. #ifndef UA_CLIENT_H_
  16. #define UA_CLIENT_H_
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. #include "ua_types.h"
  21. #include "ua_types_generated.h"
  22. #include "ua_types_generated_handling.h"
  23. #include "ua_plugin_network.h"
  24. #include "ua_plugin_log.h"
  25. /**
  26. * .. _client:
  27. *
  28. * Client
  29. * ======
  30. *
  31. * The client implementation allows remote access to all OPC UA services. For
  32. * convenience, some functionality has been wrapped in :ref:`high-level
  33. * abstractions <client-highlevel>`.
  34. *
  35. * **However**: At this time, the client does not yet contain its own thread or
  36. * event-driven main-loop. So the client will not perform any actions
  37. * automatically in the background. This is especially relevant for
  38. * subscriptions. The user will have to periodically call
  39. * `UA_Client_Subscriptions_manuallySendPublishRequest`. See also :ref:`here
  40. * <client-subscriptions>`.
  41. *
  42. * Client Lifecycle
  43. * ---------------- */
  44. typedef enum {
  45. UA_CLIENTSTATE_DISCONNECTED, /* The client is disconnected */
  46. UA_CLIENTSTATE_CONNECTED, /* A TCP connection to the server is open */
  47. UA_CLIENTSTATE_SECURECHANNEL, /* A SecureChannel to the server is open */
  48. UA_CLIENTSTATE_SESSION, /* A session with the server is open */
  49. UA_CLIENTSTATE_SESSION_RENEWED /* A session with the server is open (renewed) */
  50. } UA_ClientState;
  51. struct UA_Client;
  52. typedef struct UA_Client UA_Client;
  53. /**
  54. * Client Lifecycle callback
  55. * ------------------------- */
  56. typedef void (*UA_ClientStateCallback)(UA_Client *client, UA_ClientState clientState);
  57. /**
  58. * Client Configuration
  59. * -------------------- */
  60. typedef struct UA_ClientConfig {
  61. UA_UInt32 timeout; /* Sync response timeout in ms */
  62. UA_UInt32 secureChannelLifeTime; /* Lifetime in ms (then the channel needs
  63. to be renewed) */
  64. UA_Logger logger;
  65. UA_ConnectionConfig localConnectionConfig;
  66. UA_ConnectClientConnection connectionFunc;
  67. /* Custom DataTypes */
  68. size_t customDataTypesSize;
  69. const UA_DataType *customDataTypes;
  70. /* Callback function */
  71. UA_ClientStateCallback stateCallback;
  72. void *clientContext;
  73. /* PublishResponse Timeout for background async process in ms */
  74. /* 0 = time out disabled */
  75. UA_UInt32 backgroundPublishResponseTimeout;
  76. /* number of PublishResponse standing in the sever */
  77. /* 0 = background task disabled */
  78. UA_UInt16 outStandingPublishRequests;
  79. } UA_ClientConfig;
  80. /* Create a new client */
  81. UA_Client UA_EXPORT *
  82. UA_Client_new(UA_ClientConfig config);
  83. /* Get the client connection status */
  84. UA_ClientState UA_EXPORT
  85. UA_Client_getState(UA_Client *client);
  86. /* Get the client context */
  87. void UA_EXPORT *
  88. UA_Client_getContext(UA_Client *client);
  89. /* Reset a client */
  90. void UA_EXPORT
  91. UA_Client_reset(UA_Client *client);
  92. /* Delete a client */
  93. void UA_EXPORT
  94. UA_Client_delete(UA_Client *client);
  95. /**
  96. * Connect to a Server
  97. * ------------------- */
  98. /* Connect to the server
  99. *
  100. * @param client to use
  101. * @param endpointURL to connect (for example "opc.tcp://localhost:16664")
  102. * @return Indicates whether the operation succeeded or returns an error code */
  103. UA_StatusCode UA_EXPORT
  104. UA_Client_connect(UA_Client *client, const char *endpointUrl);
  105. /* Connect to the selected server with the given username and password
  106. *
  107. * @param client to use
  108. * @param endpointURL to connect (for example "opc.tcp://localhost:16664")
  109. * @param username
  110. * @param password
  111. * @return Indicates whether the operation succeeded or returns an error code */
  112. UA_StatusCode UA_EXPORT
  113. UA_Client_connect_username(UA_Client *client, const char *endpointUrl,
  114. const char *username, const char *password);
  115. /* Disconnect and close a connection to the selected server */
  116. UA_StatusCode UA_EXPORT
  117. UA_Client_disconnect(UA_Client *client);
  118. /* Close a connection to the selected server */
  119. UA_StatusCode UA_EXPORT
  120. UA_Client_close(UA_Client *client);
  121. /* Renew the underlying secure channel */
  122. UA_StatusCode UA_EXPORT
  123. UA_Client_manuallyRenewSecureChannel(UA_Client *client);
  124. /**
  125. * Discovery
  126. * --------- */
  127. /* Gets a list of endpoints of a server
  128. *
  129. * @param client to use. Must be connected to the same endpoint given in
  130. * serverUrl or otherwise in disconnected state.
  131. * @param serverUrl url to connect (for example "opc.tcp://localhost:16664")
  132. * @param endpointDescriptionsSize size of the array of endpoint descriptions
  133. * @param endpointDescriptions array of endpoint descriptions that is allocated
  134. * by the function (you need to free manually)
  135. * @return Indicates whether the operation succeeded or returns an error code */
  136. UA_StatusCode UA_EXPORT
  137. UA_Client_getEndpoints(UA_Client *client, const char *serverUrl,
  138. size_t* endpointDescriptionsSize,
  139. UA_EndpointDescription** endpointDescriptions);
  140. /* Gets a list of all registered servers at the given server.
  141. *
  142. * You can pass an optional filter for serverUris. If the given server is not registered,
  143. * an empty array will be returned. If the server is registered, only that application
  144. * description will be returned.
  145. *
  146. * Additionally you can optionally indicate which locale you want for the server name
  147. * in the returned application description. The array indicates the order of preference.
  148. * A server may have localized names.
  149. *
  150. * @param client to use. Must be connected to the same endpoint given in
  151. * serverUrl or otherwise in disconnected state.
  152. * @param serverUrl url to connect (for example "opc.tcp://localhost:16664")
  153. * @param serverUrisSize Optional filter for specific server uris
  154. * @param serverUris Optional filter for specific server uris
  155. * @param localeIdsSize Optional indication which locale you prefer
  156. * @param localeIds Optional indication which locale you prefer
  157. * @param registeredServersSize size of returned array, i.e., number of found/registered servers
  158. * @param registeredServers array containing found/registered servers
  159. * @return Indicates whether the operation succeeded or returns an error code */
  160. UA_StatusCode UA_EXPORT
  161. UA_Client_findServers(UA_Client *client, const char *serverUrl,
  162. size_t serverUrisSize, UA_String *serverUris,
  163. size_t localeIdsSize, UA_String *localeIds,
  164. size_t *registeredServersSize,
  165. UA_ApplicationDescription **registeredServers);
  166. /* Get a list of all known server in the network. Only supported by LDS servers.
  167. *
  168. * @param client to use. Must be connected to the same endpoint given in
  169. * serverUrl or otherwise in disconnected state.
  170. * @param serverUrl url to connect (for example "opc.tcp://localhost:16664")
  171. * @param startingRecordId optional. Only return the records with an ID higher
  172. * or equal the given. Can be used for pagination to only get a subset of
  173. * the full list
  174. * @param maxRecordsToReturn optional. Only return this number of records
  175. * @param serverCapabilityFilterSize optional. Filter the returned list to only
  176. * get servers with given capabilities, e.g. "LDS"
  177. * @param serverCapabilityFilter optional. Filter the returned list to only get
  178. * servers with given capabilities, e.g. "LDS"
  179. * @param serverOnNetworkSize size of returned array, i.e., number of
  180. * known/registered servers
  181. * @param serverOnNetwork array containing known/registered servers
  182. * @return Indicates whether the operation succeeded or returns an error code */
  183. UA_StatusCode UA_EXPORT
  184. UA_Client_findServersOnNetwork(UA_Client *client, const char *serverUrl,
  185. UA_UInt32 startingRecordId, UA_UInt32 maxRecordsToReturn,
  186. size_t serverCapabilityFilterSize, UA_String *serverCapabilityFilter,
  187. size_t *serverOnNetworkSize, UA_ServerOnNetwork **serverOnNetwork);
  188. /**
  189. * .. _client-services:
  190. *
  191. * Services
  192. * --------
  193. * The raw OPC UA services are exposed to the client. But most of them time, it
  194. * is better to use the convenience functions from ``ua_client_highlevel.h``
  195. * that wrap the raw services. */
  196. /* Don't use this function. Use the type versions below instead. */
  197. void UA_EXPORT
  198. __UA_Client_Service(UA_Client *client, const void *request,
  199. const UA_DataType *requestType, void *response,
  200. const UA_DataType *responseType);
  201. /**
  202. * Attribute Service Set
  203. * ^^^^^^^^^^^^^^^^^^^^^ */
  204. static UA_INLINE UA_ReadResponse
  205. UA_Client_Service_read(UA_Client *client, const UA_ReadRequest request) {
  206. UA_ReadResponse response;
  207. __UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_READREQUEST],
  208. &response, &UA_TYPES[UA_TYPES_READRESPONSE]);
  209. return response;
  210. }
  211. static UA_INLINE UA_WriteResponse
  212. UA_Client_Service_write(UA_Client *client, const UA_WriteRequest request) {
  213. UA_WriteResponse response;
  214. __UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_WRITEREQUEST],
  215. &response, &UA_TYPES[UA_TYPES_WRITERESPONSE]);
  216. return response;
  217. }
  218. /**
  219. * Method Service Set
  220. * ^^^^^^^^^^^^^^^^^^ */
  221. #ifdef UA_ENABLE_METHODCALLS
  222. static UA_INLINE UA_CallResponse
  223. UA_Client_Service_call(UA_Client *client, const UA_CallRequest request) {
  224. UA_CallResponse response;
  225. __UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_CALLREQUEST],
  226. &response, &UA_TYPES[UA_TYPES_CALLRESPONSE]);
  227. return response;
  228. }
  229. #endif
  230. /**
  231. * NodeManagement Service Set
  232. * ^^^^^^^^^^^^^^^^^^^^^^^^^^ */
  233. static UA_INLINE UA_AddNodesResponse
  234. UA_Client_Service_addNodes(UA_Client *client, const UA_AddNodesRequest request) {
  235. UA_AddNodesResponse response;
  236. __UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_ADDNODESREQUEST],
  237. &response, &UA_TYPES[UA_TYPES_ADDNODESRESPONSE]);
  238. return response;
  239. }
  240. static UA_INLINE UA_AddReferencesResponse
  241. UA_Client_Service_addReferences(UA_Client *client,
  242. const UA_AddReferencesRequest request) {
  243. UA_AddReferencesResponse response;
  244. __UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_ADDREFERENCESREQUEST],
  245. &response, &UA_TYPES[UA_TYPES_ADDREFERENCESRESPONSE]);
  246. return response;
  247. }
  248. static UA_INLINE UA_DeleteNodesResponse
  249. UA_Client_Service_deleteNodes(UA_Client *client,
  250. const UA_DeleteNodesRequest request) {
  251. UA_DeleteNodesResponse response;
  252. __UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_DELETENODESREQUEST],
  253. &response, &UA_TYPES[UA_TYPES_DELETENODESRESPONSE]);
  254. return response;
  255. }
  256. static UA_INLINE UA_DeleteReferencesResponse
  257. UA_Client_Service_deleteReferences(UA_Client *client,
  258. const UA_DeleteReferencesRequest request) {
  259. UA_DeleteReferencesResponse response;
  260. __UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_DELETEREFERENCESREQUEST],
  261. &response, &UA_TYPES[UA_TYPES_DELETEREFERENCESRESPONSE]);
  262. return response;
  263. }
  264. /**
  265. * View Service Set
  266. * ^^^^^^^^^^^^^^^^ */
  267. static UA_INLINE UA_BrowseResponse
  268. UA_Client_Service_browse(UA_Client *client, const UA_BrowseRequest request) {
  269. UA_BrowseResponse response;
  270. __UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_BROWSEREQUEST],
  271. &response, &UA_TYPES[UA_TYPES_BROWSERESPONSE]);
  272. return response;
  273. }
  274. static UA_INLINE UA_BrowseNextResponse
  275. UA_Client_Service_browseNext(UA_Client *client,
  276. const UA_BrowseNextRequest request) {
  277. UA_BrowseNextResponse response;
  278. __UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_BROWSENEXTREQUEST],
  279. &response, &UA_TYPES[UA_TYPES_BROWSENEXTRESPONSE]);
  280. return response;
  281. }
  282. static UA_INLINE UA_TranslateBrowsePathsToNodeIdsResponse
  283. UA_Client_Service_translateBrowsePathsToNodeIds(UA_Client *client,
  284. const UA_TranslateBrowsePathsToNodeIdsRequest request) {
  285. UA_TranslateBrowsePathsToNodeIdsResponse response;
  286. __UA_Client_Service(client, &request,
  287. &UA_TYPES[UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSREQUEST],
  288. &response,
  289. &UA_TYPES[UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSRESPONSE]);
  290. return response;
  291. }
  292. static UA_INLINE UA_RegisterNodesResponse
  293. UA_Client_Service_registerNodes(UA_Client *client,
  294. const UA_RegisterNodesRequest request) {
  295. UA_RegisterNodesResponse response;
  296. __UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_REGISTERNODESREQUEST],
  297. &response, &UA_TYPES[UA_TYPES_REGISTERNODESRESPONSE]);
  298. return response;
  299. }
  300. static UA_INLINE UA_UnregisterNodesResponse
  301. UA_Client_Service_unregisterNodes(UA_Client *client,
  302. const UA_UnregisterNodesRequest request) {
  303. UA_UnregisterNodesResponse response;
  304. __UA_Client_Service(client, &request,
  305. &UA_TYPES[UA_TYPES_UNREGISTERNODESREQUEST],
  306. &response, &UA_TYPES[UA_TYPES_UNREGISTERNODESRESPONSE]);
  307. return response;
  308. }
  309. /**
  310. * Query Service Set
  311. * ^^^^^^^^^^^^^^^^^ */
  312. static UA_INLINE UA_QueryFirstResponse
  313. UA_Client_Service_queryFirst(UA_Client *client,
  314. const UA_QueryFirstRequest request) {
  315. UA_QueryFirstResponse response;
  316. __UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_QUERYFIRSTREQUEST],
  317. &response, &UA_TYPES[UA_TYPES_QUERYFIRSTRESPONSE]);
  318. return response;
  319. }
  320. static UA_INLINE UA_QueryNextResponse
  321. UA_Client_Service_queryNext(UA_Client *client,
  322. const UA_QueryNextRequest request) {
  323. UA_QueryNextResponse response;
  324. __UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_QUERYFIRSTREQUEST],
  325. &response, &UA_TYPES[UA_TYPES_QUERYFIRSTRESPONSE]);
  326. return response;
  327. }
  328. #ifdef UA_ENABLE_SUBSCRIPTIONS
  329. /**
  330. * MonitoredItem Service Set
  331. * ^^^^^^^^^^^^^^^^^^^^^^^^^ */
  332. static UA_INLINE UA_CreateMonitoredItemsResponse
  333. UA_Client_Service_createMonitoredItems(UA_Client *client,
  334. const UA_CreateMonitoredItemsRequest request) {
  335. UA_CreateMonitoredItemsResponse response;
  336. __UA_Client_Service(client, &request,
  337. &UA_TYPES[UA_TYPES_CREATEMONITOREDITEMSREQUEST], &response,
  338. &UA_TYPES[UA_TYPES_CREATEMONITOREDITEMSRESPONSE]);
  339. return response;
  340. }
  341. static UA_INLINE UA_DeleteMonitoredItemsResponse
  342. UA_Client_Service_deleteMonitoredItems(UA_Client *client,
  343. const UA_DeleteMonitoredItemsRequest request) {
  344. UA_DeleteMonitoredItemsResponse response;
  345. __UA_Client_Service(client, &request,
  346. &UA_TYPES[UA_TYPES_DELETEMONITOREDITEMSREQUEST], &response,
  347. &UA_TYPES[UA_TYPES_DELETEMONITOREDITEMSRESPONSE]);
  348. return response;
  349. }
  350. /**
  351. * Subscription Service Set
  352. * ^^^^^^^^^^^^^^^^^^^^^^^^ */
  353. static UA_INLINE UA_CreateSubscriptionResponse
  354. UA_Client_Service_createSubscription(UA_Client *client,
  355. const UA_CreateSubscriptionRequest request) {
  356. UA_CreateSubscriptionResponse response;
  357. __UA_Client_Service(client, &request,
  358. &UA_TYPES[UA_TYPES_CREATESUBSCRIPTIONREQUEST], &response,
  359. &UA_TYPES[UA_TYPES_CREATESUBSCRIPTIONRESPONSE]);
  360. return response;
  361. }
  362. static UA_INLINE UA_ModifySubscriptionResponse
  363. UA_Client_Service_modifySubscription(UA_Client *client,
  364. const UA_ModifySubscriptionRequest request) {
  365. UA_ModifySubscriptionResponse response;
  366. __UA_Client_Service(client, &request,
  367. &UA_TYPES[UA_TYPES_MODIFYSUBSCRIPTIONREQUEST], &response,
  368. &UA_TYPES[UA_TYPES_MODIFYSUBSCRIPTIONRESPONSE]);
  369. return response;
  370. }
  371. static UA_INLINE UA_DeleteSubscriptionsResponse
  372. UA_Client_Service_deleteSubscriptions(UA_Client *client,
  373. const UA_DeleteSubscriptionsRequest request) {
  374. UA_DeleteSubscriptionsResponse response;
  375. __UA_Client_Service(client, &request,
  376. &UA_TYPES[UA_TYPES_DELETESUBSCRIPTIONSREQUEST], &response,
  377. &UA_TYPES[UA_TYPES_DELETESUBSCRIPTIONSRESPONSE]);
  378. return response;
  379. }
  380. static UA_INLINE UA_PublishResponse
  381. UA_Client_Service_publish(UA_Client *client, const UA_PublishRequest request) {
  382. UA_PublishResponse response;
  383. __UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_PUBLISHREQUEST],
  384. &response, &UA_TYPES[UA_TYPES_PUBLISHRESPONSE]);
  385. return response;
  386. }
  387. #endif
  388. /**
  389. * .. _client-async-services:
  390. *
  391. * Asynchronous Services
  392. * ---------------------
  393. * All OPC UA services are asynchronous in nature. So several service calls can
  394. * be made without waiting for a response first. Responess may come in a
  395. * different ordering. */
  396. /* Listen on the network and process arriving asynchronous responses in the
  397. * background. Internal housekeeping and subscription management is done as
  398. * well. */
  399. UA_StatusCode UA_EXPORT
  400. UA_Client_runAsync(UA_Client *client, UA_UInt16 timeout);
  401. typedef void
  402. (*UA_ClientAsyncServiceCallback)(UA_Client *client, void *userdata,
  403. UA_UInt32 requestId, void *response,
  404. const UA_DataType *responseType);
  405. /* Use the type versions of this method. See below. However, the general
  406. * mechanism of async service calls is explained here.
  407. *
  408. * We say that an async service call has been dispatched once this method
  409. * returns UA_STATUSCODE_GOOD. If there is an error after an async service has
  410. * been dispatched, the callback is called with an "empty" response where the
  411. * statusCode has been set accordingly. This is also done if the client is
  412. * shutting down and the list of dispatched async services is emptied.
  413. *
  414. * The statusCode received when the client is shutting down is
  415. * UA_STATUSCODE_BADSHUTDOWN.
  416. *
  417. * The userdata and requestId arguments can be NULL. */
  418. UA_StatusCode UA_EXPORT
  419. __UA_Client_AsyncService(UA_Client *client, const void *request,
  420. const UA_DataType *requestType,
  421. UA_ClientAsyncServiceCallback callback,
  422. const UA_DataType *responseType,
  423. void *userdata, UA_UInt32 *requestId);
  424. static UA_INLINE UA_StatusCode
  425. UA_Client_AsyncService_read(UA_Client *client, const UA_ReadRequest *request,
  426. UA_ClientAsyncServiceCallback callback,
  427. void *userdata, UA_UInt32 *requestId) {
  428. return __UA_Client_AsyncService(client, (const void*)request,
  429. &UA_TYPES[UA_TYPES_READREQUEST], callback,
  430. &UA_TYPES[UA_TYPES_READRESPONSE],
  431. userdata, requestId);
  432. }
  433. static UA_INLINE UA_StatusCode
  434. UA_Client_AsyncService_write(UA_Client *client, const UA_WriteRequest *request,
  435. UA_ClientAsyncServiceCallback callback,
  436. void *userdata, UA_UInt32 *requestId) {
  437. return __UA_Client_AsyncService(client, (const void*)request,
  438. &UA_TYPES[UA_TYPES_WRITEREQUEST], callback,
  439. &UA_TYPES[UA_TYPES_WRITERESPONSE],
  440. userdata, requestId);
  441. }
  442. static UA_INLINE UA_StatusCode
  443. UA_Client_AsyncService_call(UA_Client *client, const UA_CallRequest *request,
  444. UA_ClientAsyncServiceCallback callback,
  445. void *userdata, UA_UInt32 *requestId) {
  446. return __UA_Client_AsyncService(client, (const void*)request,
  447. &UA_TYPES[UA_TYPES_CALLREQUEST], callback,
  448. &UA_TYPES[UA_TYPES_CALLRESPONSE],
  449. userdata, requestId);
  450. }
  451. static UA_INLINE UA_StatusCode
  452. UA_Client_AsyncService_browse(UA_Client *client, const UA_BrowseRequest *request,
  453. UA_ClientAsyncServiceCallback callback,
  454. void *userdata, UA_UInt32 *requestId) {
  455. return __UA_Client_AsyncService(client, (const void*)request,
  456. &UA_TYPES[UA_TYPES_BROWSEREQUEST], callback,
  457. &UA_TYPES[UA_TYPES_BROWSERESPONSE],
  458. userdata, requestId);
  459. }
  460. /**
  461. * .. toctree::
  462. *
  463. * client_highlevel */
  464. #ifdef __cplusplus
  465. } // extern "C"
  466. #endif
  467. #endif /* UA_CLIENT_H_ */