ua_server.h 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031
  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. #ifndef UA_SERVER_H_
  5. #define UA_SERVER_H_
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. #include "ua_types.h"
  10. #include "ua_types_generated.h"
  11. #include "ua_types_generated_handling.h"
  12. #include "ua_plugin_log.h"
  13. #include "ua_plugin_network.h"
  14. #include "ua_plugin_access_control.h"
  15. #include "ua_plugin_securitypolicy.h"
  16. /**
  17. * .. _server:
  18. *
  19. * Server
  20. * ======
  21. *
  22. * Server Configuration
  23. * --------------------
  24. * The configuration structure is passed to the server during initialization. */
  25. typedef struct {
  26. UA_UInt32 min;
  27. UA_UInt32 max;
  28. } UA_UInt32Range;
  29. typedef struct {
  30. UA_Double min;
  31. UA_Double max;
  32. } UA_DoubleRange;
  33. typedef struct {
  34. UA_UInt16 nThreads; /* only if multithreading is enabled */
  35. UA_Logger logger;
  36. /* Server Description */
  37. UA_BuildInfo buildInfo;
  38. UA_ApplicationDescription applicationDescription;
  39. #ifdef UA_ENABLE_DISCOVERY
  40. UA_String mdnsServerName;
  41. size_t serverCapabilitiesSize;
  42. UA_String *serverCapabilities;
  43. #endif
  44. /* Custom DataTypes */
  45. size_t customDataTypesSize;
  46. UA_DataType *customDataTypes;
  47. /* Networking */
  48. size_t networkLayersSize;
  49. UA_ServerNetworkLayer *networkLayers;
  50. /* Available endpoints */
  51. UA_Endpoints endpoints;
  52. /* Access Control */
  53. UA_AccessControl accessControl;
  54. /* Limits for SecureChannels */
  55. UA_UInt16 maxSecureChannels;
  56. UA_UInt32 maxSecurityTokenLifetime; /* in ms */
  57. /* Limits for Sessions */
  58. UA_UInt16 maxSessions;
  59. UA_Double maxSessionTimeout; /* in ms */
  60. /* Limits for Subscriptions */
  61. UA_DoubleRange publishingIntervalLimits;
  62. UA_UInt32Range lifeTimeCountLimits;
  63. UA_UInt32Range keepAliveCountLimits;
  64. UA_UInt32 maxNotificationsPerPublish;
  65. UA_UInt32 maxRetransmissionQueueSize; /* 0 -> unlimited size */
  66. /* Limits for MonitoredItems */
  67. UA_DoubleRange samplingIntervalLimits;
  68. UA_UInt32Range queueSizeLimits; /* Negotiated with the client */
  69. /* Discovery */
  70. #ifdef UA_ENABLE_DISCOVERY
  71. /* Timeout in seconds when to automatically remove a registered server from
  72. * the list, if it doesn't re-register within the given time frame. A value
  73. * of 0 disables automatic removal. Default is 60 Minutes (60*60). Must be
  74. * bigger than 10 seconds, because cleanup is only triggered approximately
  75. * ervery 10 seconds. The server will still be removed depending on the
  76. * state of the semaphore file. */
  77. UA_UInt32 discoveryCleanupTimeout;
  78. #endif
  79. } UA_ServerConfig;
  80. /**
  81. * .. _server-lifecycle:
  82. *
  83. * Server Lifecycle
  84. * ---------------- */
  85. UA_Server UA_EXPORT * UA_Server_new(const UA_ServerConfig *config);
  86. void UA_EXPORT UA_Server_delete(UA_Server *server);
  87. /* Runs the main loop of the server. In each iteration, this calls into the
  88. * networklayers to see if messages have arrived.
  89. *
  90. * @param server The server object.
  91. * @param running The loop is run as long as *running is true.
  92. * Otherwise, the server shuts down.
  93. * @return Returns the statuscode of the UA_Server_run_shutdown method */
  94. UA_StatusCode UA_EXPORT
  95. UA_Server_run(UA_Server *server, volatile UA_Boolean *running);
  96. /* The prologue part of UA_Server_run (no need to use if you call
  97. * UA_Server_run) */
  98. UA_StatusCode UA_EXPORT UA_Server_run_startup(UA_Server *server);
  99. /* Executes a single iteration of the server's main loop.
  100. *
  101. * @param server The server object.
  102. * @param waitInternal Should we wait for messages in the networklayer?
  103. * Otherwise, the timouts for the networklayers are set to zero.
  104. * The default max wait time is 50millisec.
  105. * @return Returns how long we can wait until the next scheduled
  106. * callback (in ms) */
  107. UA_UInt16 UA_EXPORT
  108. UA_Server_run_iterate(UA_Server *server, UA_Boolean waitInternal);
  109. /* The epilogue part of UA_Server_run (no need to use if you call
  110. * UA_Server_run) */
  111. UA_StatusCode UA_EXPORT UA_Server_run_shutdown(UA_Server *server);
  112. /**
  113. * Repeated Callbacks
  114. * ------------------ */
  115. typedef void (*UA_ServerCallback)(UA_Server *server, void *data);
  116. /* Add a callback for cyclic repetition to the server.
  117. *
  118. * @param server The server object.
  119. * @param callback The callback that shall be added.
  120. * @param interval The callback shall be repeatedly executed with the given interval
  121. * (in ms). The interval must be larger than 5ms. The first execution
  122. * occurs at now() + interval at the latest.
  123. * @param callbackId Set to the identifier of the repeated callback . This can be used to cancel
  124. * the callback later on. If the pointer is null, the identifier is not set.
  125. * @return Upon success, UA_STATUSCODE_GOOD is returned.
  126. * An error code otherwise. */
  127. UA_StatusCode UA_EXPORT
  128. UA_Server_addRepeatedCallback(UA_Server *server, UA_ServerCallback callback,
  129. void *data, UA_UInt32 interval, UA_UInt64 *callbackId);
  130. UA_StatusCode UA_EXPORT
  131. UA_Server_changeRepeatedCallbackInterval(UA_Server *server, UA_UInt64 callbackId,
  132. UA_UInt32 interval);
  133. /* Remove a repeated callback.
  134. *
  135. * @param server The server object.
  136. * @param callbackId The id of the callback that shall be removed.
  137. * @return Upon sucess, UA_STATUSCODE_GOOD is returned.
  138. * An error code otherwise. */
  139. UA_StatusCode UA_EXPORT
  140. UA_Server_removeRepeatedCallback(UA_Server *server, UA_UInt64 callbackId);
  141. /**
  142. * Reading and Writing Node Attributes
  143. * -----------------------------------
  144. * The functions for reading and writing node attributes call the regular read
  145. * and write service in the background that are also used over the network.
  146. *
  147. * The following attributes cannot be read, since the local "admin" user always
  148. * has full rights.
  149. *
  150. * - UserWriteMask
  151. * - UserAccessLevel
  152. * - UserExecutable */
  153. /* Read an attribute of a node. The specialized functions below provide a more
  154. * concise syntax.
  155. *
  156. * @param server The server object.
  157. * @param item ReadValueIds contain the NodeId of the target node, the id of the
  158. * attribute to read and (optionally) an index range to read parts
  159. * of an array only. See the section on NumericRange for the format
  160. * used for array ranges.
  161. * @param timestamps Which timestamps to return for the attribute.
  162. * @return Returns a DataValue that contains either an error code, or a variant
  163. * with the attribute value and the timestamps. */
  164. UA_DataValue UA_EXPORT
  165. UA_Server_read(UA_Server *server, const UA_ReadValueId *item,
  166. UA_TimestampsToReturn timestamps);
  167. /* Don't use this function. There are typed versions for every supported
  168. * attribute. */
  169. UA_StatusCode UA_EXPORT
  170. __UA_Server_read(UA_Server *server, const UA_NodeId *nodeId,
  171. UA_AttributeId attributeId, void *v);
  172. static UA_INLINE UA_StatusCode
  173. UA_Server_readNodeId(UA_Server *server, const UA_NodeId nodeId,
  174. UA_NodeId *outNodeId) {
  175. return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_NODEID, outNodeId);
  176. }
  177. static UA_INLINE UA_StatusCode
  178. UA_Server_readNodeClass(UA_Server *server, const UA_NodeId nodeId,
  179. UA_NodeClass *outNodeClass) {
  180. return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_NODECLASS,
  181. outNodeClass);
  182. }
  183. static UA_INLINE UA_StatusCode
  184. UA_Server_readBrowseName(UA_Server *server, const UA_NodeId nodeId,
  185. UA_QualifiedName *outBrowseName) {
  186. return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_BROWSENAME,
  187. outBrowseName);
  188. }
  189. static UA_INLINE UA_StatusCode
  190. UA_Server_readDisplayName(UA_Server *server, const UA_NodeId nodeId,
  191. UA_LocalizedText *outDisplayName) {
  192. return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_DISPLAYNAME,
  193. outDisplayName);
  194. }
  195. static UA_INLINE UA_StatusCode
  196. UA_Server_readDescription(UA_Server *server, const UA_NodeId nodeId,
  197. UA_LocalizedText *outDescription) {
  198. return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_DESCRIPTION,
  199. outDescription);
  200. }
  201. static UA_INLINE UA_StatusCode
  202. UA_Server_readWriteMask(UA_Server *server, const UA_NodeId nodeId,
  203. UA_UInt32 *outWriteMask) {
  204. return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_WRITEMASK,
  205. outWriteMask);
  206. }
  207. static UA_INLINE UA_StatusCode
  208. UA_Server_readIsAbstract(UA_Server *server, const UA_NodeId nodeId,
  209. UA_Boolean *outIsAbstract) {
  210. return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_ISABSTRACT,
  211. outIsAbstract);
  212. }
  213. static UA_INLINE UA_StatusCode
  214. UA_Server_readSymmetric(UA_Server *server, const UA_NodeId nodeId,
  215. UA_Boolean *outSymmetric) {
  216. return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_SYMMETRIC,
  217. outSymmetric);
  218. }
  219. static UA_INLINE UA_StatusCode
  220. UA_Server_readInverseName(UA_Server *server, const UA_NodeId nodeId,
  221. UA_LocalizedText *outInverseName) {
  222. return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_INVERSENAME,
  223. outInverseName);
  224. }
  225. static UA_INLINE UA_StatusCode
  226. UA_Server_readContainsNoLoop(UA_Server *server, const UA_NodeId nodeId,
  227. UA_Boolean *outContainsNoLoops) {
  228. return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_CONTAINSNOLOOPS,
  229. outContainsNoLoops);
  230. }
  231. static UA_INLINE UA_StatusCode
  232. UA_Server_readEventNotifier(UA_Server *server, const UA_NodeId nodeId,
  233. UA_Byte *outEventNotifier) {
  234. return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_EVENTNOTIFIER,
  235. outEventNotifier);
  236. }
  237. static UA_INLINE UA_StatusCode
  238. UA_Server_readValue(UA_Server *server, const UA_NodeId nodeId,
  239. UA_Variant *outValue) {
  240. return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_VALUE, outValue);
  241. }
  242. static UA_INLINE UA_StatusCode
  243. UA_Server_readDataType(UA_Server *server, const UA_NodeId nodeId,
  244. UA_NodeId *outDataType) {
  245. return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_DATATYPE,
  246. outDataType);
  247. }
  248. static UA_INLINE UA_StatusCode
  249. UA_Server_readValueRank(UA_Server *server, const UA_NodeId nodeId,
  250. UA_Int32 *outValueRank) {
  251. return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_VALUERANK,
  252. outValueRank);
  253. }
  254. /* Returns a variant with an int32 array */
  255. static UA_INLINE UA_StatusCode
  256. UA_Server_readArrayDimensions(UA_Server *server, const UA_NodeId nodeId,
  257. UA_Variant *outArrayDimensions) {
  258. return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_ARRAYDIMENSIONS,
  259. outArrayDimensions);
  260. }
  261. static UA_INLINE UA_StatusCode
  262. UA_Server_readAccessLevel(UA_Server *server, const UA_NodeId nodeId,
  263. UA_Byte *outAccessLevel) {
  264. return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_ACCESSLEVEL,
  265. outAccessLevel);
  266. }
  267. static UA_INLINE UA_StatusCode
  268. UA_Server_readMinimumSamplingInterval(UA_Server *server, const UA_NodeId nodeId,
  269. UA_Double *outMinimumSamplingInterval) {
  270. return __UA_Server_read(server, &nodeId,
  271. UA_ATTRIBUTEID_MINIMUMSAMPLINGINTERVAL,
  272. outMinimumSamplingInterval);
  273. }
  274. static UA_INLINE UA_StatusCode
  275. UA_Server_readHistorizing(UA_Server *server, const UA_NodeId nodeId,
  276. UA_Boolean *outHistorizing) {
  277. return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_HISTORIZING,
  278. outHistorizing);
  279. }
  280. static UA_INLINE UA_StatusCode
  281. UA_Server_readExecutable(UA_Server *server, const UA_NodeId nodeId,
  282. UA_Boolean *outExecutable) {
  283. return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_EXECUTABLE,
  284. outExecutable);
  285. }
  286. /**
  287. * The following node attributes cannot be changed once a node has been created:
  288. *
  289. * - NodeClass
  290. * - NodeId
  291. * - Symmetric
  292. * - ContainsNoLoop
  293. *
  294. * The following attributes cannot be written from the server, as they are
  295. * specific to the different users and set by the access control callback:
  296. *
  297. * - UserWriteMask
  298. * - UserAccessLevel
  299. * - UserExecutable
  300. *
  301. * Historizing is currently unsupported */
  302. /* Overwrite an attribute of a node. The specialized functions below provide a
  303. * more concise syntax.
  304. *
  305. * @param server The server object.
  306. * @param value WriteValues contain the NodeId of the target node, the id of the
  307. * attribute to overwritten, the actual value and (optionally) an
  308. * index range to replace parts of an array only. of an array only.
  309. * See the section on NumericRange for the format used for array
  310. * ranges.
  311. * @return Returns a status code. */
  312. UA_StatusCode UA_EXPORT
  313. UA_Server_write(UA_Server *server, const UA_WriteValue *value);
  314. /* Don't use this function. There are typed versions with no additional
  315. * overhead. */
  316. UA_StatusCode UA_EXPORT
  317. __UA_Server_write(UA_Server *server, const UA_NodeId *nodeId,
  318. const UA_AttributeId attributeId,
  319. const UA_DataType *attr_type, const void *attr);
  320. static UA_INLINE UA_StatusCode
  321. UA_Server_writeBrowseName(UA_Server *server, const UA_NodeId nodeId,
  322. const UA_QualifiedName browseName) {
  323. return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_BROWSENAME,
  324. &UA_TYPES[UA_TYPES_QUALIFIEDNAME], &browseName);
  325. }
  326. static UA_INLINE UA_StatusCode
  327. UA_Server_writeDisplayName(UA_Server *server, const UA_NodeId nodeId,
  328. const UA_LocalizedText displayName) {
  329. return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_DISPLAYNAME,
  330. &UA_TYPES[UA_TYPES_LOCALIZEDTEXT], &displayName);
  331. }
  332. static UA_INLINE UA_StatusCode
  333. UA_Server_writeDescription(UA_Server *server, const UA_NodeId nodeId,
  334. const UA_LocalizedText description) {
  335. return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_DESCRIPTION,
  336. &UA_TYPES[UA_TYPES_LOCALIZEDTEXT], &description);
  337. }
  338. static UA_INLINE UA_StatusCode
  339. UA_Server_writeWriteMask(UA_Server *server, const UA_NodeId nodeId,
  340. const UA_UInt32 writeMask) {
  341. return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_WRITEMASK,
  342. &UA_TYPES[UA_TYPES_UINT32], &writeMask);
  343. }
  344. static UA_INLINE UA_StatusCode
  345. UA_Server_writeIsAbstract(UA_Server *server, const UA_NodeId nodeId,
  346. const UA_Boolean isAbstract) {
  347. return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_ISABSTRACT,
  348. &UA_TYPES[UA_TYPES_BOOLEAN], &isAbstract);
  349. }
  350. static UA_INLINE UA_StatusCode
  351. UA_Server_writeInverseName(UA_Server *server, const UA_NodeId nodeId,
  352. const UA_LocalizedText inverseName) {
  353. return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_INVERSENAME,
  354. &UA_TYPES[UA_TYPES_LOCALIZEDTEXT], &inverseName);
  355. }
  356. static UA_INLINE UA_StatusCode
  357. UA_Server_writeEventNotifier(UA_Server *server, const UA_NodeId nodeId,
  358. const UA_Byte eventNotifier) {
  359. return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_EVENTNOTIFIER,
  360. &UA_TYPES[UA_TYPES_BYTE], &eventNotifier);
  361. }
  362. static UA_INLINE UA_StatusCode
  363. UA_Server_writeValue(UA_Server *server, const UA_NodeId nodeId,
  364. const UA_Variant value) {
  365. return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_VALUE,
  366. &UA_TYPES[UA_TYPES_VARIANT], &value);
  367. }
  368. static UA_INLINE UA_StatusCode
  369. UA_Server_writeDataType(UA_Server *server, const UA_NodeId nodeId,
  370. const UA_NodeId dataType) {
  371. return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_DATATYPE,
  372. &UA_TYPES[UA_TYPES_NODEID], &dataType);
  373. }
  374. static UA_INLINE UA_StatusCode
  375. UA_Server_writeValueRank(UA_Server *server, const UA_NodeId nodeId,
  376. const UA_Int32 valueRank) {
  377. return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_VALUERANK,
  378. &UA_TYPES[UA_TYPES_INT32], &valueRank);
  379. }
  380. static UA_INLINE UA_StatusCode
  381. UA_Server_writeArrayDimensions(UA_Server *server, const UA_NodeId nodeId,
  382. const UA_Variant arrayDimensions) {
  383. return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_VALUE,
  384. &UA_TYPES[UA_TYPES_VARIANT], &arrayDimensions);
  385. }
  386. static UA_INLINE UA_StatusCode
  387. UA_Server_writeAccessLevel(UA_Server *server, const UA_NodeId nodeId,
  388. const UA_Byte accessLevel) {
  389. return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_ACCESSLEVEL,
  390. &UA_TYPES[UA_TYPES_BYTE], &accessLevel);
  391. }
  392. static UA_INLINE UA_StatusCode
  393. UA_Server_writeMinimumSamplingInterval(UA_Server *server, const UA_NodeId nodeId,
  394. const UA_Double miniumSamplingInterval) {
  395. return __UA_Server_write(server, &nodeId,
  396. UA_ATTRIBUTEID_MINIMUMSAMPLINGINTERVAL,
  397. &UA_TYPES[UA_TYPES_DOUBLE],
  398. &miniumSamplingInterval);
  399. }
  400. static UA_INLINE UA_StatusCode
  401. UA_Server_writeExecutable(UA_Server *server, const UA_NodeId nodeId,
  402. const UA_Boolean executable) {
  403. return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_EXECUTABLE,
  404. &UA_TYPES[UA_TYPES_BOOLEAN], &executable); }
  405. /**
  406. * Browsing
  407. * -------- */
  408. UA_BrowseResult UA_EXPORT
  409. UA_Server_browse(UA_Server *server, UA_UInt32 maxrefs,
  410. const UA_BrowseDescription *descr);
  411. UA_BrowseResult UA_EXPORT
  412. UA_Server_browseNext(UA_Server *server, UA_Boolean releaseContinuationPoint,
  413. const UA_ByteString *continuationPoint);
  414. UA_BrowsePathResult UA_EXPORT
  415. UA_Server_translateBrowsePathToNodeIds(UA_Server *server,
  416. const UA_BrowsePath *browsePath);
  417. #ifndef HAVE_NODEITER_CALLBACK
  418. #define HAVE_NODEITER_CALLBACK
  419. /* Iterate over all nodes referenced by parentNodeId by calling the callback
  420. * function for each child node (in ifdef because GCC/CLANG handle include order
  421. * differently) */
  422. typedef UA_StatusCode
  423. (*UA_NodeIteratorCallback)(UA_NodeId childId, UA_Boolean isInverse,
  424. UA_NodeId referenceTypeId, void *handle);
  425. #endif
  426. UA_StatusCode UA_EXPORT
  427. UA_Server_forEachChildNodeCall(UA_Server *server, UA_NodeId parentNodeId,
  428. UA_NodeIteratorCallback callback, void *handle);
  429. #ifdef UA_ENABLE_DISCOVERY
  430. /**
  431. * Discovery
  432. * --------- */
  433. /* Register the given server instance at the discovery server.
  434. * This should be called periodically.
  435. * The semaphoreFilePath is optional. If the given file is deleted,
  436. * the server will automatically be unregistered. This could be
  437. * for example a pid file which is deleted if the server crashes.
  438. *
  439. * When the server shuts down you need to call unregister.
  440. *
  441. * @param server
  442. * @param discoveryServerUrl if set to NULL, the default value
  443. * 'opc.tcp://localhost:4840' will be used
  444. * @param semaphoreFilePath optional parameter pointing to semaphore file. */
  445. UA_StatusCode UA_EXPORT
  446. UA_Server_register_discovery(UA_Server *server, const char* discoveryServerUrl,
  447. const char* semaphoreFilePath);
  448. /* Unregister the given server instance from the discovery server.
  449. * This should only be called when the server is shutting down.
  450. * @param server
  451. * @param discoveryServerUrl if set to NULL, the default value
  452. * 'opc.tcp://localhost:4840' will be used */
  453. UA_StatusCode UA_EXPORT
  454. UA_Server_unregister_discovery(UA_Server *server, const char* discoveryServerUrl);
  455. /* Adds a periodic callback to register the server with the LDS (local discovery server)
  456. * periodically. The interval between each register call is given as second parameter.
  457. * It should be 10 minutes by default (= 10*60*1000).
  458. *
  459. * The delayFirstRegisterMs parameter indicates the delay for the first register call.
  460. * If it is 0, the first register call will be after intervalMs milliseconds,
  461. * otherwise the server's first register will be after delayFirstRegisterMs.
  462. *
  463. * When you manually unregister the server, you also need to cancel the
  464. * periodic callback, otherwise it will be automatically be registered again.
  465. *
  466. * If you call this method multiple times for the same discoveryServerUrl, the older
  467. * periodic callback will be removed.
  468. *
  469. * @param server
  470. * @param discoveryServerUrl if set to NULL, the default value
  471. * 'opc.tcp://localhost:4840' will be used
  472. * @param intervalMs
  473. * @param delayFirstRegisterMs
  474. * @param periodicCallbackId */
  475. UA_StatusCode UA_EXPORT
  476. UA_Server_addPeriodicServerRegisterCallback(UA_Server *server, const char* discoveryServerUrl,
  477. UA_UInt32 intervalMs,
  478. UA_UInt32 delayFirstRegisterMs,
  479. UA_UInt64 *periodicCallbackId);
  480. /* Callback for RegisterServer. Data is passed from the register call */
  481. typedef void (*UA_Server_registerServerCallback)(const UA_RegisteredServer *registeredServer,
  482. void* data);
  483. /* Set the callback which is called if another server registeres or unregisters
  484. * with this instance. If called multiple times, previous data will be
  485. * overwritten.
  486. *
  487. * @param server
  488. * @param cb the callback
  489. * @param data data passed to the callback
  490. * @return UA_STATUSCODE_SUCCESS on success */
  491. void UA_EXPORT
  492. UA_Server_setRegisterServerCallback(UA_Server *server, UA_Server_registerServerCallback cb,
  493. void* data);
  494. #ifdef UA_ENABLE_DISCOVERY_MULTICAST
  495. /* Callback for server detected through mDNS. Data is passed from the register
  496. * call
  497. *
  498. * @param isServerAnnounce indicates if the server has just been detected. If
  499. * set to false, this means the server is shutting down.
  500. * @param isTxtReceived indicates if we already received the corresponding TXT
  501. * record with the path and caps data */
  502. typedef void (*UA_Server_serverOnNetworkCallback)(const UA_ServerOnNetwork *serverOnNetwork,
  503. UA_Boolean isServerAnnounce,
  504. UA_Boolean isTxtReceived, void* data);
  505. /* Set the callback which is called if another server is found through mDNS or
  506. * deleted. It will be called for any mDNS message from the remote server, thus
  507. * it may be called multiple times for the same instance. Also the SRV and TXT
  508. * records may arrive later, therefore for the first call the server
  509. * capabilities may not be set yet. If called multiple times, previous data will
  510. * be overwritten.
  511. *
  512. * @param server
  513. * @param cb the callback
  514. * @param data data passed to the callback
  515. * @return UA_STATUSCODE_SUCCESS on success */
  516. void UA_EXPORT
  517. UA_Server_setServerOnNetworkCallback(UA_Server *server,
  518. UA_Server_serverOnNetworkCallback cb,
  519. void* data);
  520. #endif /* UA_ENABLE_DISCOVERY_MULTICAST */
  521. #endif /* UA_ENABLE_DISCOVERY */
  522. /**
  523. * Method Call
  524. * ----------- */
  525. #ifdef UA_ENABLE_METHODCALLS
  526. UA_CallMethodResult UA_EXPORT
  527. UA_Server_call(UA_Server *server, const UA_CallMethodRequest *request);
  528. #endif
  529. /**
  530. * Node Management
  531. * ---------------
  532. *
  533. * Callback Mechanisms
  534. * ^^^^^^^^^^^^^^^^^^^
  535. * There are four mechanisms for callbacks from the node-based information model
  536. * into userspace:
  537. *
  538. * - Datasources for variable nodes, where the variable content is managed
  539. * externally
  540. * - Value-callbacks for variable nodes, where userspace is notified when a
  541. * read/write occurs
  542. * - Object lifecycle management, where a user-defined constructor and
  543. * destructor is added to an object type
  544. * - Method callbacks, where a user-defined method is exposed in the information
  545. * model
  546. *
  547. * .. _datasource:
  548. *
  549. * Data Source Callback
  550. * ~~~~~~~~~~~~~~~~~~~~
  551. *
  552. * The server has a unique way of dealing with the content of variables. Instead
  553. * of storing a variant attached to the variable node, the node can point to a
  554. * function with a local data provider. Whenever the value attribute is read,
  555. * the function will be called and asked to provide a UA_DataValue return value
  556. * that contains the value content and additional timestamps.
  557. *
  558. * It is expected that the read callback is implemented. The write callback can
  559. * be set to a null-pointer. */
  560. typedef struct {
  561. void *handle; /* A custom pointer to reuse the same datasource functions for
  562. multiple sources */
  563. /* Copies the data from the source into the provided value.
  564. *
  565. * @param handle An optional pointer to user-defined data for the
  566. * specific data source
  567. * @param nodeid Id of the read node
  568. * @param includeSourceTimeStamp If true, then the datasource is expected to
  569. * set the source timestamp in the returned value
  570. * @param range If not null, then the datasource shall return only a
  571. * selection of the (nonscalar) data. Set
  572. * UA_STATUSCODE_BADINDEXRANGEINVALID in the value if this does not
  573. * apply.
  574. * @param value The (non-null) DataValue that is returned to the client. The
  575. * data source sets the read data, the result status and optionally a
  576. * sourcetimestamp.
  577. * @return Returns a status code for logging. Error codes intended for the
  578. * original caller are set in the value. If an error is returned,
  579. * then no releasing of the value is done. */
  580. UA_StatusCode (*read)(void *handle, const UA_NodeId nodeid,
  581. UA_Boolean includeSourceTimeStamp,
  582. const UA_NumericRange *range, UA_DataValue *value);
  583. /* Write into a data source. The write member of UA_DataSource can be empty
  584. * if the operation is unsupported.
  585. *
  586. * @param handle An optional pointer to user-defined data for the
  587. * specific data source
  588. * @param nodeid Id of the node being written to
  589. * @param data The data to be written into the data source
  590. * @param range An optional data range. If the data source is scalar or does
  591. * not support writing of ranges, then an error code is returned.
  592. * @return Returns a status code that is returned to the user
  593. */
  594. UA_StatusCode (*write)(void *handle, const UA_NodeId nodeid,
  595. const UA_Variant *data, const UA_NumericRange *range);
  596. } UA_DataSource;
  597. UA_StatusCode UA_EXPORT
  598. UA_Server_setVariableNode_dataSource(UA_Server *server, const UA_NodeId nodeId,
  599. const UA_DataSource dataSource);
  600. /**
  601. * .. _value-callback:
  602. *
  603. * Value Callback
  604. * ~~~~~~~~~~~~~~
  605. * Value Callbacks can be attached to variable and variable type nodes. If
  606. * not-null, they are called before reading and after writing respectively. */
  607. typedef struct {
  608. /* Pointer to user-provided data for the callback */
  609. void *handle;
  610. /* Called before the value attribute is read. It is possible to write into the
  611. * value attribute during onRead (using the write service). The node is
  612. * re-opened afterwards so that changes are considered in the following read
  613. * operation.
  614. *
  615. * @param handle Points to user-provided data for the callback.
  616. * @param nodeid The identifier of the node.
  617. * @param data Points to the current node value.
  618. * @param range Points to the numeric range the client wants to read from
  619. * (or NULL). */
  620. void (*onRead)(void *handle, const UA_NodeId nodeid,
  621. const UA_Variant *data, const UA_NumericRange *range);
  622. /* Called after writing the value attribute. The node is re-opened after
  623. * writing so that the new value is visible in the callback.
  624. *
  625. * @param handle Points to user-provided data for the callback.
  626. * @param nodeid The identifier of the node.
  627. * @param data Points to the current node value (after writing).
  628. * @param range Points to the numeric range the client wants to write to (or
  629. * NULL). */
  630. void (*onWrite)(void *handle, const UA_NodeId nodeid,
  631. const UA_Variant *data, const UA_NumericRange *range);
  632. } UA_ValueCallback;
  633. UA_StatusCode UA_EXPORT
  634. UA_Server_setVariableNode_valueCallback(UA_Server *server, const UA_NodeId nodeId,
  635. const UA_ValueCallback callback);
  636. /**
  637. * .. _object-lifecycle:
  638. *
  639. * Object Lifecycle Management Callbacks
  640. * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  641. * Lifecycle management adds constructor and destructor callbacks to
  642. * object types. */
  643. typedef struct {
  644. /* Returns the instance handle that is then attached to the node */
  645. void * (*constructor)(const UA_NodeId instance);
  646. void (*destructor)(const UA_NodeId instance, void *instanceHandle);
  647. } UA_ObjectLifecycleManagement;
  648. UA_StatusCode UA_EXPORT
  649. UA_Server_setObjectTypeNode_lifecycleManagement(UA_Server *server,
  650. UA_NodeId nodeId,
  651. UA_ObjectLifecycleManagement olm);
  652. /**
  653. * Method Callbacks
  654. * ~~~~~~~~~~~~~~~~ */
  655. typedef UA_StatusCode
  656. (*UA_MethodCallback)(void *methodHandle, const UA_NodeId *objectId,
  657. const UA_NodeId *sessionId, void *sessionHandle,
  658. size_t inputSize, const UA_Variant *input,
  659. size_t outputSize, UA_Variant *output);
  660. #ifdef UA_ENABLE_METHODCALLS
  661. UA_StatusCode UA_EXPORT
  662. UA_Server_setMethodNode_callback(UA_Server *server, const UA_NodeId methodNodeId,
  663. UA_MethodCallback method, void *handle);
  664. #endif
  665. /**
  666. * .. _addnodes:
  667. *
  668. * Node Addition and Deletion
  669. * ^^^^^^^^^^^^^^^^^^^^^^^^^^
  670. *
  671. * When creating dynamic node instances at runtime, chances are that you will
  672. * not care about the specific NodeId of the new node, as long as you can
  673. * reference it later. When passing numeric NodeIds with a numeric identifier 0,
  674. * the stack evaluates this as "select a random unassigned numeric NodeId in
  675. * that namespace". To find out which NodeId was actually assigned to the new
  676. * node, you may pass a pointer `outNewNodeId`, which will (after a successfull
  677. * node insertion) contain the nodeId of the new node. You may also pass NULL
  678. * pointer if this result is not relevant. The namespace index for nodes you
  679. * create should never be 0, as that index is reserved for OPC UA's
  680. * self-description (namespace * 0).
  681. *
  682. * The methods for node addition and deletion take mostly const arguments that
  683. * are not modified. When creating a node, a deep copy of the node identifier,
  684. * node attributes, etc. is created. Therefore, it is possible to call for
  685. * example `UA_Server_addVariablenode` with a value attribute (a :ref:`variant`)
  686. * pointing to a memory location on the stack. If you need changes to a variable
  687. * value to manifest at a specific memory location, please use a
  688. * :ref:`datasource` or a :ref:`value-callback`. */
  689. /* Protect against redundant definitions for server/client */
  690. #ifndef UA_DEFAULT_ATTRIBUTES_DEFINED
  691. #define UA_DEFAULT_ATTRIBUTES_DEFINED
  692. /* The default for variables is "BaseDataType" for the datatype, -2 for the
  693. * valuerank and a read-accesslevel. */
  694. UA_EXPORT extern const UA_VariableAttributes UA_VariableAttributes_default;
  695. UA_EXPORT extern const UA_VariableTypeAttributes UA_VariableTypeAttributes_default;
  696. /* Methods are executable by default */
  697. UA_EXPORT extern const UA_MethodAttributes UA_MethodAttributes_default;
  698. /* The remaining attribute definitions are currently all zeroed out */
  699. UA_EXPORT extern const UA_ObjectAttributes UA_ObjectAttributes_default;
  700. UA_EXPORT extern const UA_ObjectTypeAttributes UA_ObjectTypeAttributes_default;
  701. UA_EXPORT extern const UA_ReferenceTypeAttributes UA_ReferenceTypeAttributes_default;
  702. UA_EXPORT extern const UA_DataTypeAttributes UA_DataTypeAttributes_default;
  703. UA_EXPORT extern const UA_ViewAttributes UA_ViewAttributes_default;
  704. #endif
  705. /* The instantiation callback is used to track the addition of new nodes. It is
  706. * also called for all sub-nodes contained in an object or variable type node
  707. * that is instantiated. */
  708. typedef struct {
  709. UA_StatusCode (*method)(const UA_NodeId objectId,
  710. const UA_NodeId typeDefinitionId, void *handle);
  711. void *handle;
  712. } UA_InstantiationCallback;
  713. /* Don't use this function. There are typed versions as inline functions. */
  714. UA_StatusCode UA_EXPORT
  715. __UA_Server_addNode(UA_Server *server, const UA_NodeClass nodeClass,
  716. const UA_NodeId *requestedNewNodeId,
  717. const UA_NodeId *parentNodeId,
  718. const UA_NodeId *referenceTypeId,
  719. const UA_QualifiedName browseName,
  720. const UA_NodeId *typeDefinition,
  721. const UA_NodeAttributes *attr,
  722. const UA_DataType *attributeType,
  723. UA_InstantiationCallback *instantiationCallback,
  724. UA_NodeId *outNewNodeId);
  725. static UA_INLINE UA_StatusCode
  726. UA_Server_addVariableNode(UA_Server *server, const UA_NodeId requestedNewNodeId,
  727. const UA_NodeId parentNodeId,
  728. const UA_NodeId referenceTypeId,
  729. const UA_QualifiedName browseName,
  730. const UA_NodeId typeDefinition,
  731. const UA_VariableAttributes attr,
  732. UA_InstantiationCallback *instantiationCallback,
  733. UA_NodeId *outNewNodeId) {
  734. return __UA_Server_addNode(server, UA_NODECLASS_VARIABLE, &requestedNewNodeId,
  735. &parentNodeId, &referenceTypeId, browseName,
  736. &typeDefinition, (const UA_NodeAttributes*)&attr,
  737. &UA_TYPES[UA_TYPES_VARIABLEATTRIBUTES],
  738. instantiationCallback, outNewNodeId);
  739. }
  740. static UA_INLINE UA_StatusCode
  741. UA_Server_addVariableTypeNode(UA_Server *server,
  742. const UA_NodeId requestedNewNodeId,
  743. const UA_NodeId parentNodeId,
  744. const UA_NodeId referenceTypeId,
  745. const UA_QualifiedName browseName,
  746. const UA_NodeId typeDefinition,
  747. const UA_VariableTypeAttributes attr,
  748. UA_InstantiationCallback *instantiationCallback,
  749. UA_NodeId *outNewNodeId) {
  750. return __UA_Server_addNode(server, UA_NODECLASS_VARIABLETYPE,
  751. &requestedNewNodeId, &parentNodeId, &referenceTypeId,
  752. browseName, &typeDefinition,
  753. (const UA_NodeAttributes*)&attr,
  754. &UA_TYPES[UA_TYPES_VARIABLETYPEATTRIBUTES],
  755. instantiationCallback, outNewNodeId);
  756. }
  757. static UA_INLINE UA_StatusCode
  758. UA_Server_addObjectNode(UA_Server *server, const UA_NodeId requestedNewNodeId,
  759. const UA_NodeId parentNodeId,
  760. const UA_NodeId referenceTypeId,
  761. const UA_QualifiedName browseName,
  762. const UA_NodeId typeDefinition,
  763. const UA_ObjectAttributes attr,
  764. UA_InstantiationCallback *instantiationCallback,
  765. UA_NodeId *outNewNodeId) {
  766. return __UA_Server_addNode(server, UA_NODECLASS_OBJECT, &requestedNewNodeId,
  767. &parentNodeId, &referenceTypeId, browseName,
  768. &typeDefinition, (const UA_NodeAttributes*)&attr,
  769. &UA_TYPES[UA_TYPES_OBJECTATTRIBUTES],
  770. instantiationCallback, outNewNodeId);
  771. }
  772. static UA_INLINE UA_StatusCode
  773. UA_Server_addObjectTypeNode(UA_Server *server, const UA_NodeId requestedNewNodeId,
  774. const UA_NodeId parentNodeId,
  775. const UA_NodeId referenceTypeId,
  776. const UA_QualifiedName browseName,
  777. const UA_ObjectTypeAttributes attr,
  778. UA_InstantiationCallback *instantiationCallback,
  779. UA_NodeId *outNewNodeId) {
  780. return __UA_Server_addNode(server, UA_NODECLASS_OBJECTTYPE, &requestedNewNodeId,
  781. &parentNodeId, &referenceTypeId, browseName,
  782. &UA_NODEID_NULL, (const UA_NodeAttributes*)&attr,
  783. &UA_TYPES[UA_TYPES_OBJECTTYPEATTRIBUTES],
  784. instantiationCallback, outNewNodeId);
  785. }
  786. static UA_INLINE UA_StatusCode
  787. UA_Server_addViewNode(UA_Server *server, const UA_NodeId requestedNewNodeId,
  788. const UA_NodeId parentNodeId,
  789. const UA_NodeId referenceTypeId,
  790. const UA_QualifiedName browseName,
  791. const UA_ViewAttributes attr,
  792. UA_InstantiationCallback *instantiationCallback,
  793. UA_NodeId *outNewNodeId) {
  794. return __UA_Server_addNode(server, UA_NODECLASS_VIEW, &requestedNewNodeId,
  795. &parentNodeId, &referenceTypeId, browseName,
  796. &UA_NODEID_NULL, (const UA_NodeAttributes*)&attr,
  797. &UA_TYPES[UA_TYPES_VIEWATTRIBUTES],
  798. instantiationCallback, outNewNodeId);
  799. }
  800. static UA_INLINE UA_StatusCode
  801. UA_Server_addReferenceTypeNode(UA_Server *server,
  802. const UA_NodeId requestedNewNodeId,
  803. const UA_NodeId parentNodeId,
  804. const UA_NodeId referenceTypeId,
  805. const UA_QualifiedName browseName,
  806. const UA_ReferenceTypeAttributes attr,
  807. UA_InstantiationCallback *instantiationCallback,
  808. UA_NodeId *outNewNodeId) {
  809. return __UA_Server_addNode(server, UA_NODECLASS_REFERENCETYPE,
  810. &requestedNewNodeId, &parentNodeId, &referenceTypeId,
  811. browseName, &UA_NODEID_NULL,
  812. (const UA_NodeAttributes*)&attr,
  813. &UA_TYPES[UA_TYPES_REFERENCETYPEATTRIBUTES],
  814. instantiationCallback, outNewNodeId);
  815. }
  816. static UA_INLINE UA_StatusCode
  817. UA_Server_addDataTypeNode(UA_Server *server,
  818. const UA_NodeId requestedNewNodeId,
  819. const UA_NodeId parentNodeId,
  820. const UA_NodeId referenceTypeId,
  821. const UA_QualifiedName browseName,
  822. const UA_DataTypeAttributes attr,
  823. UA_InstantiationCallback *instantiationCallback,
  824. UA_NodeId *outNewNodeId) {
  825. return __UA_Server_addNode(server, UA_NODECLASS_DATATYPE, &requestedNewNodeId,
  826. &parentNodeId, &referenceTypeId, browseName,
  827. &UA_NODEID_NULL, (const UA_NodeAttributes*)&attr,
  828. &UA_TYPES[UA_TYPES_DATATYPEATTRIBUTES],
  829. instantiationCallback, outNewNodeId);
  830. }
  831. UA_StatusCode UA_EXPORT
  832. UA_Server_addDataSourceVariableNode(UA_Server *server,
  833. const UA_NodeId requestedNewNodeId,
  834. const UA_NodeId parentNodeId,
  835. const UA_NodeId referenceTypeId,
  836. const UA_QualifiedName browseName,
  837. const UA_NodeId typeDefinition,
  838. const UA_VariableAttributes attr,
  839. const UA_DataSource dataSource,
  840. UA_NodeId *outNewNodeId);
  841. #ifdef UA_ENABLE_METHODCALLS
  842. UA_StatusCode UA_EXPORT
  843. UA_Server_addMethodNode(UA_Server *server, const UA_NodeId requestedNewNodeId,
  844. const UA_NodeId parentNodeId,
  845. const UA_NodeId referenceTypeId,
  846. const UA_QualifiedName browseName,
  847. const UA_MethodAttributes attr,
  848. UA_MethodCallback method, void *handle,
  849. size_t inputArgumentsSize,
  850. const UA_Argument* inputArguments,
  851. size_t outputArgumentsSize,
  852. const UA_Argument* outputArguments,
  853. UA_NodeId *outNewNodeId);
  854. #endif
  855. UA_StatusCode UA_EXPORT
  856. UA_Server_deleteNode(UA_Server *server, const UA_NodeId nodeId,
  857. UA_Boolean deleteReferences);
  858. /**
  859. * Reference Management
  860. * -------------------- */
  861. UA_StatusCode UA_EXPORT
  862. UA_Server_addReference(UA_Server *server, const UA_NodeId sourceId,
  863. const UA_NodeId refTypeId,
  864. const UA_ExpandedNodeId targetId, UA_Boolean isForward);
  865. UA_StatusCode UA_EXPORT
  866. UA_Server_deleteReference(UA_Server *server, const UA_NodeId sourceNodeId,
  867. const UA_NodeId referenceTypeId, UA_Boolean isForward,
  868. const UA_ExpandedNodeId targetNodeId,
  869. UA_Boolean deleteBidirectional);
  870. /**
  871. * Utility Functions
  872. * ----------------- */
  873. /* Add a new namespace to the server. Returns the index of the new namespace */
  874. UA_UInt16 UA_EXPORT UA_Server_addNamespace(UA_Server *server, const char* name);
  875. /**
  876. * Deprecated Server API
  877. * ---------------------
  878. * This file contains outdated API definitions that are kept for backwards
  879. * compatibility. Please switch to the new API, as the following definitions
  880. * will be removed eventually.
  881. *
  882. * UA_Job API
  883. * ^^^^^^^^^^
  884. * UA_Job was replaced since it unneccessarily exposed server internals to the
  885. * end-user. Please use plain UA_ServerCallbacks instead. The following UA_Job
  886. * definition contains just the fraction of the original struct that was useful
  887. * to end-users. */
  888. typedef enum {
  889. UA_JOBTYPE_METHODCALL
  890. } UA_JobType;
  891. typedef struct {
  892. UA_JobType type;
  893. union {
  894. struct {
  895. void *data;
  896. UA_ServerCallback method;
  897. } methodCall;
  898. } job;
  899. } UA_Job;
  900. UA_DEPRECATED static UA_INLINE UA_StatusCode
  901. UA_Server_addRepeatedJob(UA_Server *server, UA_Job job,
  902. UA_UInt32 interval, UA_Guid *jobId) {
  903. return UA_Server_addRepeatedCallback(server, job.job.methodCall.method,
  904. job.job.methodCall.data, interval,
  905. (UA_UInt64*)(uintptr_t)jobId);
  906. }
  907. UA_DEPRECATED static UA_INLINE UA_StatusCode
  908. UA_Server_removeRepeatedJob(UA_Server *server, UA_Guid jobId) {
  909. return UA_Server_removeRepeatedCallback(server,
  910. *(UA_UInt64*)(uintptr_t)&jobId);
  911. }
  912. #ifdef __cplusplus
  913. }
  914. #endif
  915. #endif /* UA_SERVER_H_ */