123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723 |
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Copyright 2018 (c) Thomas Stalder, Blue Time Concept SA
- * Copyright 2018 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
- */
- #ifndef UA_CLIENT_HIGHLEVEL_ASYNC_H_
- #define UA_CLIENT_HIGHLEVEL_ASYNC_H_
- #include <open62541/client.h>
- _UA_BEGIN_DECLS
- /**
- * Raw Services
- * ^^^^^^^^^^^^ */
- typedef void (*UA_ClientAsyncReadCallback)(UA_Client *client, void *userdata,
- UA_UInt32 requestId, UA_ReadResponse *rr);
- static UA_INLINE UA_StatusCode
- UA_Client_sendAsyncReadRequest(UA_Client *client, UA_ReadRequest *request,
- UA_ClientAsyncReadCallback readCallback, void *userdata,
- UA_UInt32 *reqId) {
- return UA_Client_sendAsyncRequest(client, request, &UA_TYPES[UA_TYPES_READREQUEST],
- (UA_ClientAsyncServiceCallback)readCallback,
- &UA_TYPES[UA_TYPES_READRESPONSE], userdata, reqId);
- }
- typedef void (*UA_ClientAsyncWriteCallback)(UA_Client *client, void *userdata,
- UA_UInt32 requestId, UA_WriteResponse *wr);
- static UA_INLINE UA_StatusCode
- UA_Client_sendAsyncWriteRequest(UA_Client *client, UA_WriteRequest *request,
- UA_ClientAsyncWriteCallback writeCallback, void *userdata,
- UA_UInt32 *reqId) {
- return UA_Client_sendAsyncRequest(client, request, &UA_TYPES[UA_TYPES_WRITEREQUEST],
- (UA_ClientAsyncServiceCallback)writeCallback,
- &UA_TYPES[UA_TYPES_WRITERESPONSE], userdata, reqId);
- }
- typedef void (*UA_ClientAsyncBrowseCallback)(UA_Client *client, void *userdata,
- UA_UInt32 requestId, UA_BrowseResponse *wr);
- static UA_INLINE UA_StatusCode
- UA_Client_sendAsyncBrowseRequest(UA_Client *client, UA_BrowseRequest *request,
- UA_ClientAsyncBrowseCallback browseCallback,
- void *userdata, UA_UInt32 *reqId) {
- return UA_Client_sendAsyncRequest(client, request, &UA_TYPES[UA_TYPES_BROWSEREQUEST],
- (UA_ClientAsyncServiceCallback)browseCallback,
- &UA_TYPES[UA_TYPES_BROWSERESPONSE], userdata,
- reqId);
- }
- /**
- * Read Attribute
- * ^^^^^^^^^^^^^^ */
- UA_StatusCode UA_EXPORT
- __UA_Client_readAttribute_async(UA_Client *client, const UA_NodeId *nodeId,
- UA_AttributeId attributeId,
- const UA_DataType *outDataType,
- UA_ClientAsyncServiceCallback callback, void *userdata,
- UA_UInt32 *reqId);
- typedef void (*UA_ClientAsyncReadDataTypeAttributeCallback)(UA_Client *client,
- void *userdata,
- UA_UInt32 requestId,
- UA_NodeId *var);
- static UA_INLINE UA_StatusCode
- UA_Client_readDataTypeAttribute_async(
- UA_Client *client, const UA_NodeId nodeId,
- UA_ClientAsyncReadDataTypeAttributeCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_readAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_DATATYPE, &UA_TYPES[UA_TYPES_NODEID],
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- typedef void (*UA_ClientAsyncReadValueAttributeCallback)(UA_Client *client,
- void *userdata,
- UA_UInt32 requestId,
- UA_Variant *var);
- static UA_INLINE UA_StatusCode
- UA_Client_readValueAttribute_async(UA_Client *client, const UA_NodeId nodeId,
- UA_ClientAsyncReadValueAttributeCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_readAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_VALUE, &UA_TYPES[UA_TYPES_VARIANT],
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- typedef void (*UA_ClientAsyncReadNodeIdAttributeCallback)(UA_Client *client,
- void *userdata,
- UA_UInt32 requestId,
- UA_NodeId *out);
- static UA_INLINE UA_StatusCode
- UA_Client_readNodeIdAttribute_async(UA_Client *client, const UA_NodeId nodeId,
- UA_ClientAsyncReadNodeIdAttributeCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_readAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_NODEID, &UA_TYPES[UA_TYPES_NODEID],
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- typedef void (*UA_ClientAsyncReadNodeClassAttributeCallback)(UA_Client *client,
- void *userdata,
- UA_UInt32 requestId,
- UA_NodeClass *out);
- static UA_INLINE UA_StatusCode
- UA_Client_readNodeClassAttribute_async(
- UA_Client *client, const UA_NodeId nodeId,
- UA_ClientAsyncReadNodeClassAttributeCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_readAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_NODECLASS, &UA_TYPES[UA_TYPES_NODECLASS],
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- typedef void (*UA_ClientAsyncReadBrowseNameAttributeCallback)(UA_Client *client,
- void *userdata,
- UA_UInt32 requestId,
- UA_QualifiedName *out);
- static UA_INLINE UA_StatusCode
- UA_Client_readBrowseNameAttribute_async(
- UA_Client *client, const UA_NodeId nodeId,
- UA_ClientAsyncReadBrowseNameAttributeCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_readAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_BROWSENAME, &UA_TYPES[UA_TYPES_QUALIFIEDNAME],
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- typedef void (*UA_ClientAsyncReadDisplayNameAttributeCallback)(UA_Client *client,
- void *userdata,
- UA_UInt32 requestId,
- UA_LocalizedText *out);
- static UA_INLINE UA_StatusCode
- UA_Client_readDisplayNameAttribute_async(
- UA_Client *client, const UA_NodeId nodeId,
- UA_ClientAsyncReadDisplayNameAttributeCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_readAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_DISPLAYNAME, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT],
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- typedef void (*UA_ClientAsyncReadDescriptionAttributeCallback)(UA_Client *client,
- void *userdata,
- UA_UInt32 requestId,
- UA_LocalizedText *out);
- static UA_INLINE UA_StatusCode
- UA_Client_readDescriptionAttribute_async(
- UA_Client *client, const UA_NodeId nodeId,
- UA_ClientAsyncReadDescriptionAttributeCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_readAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_DESCRIPTION, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT],
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- typedef void (*UA_ClientAsyncReadWriteMaskAttributeCallback)(UA_Client *client,
- void *userdata,
- UA_UInt32 requestId,
- UA_UInt32 *out);
- static UA_INLINE UA_StatusCode
- UA_Client_readWriteMaskAttribute_async(
- UA_Client *client, const UA_NodeId nodeId,
- UA_ClientAsyncReadWriteMaskAttributeCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_readAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_WRITEMASK, &UA_TYPES[UA_TYPES_UINT32],
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- typedef void (*UA_ClientAsyncReadUserWriteMaskAttributeCallback)(UA_Client *client,
- void *userdata,
- UA_UInt32 requestId,
- UA_UInt32 *out);
- static UA_INLINE UA_StatusCode
- UA_Client_readUserWriteMaskAttribute_async(
- UA_Client *client, const UA_NodeId nodeId,
- UA_ClientAsyncReadUserWriteMaskAttributeCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_readAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_USERWRITEMASK, &UA_TYPES[UA_TYPES_UINT32],
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- typedef void (*UA_ClientAsyncReadIsAbstractAttributeCallback)(UA_Client *client,
- void *userdata,
- UA_UInt32 requestId,
- UA_Boolean *out);
- static UA_INLINE UA_StatusCode
- UA_Client_readIsAbstractAttribute_async(
- UA_Client *client, const UA_NodeId nodeId,
- UA_ClientAsyncReadIsAbstractAttributeCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_readAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_ISABSTRACT, &UA_TYPES[UA_TYPES_BOOLEAN],
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- typedef void (*UA_ClientAsyncReadSymmetricAttributeCallback)(UA_Client *client,
- void *userdata,
- UA_UInt32 requestId,
- UA_Boolean *out);
- static UA_INLINE UA_StatusCode
- UA_Client_readSymmetricAttribute_async(
- UA_Client *client, const UA_NodeId nodeId,
- UA_ClientAsyncReadSymmetricAttributeCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_readAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_SYMMETRIC, &UA_TYPES[UA_TYPES_BOOLEAN],
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- typedef void (*UA_ClientAsyncReadInverseNameAttributeCallback)(UA_Client *client,
- void *userdata,
- UA_UInt32 requestId,
- UA_LocalizedText *out);
- static UA_INLINE UA_StatusCode
- UA_Client_readInverseNameAttribute_async(
- UA_Client *client, const UA_NodeId nodeId,
- UA_ClientAsyncReadInverseNameAttributeCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_readAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_INVERSENAME, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT],
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- typedef void (*UA_ClientAsyncReadContainsNoLoopsAttributeCallback)(UA_Client *client,
- void *userdata,
- UA_UInt32 requestId,
- UA_Boolean *out);
- static UA_INLINE UA_StatusCode
- UA_Client_readContainsNoLoopsAttribute_async(
- UA_Client *client, const UA_NodeId nodeId,
- UA_ClientAsyncReadContainsNoLoopsAttributeCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_readAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_CONTAINSNOLOOPS, &UA_TYPES[UA_TYPES_BOOLEAN],
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- typedef void (*UA_ClientAsyncReadEventNotifierAttributeCallback)(UA_Client *client,
- void *userdata,
- UA_UInt32 requestId,
- UA_Byte *out);
- static UA_INLINE UA_StatusCode
- UA_Client_readEventNotifierAttribute_async(
- UA_Client *client, const UA_NodeId nodeId,
- UA_ClientAsyncReadEventNotifierAttributeCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_readAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_EVENTNOTIFIER, &UA_TYPES[UA_TYPES_BYTE],
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- typedef void (*UA_ClientAsyncReadValueRankAttributeCallback)(UA_Client *client,
- void *userdata,
- UA_UInt32 requestId,
- UA_Int32 *out);
- static UA_INLINE UA_StatusCode
- UA_Client_readValueRankAttribute_async(
- UA_Client *client, const UA_NodeId nodeId,
- UA_ClientAsyncReadValueRankAttributeCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_readAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_VALUERANK, &UA_TYPES[UA_TYPES_INT32],
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- typedef void (*UA_ClientAsyncReadAccessLevelAttributeCallback)(UA_Client *client,
- void *userdata,
- UA_UInt32 requestId,
- UA_Byte *out);
- static UA_INLINE UA_StatusCode
- UA_Client_readAccessLevelAttribute_async(
- UA_Client *client, const UA_NodeId nodeId,
- UA_ClientAsyncReadAccessLevelAttributeCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_readAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_ACCESSLEVEL, &UA_TYPES[UA_TYPES_BYTE],
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- typedef void (*UA_ClientAsyncReadUserAccessLevelAttributeCallback)(UA_Client *client,
- void *userdata,
- UA_UInt32 requestId,
- UA_Byte *out);
- static UA_INLINE UA_StatusCode
- UA_Client_readUserAccessLevelAttribute_async(
- UA_Client *client, const UA_NodeId nodeId,
- UA_ClientAsyncReadUserAccessLevelAttributeCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_readAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_USERACCESSLEVEL, &UA_TYPES[UA_TYPES_BYTE],
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- typedef void (*UA_ClientAsyncReadMinimumSamplingIntervalAttributeCallback)(
- UA_Client *client, void *userdata, UA_UInt32 requestId, UA_Double *out);
- static UA_INLINE UA_StatusCode
- UA_Client_readMinimumSamplingIntervalAttribute_async(
- UA_Client *client, const UA_NodeId nodeId,
- UA_ClientAsyncReadMinimumSamplingIntervalAttributeCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_readAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_MINIMUMSAMPLINGINTERVAL,
- &UA_TYPES[UA_TYPES_DOUBLE], (UA_ClientAsyncServiceCallback)callback, userdata,
- reqId);
- }
- typedef void (*UA_ClientAsyncReadHistorizingAttributeCallback)(UA_Client *client,
- void *userdata,
- UA_UInt32 requestId,
- UA_Boolean *out);
- static UA_INLINE UA_StatusCode
- UA_Client_readHistorizingAttribute_async(
- UA_Client *client, const UA_NodeId nodeId,
- UA_ClientAsyncReadHistorizingAttributeCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_readAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_HISTORIZING, &UA_TYPES[UA_TYPES_BOOLEAN],
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- typedef void (*UA_ClientAsyncReadExecutableAttributeCallback)(UA_Client *client,
- void *userdata,
- UA_UInt32 requestId,
- UA_Boolean *out);
- static UA_INLINE UA_StatusCode
- UA_Client_readExecutableAttribute_async(
- UA_Client *client, const UA_NodeId nodeId,
- UA_ClientAsyncReadExecutableAttributeCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_readAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_EXECUTABLE, &UA_TYPES[UA_TYPES_BOOLEAN],
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- typedef void (*UA_ClientAsyncReadUserExecutableAttributeCallback)(UA_Client *client,
- void *userdata,
- UA_UInt32 requestId,
- UA_Boolean *out);
- static UA_INLINE UA_StatusCode
- UA_Client_readUserExecutableAttribute_async(
- UA_Client *client, const UA_NodeId nodeId,
- UA_ClientAsyncReadUserExecutableAttributeCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_readAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_USEREXECUTABLE, &UA_TYPES[UA_TYPES_BOOLEAN],
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- /**
- * Write Attribute
- * ^^^^^^^^^^^^^^ */
- UA_StatusCode UA_EXPORT
- __UA_Client_writeAttribute_async(UA_Client *client, const UA_NodeId *nodeId,
- UA_AttributeId attributeId, const void *in,
- const UA_DataType *inDataType,
- UA_ClientAsyncServiceCallback callback, void *userdata,
- UA_UInt32 *reqId);
- static UA_INLINE UA_StatusCode
- UA_Client_writeValueAttribute_async(UA_Client *client, const UA_NodeId nodeId,
- const UA_Variant *newValue,
- UA_ClientAsyncWriteCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_writeAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_VALUE, newValue, &UA_TYPES[UA_TYPES_VARIANT],
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_writeNodeIdAttribute_async(UA_Client *client, const UA_NodeId nodeId,
- const UA_NodeId *outNodeId,
- UA_ClientAsyncServiceCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_writeAttribute_async(client, &nodeId, UA_ATTRIBUTEID_NODEID,
- outNodeId, &UA_TYPES[UA_TYPES_NODEID],
- callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_writeNodeClassAttribute_async(UA_Client *client, const UA_NodeId nodeId,
- const UA_NodeClass *outNodeClass,
- UA_ClientAsyncServiceCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_writeAttribute_async(client, &nodeId, UA_ATTRIBUTEID_NODECLASS,
- outNodeClass, &UA_TYPES[UA_TYPES_NODECLASS],
- callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_writeBrowseNameAttribute_async(UA_Client *client, const UA_NodeId nodeId,
- const UA_QualifiedName *outBrowseName,
- UA_ClientAsyncServiceCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_writeAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_BROWSENAME, outBrowseName,
- &UA_TYPES[UA_TYPES_QUALIFIEDNAME], callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_writeDisplayNameAttribute_async(UA_Client *client, const UA_NodeId nodeId,
- const UA_LocalizedText *outDisplayName,
- UA_ClientAsyncServiceCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_writeAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_DISPLAYNAME, outDisplayName,
- &UA_TYPES[UA_TYPES_LOCALIZEDTEXT], callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_writeDescriptionAttribute_async(UA_Client *client, const UA_NodeId nodeId,
- const UA_LocalizedText *outDescription,
- UA_ClientAsyncServiceCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_writeAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_DESCRIPTION, outDescription,
- &UA_TYPES[UA_TYPES_LOCALIZEDTEXT], callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_writeWriteMaskAttribute_async(UA_Client *client, const UA_NodeId nodeId,
- const UA_UInt32 *outWriteMask,
- UA_ClientAsyncServiceCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_writeAttribute_async(client, &nodeId, UA_ATTRIBUTEID_WRITEMASK,
- outWriteMask, &UA_TYPES[UA_TYPES_UINT32],
- callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_writeUserWriteMaskAttribute_async(UA_Client *client, const UA_NodeId nodeId,
- const UA_UInt32 *outUserWriteMask,
- UA_ClientAsyncServiceCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_writeAttribute_async(client, &nodeId, UA_ATTRIBUTEID_USERWRITEMASK,
- outUserWriteMask, &UA_TYPES[UA_TYPES_UINT32],
- callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_writeIsAbstractAttribute_async(UA_Client *client, const UA_NodeId nodeId,
- const UA_Boolean *outIsAbstract,
- UA_ClientAsyncServiceCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_writeAttribute_async(client, &nodeId, UA_ATTRIBUTEID_ISABSTRACT,
- outIsAbstract, &UA_TYPES[UA_TYPES_BOOLEAN],
- callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_writeSymmetricAttribute_async(UA_Client *client, const UA_NodeId nodeId,
- const UA_Boolean *outSymmetric,
- UA_ClientAsyncServiceCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_writeAttribute_async(client, &nodeId, UA_ATTRIBUTEID_SYMMETRIC,
- outSymmetric, &UA_TYPES[UA_TYPES_BOOLEAN],
- callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_writeInverseNameAttribute_async(UA_Client *client, const UA_NodeId nodeId,
- const UA_LocalizedText *outInverseName,
- UA_ClientAsyncServiceCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_writeAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_INVERSENAME, outInverseName,
- &UA_TYPES[UA_TYPES_LOCALIZEDTEXT], callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_writeContainsNoLoopsAttribute_async(UA_Client *client, const UA_NodeId nodeId,
- const UA_Boolean *outContainsNoLoops,
- UA_ClientAsyncServiceCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_writeAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_CONTAINSNOLOOPS, outContainsNoLoops,
- &UA_TYPES[UA_TYPES_BOOLEAN], callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_writeEventNotifierAttribute_async(UA_Client *client, const UA_NodeId nodeId,
- const UA_Byte *outEventNotifier,
- UA_ClientAsyncServiceCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_writeAttribute_async(client, &nodeId, UA_ATTRIBUTEID_EVENTNOTIFIER,
- outEventNotifier, &UA_TYPES[UA_TYPES_BYTE],
- callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_writeDataTypeAttribute_async(UA_Client *client, const UA_NodeId nodeId,
- const UA_NodeId *outDataType,
- UA_ClientAsyncServiceCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_writeAttribute_async(client, &nodeId, UA_ATTRIBUTEID_DATATYPE,
- outDataType, &UA_TYPES[UA_TYPES_NODEID],
- callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_writeValueRankAttribute_async(UA_Client *client, const UA_NodeId nodeId,
- const UA_Int32 *outValueRank,
- UA_ClientAsyncServiceCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_writeAttribute_async(client, &nodeId, UA_ATTRIBUTEID_VALUERANK,
- outValueRank, &UA_TYPES[UA_TYPES_INT32],
- callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_writeAccessLevelAttribute_async(UA_Client *client, const UA_NodeId nodeId,
- const UA_Byte *outAccessLevel,
- UA_ClientAsyncServiceCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_writeAttribute_async(client, &nodeId, UA_ATTRIBUTEID_ACCESSLEVEL,
- outAccessLevel, &UA_TYPES[UA_TYPES_BYTE],
- callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_writeUserAccessLevelAttribute_async(UA_Client *client, const UA_NodeId nodeId,
- const UA_Byte *outUserAccessLevel,
- UA_ClientAsyncServiceCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_writeAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_USERACCESSLEVEL, outUserAccessLevel,
- &UA_TYPES[UA_TYPES_BYTE], callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_writeMinimumSamplingIntervalAttribute_async(
- UA_Client *client, const UA_NodeId nodeId,
- const UA_Double *outMinimumSamplingInterval, UA_ClientAsyncServiceCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_writeAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_MINIMUMSAMPLINGINTERVAL,
- outMinimumSamplingInterval, &UA_TYPES[UA_TYPES_DOUBLE], callback, userdata,
- reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_writeHistorizingAttribute_async(UA_Client *client, const UA_NodeId nodeId,
- const UA_Boolean *outHistorizing,
- UA_ClientAsyncServiceCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_writeAttribute_async(client, &nodeId, UA_ATTRIBUTEID_HISTORIZING,
- outHistorizing, &UA_TYPES[UA_TYPES_BOOLEAN],
- callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_writeExecutableAttribute_async(UA_Client *client, const UA_NodeId nodeId,
- const UA_Boolean *outExecutable,
- UA_ClientAsyncServiceCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_writeAttribute_async(client, &nodeId, UA_ATTRIBUTEID_EXECUTABLE,
- outExecutable, &UA_TYPES[UA_TYPES_BOOLEAN],
- callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_writeUserExecutableAttribute_async(UA_Client *client, const UA_NodeId nodeId,
- const UA_Boolean *outUserExecutable,
- UA_ClientAsyncServiceCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_writeAttribute_async(
- client, &nodeId, UA_ATTRIBUTEID_USEREXECUTABLE, outUserExecutable,
- &UA_TYPES[UA_TYPES_BOOLEAN], callback, userdata, reqId);
- }
- /**
- * Method Calling
- * ^^^^^^^^^^^^^^ */
- #ifdef UA_ENABLE_METHODCALLS
- UA_StatusCode UA_EXPORT
- __UA_Client_call_async(UA_Client *client, const UA_NodeId objectId,
- const UA_NodeId methodId, size_t inputSize,
- const UA_Variant *input, UA_ClientAsyncServiceCallback callback,
- void *userdata, UA_UInt32 *reqId);
- typedef void (*UA_ClientAsyncCallCallback)(UA_Client *client, void *userdata,
- UA_UInt32 requestId, UA_CallResponse *cr);
- static UA_INLINE UA_StatusCode
- UA_Client_call_async(UA_Client *client, const UA_NodeId objectId,
- const UA_NodeId methodId, size_t inputSize, const UA_Variant *input,
- UA_ClientAsyncCallCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_call_async(client, objectId, methodId, inputSize, input,
- (UA_ClientAsyncServiceCallback)callback, userdata,
- reqId);
- }
- #endif
- /**
- * Node Management
- * ^^^^^^^^^^^^^^^ */
- typedef void (*UA_ClientAsyncAddNodesCallback)(UA_Client *client, void *userdata,
- UA_UInt32 requestId,
- UA_AddNodesResponse *ar);
- UA_StatusCode UA_EXPORT
- __UA_Client_addNode_async(UA_Client *client, const UA_NodeClass nodeClass,
- const UA_NodeId requestedNewNodeId,
- const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId,
- const UA_QualifiedName browseName,
- const UA_NodeId typeDefinition, const UA_NodeAttributes *attr,
- const UA_DataType *attributeType, UA_NodeId *outNewNodeId,
- UA_ClientAsyncServiceCallback callback, void *userdata,
- UA_UInt32 *reqId);
- static UA_INLINE UA_StatusCode
- UA_Client_addVariableNode_async(UA_Client *client, const UA_NodeId requestedNewNodeId,
- const UA_NodeId parentNodeId,
- const UA_NodeId referenceTypeId,
- const UA_QualifiedName browseName,
- const UA_NodeId typeDefinition,
- const UA_VariableAttributes attr, UA_NodeId *outNewNodeId,
- UA_ClientAsyncAddNodesCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_addNode_async(
- client, UA_NODECLASS_VARIABLE, requestedNewNodeId, parentNodeId, referenceTypeId,
- browseName, typeDefinition, (const UA_NodeAttributes *)&attr,
- &UA_TYPES[UA_TYPES_VARIABLEATTRIBUTES], outNewNodeId,
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_addVariableTypeNode_async(
- UA_Client *client, const UA_NodeId requestedNewNodeId, const UA_NodeId parentNodeId,
- const UA_NodeId referenceTypeId, const UA_QualifiedName browseName,
- const UA_VariableTypeAttributes attr, UA_NodeId *outNewNodeId,
- UA_ClientAsyncAddNodesCallback callback, void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_addNode_async(
- client, UA_NODECLASS_VARIABLETYPE, requestedNewNodeId, parentNodeId,
- referenceTypeId, browseName, UA_NODEID_NULL, (const UA_NodeAttributes *)&attr,
- &UA_TYPES[UA_TYPES_VARIABLETYPEATTRIBUTES], outNewNodeId,
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_addObjectNode_async(UA_Client *client, const UA_NodeId requestedNewNodeId,
- const UA_NodeId parentNodeId,
- const UA_NodeId referenceTypeId,
- const UA_QualifiedName browseName,
- const UA_NodeId typeDefinition,
- const UA_ObjectAttributes attr, UA_NodeId *outNewNodeId,
- UA_ClientAsyncAddNodesCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_addNode_async(
- client, UA_NODECLASS_OBJECT, requestedNewNodeId, parentNodeId, referenceTypeId,
- browseName, typeDefinition, (const UA_NodeAttributes *)&attr,
- &UA_TYPES[UA_TYPES_OBJECTATTRIBUTES], outNewNodeId,
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_addObjectTypeNode_async(
- UA_Client *client, const UA_NodeId requestedNewNodeId, const UA_NodeId parentNodeId,
- const UA_NodeId referenceTypeId, const UA_QualifiedName browseName,
- const UA_ObjectTypeAttributes attr, UA_NodeId *outNewNodeId,
- UA_ClientAsyncAddNodesCallback callback, void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_addNode_async(
- client, UA_NODECLASS_OBJECTTYPE, requestedNewNodeId, parentNodeId,
- referenceTypeId, browseName, UA_NODEID_NULL, (const UA_NodeAttributes *)&attr,
- &UA_TYPES[UA_TYPES_OBJECTTYPEATTRIBUTES], outNewNodeId,
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_addViewNode_async(UA_Client *client, const UA_NodeId requestedNewNodeId,
- const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId,
- const UA_QualifiedName browseName,
- const UA_ViewAttributes attr, UA_NodeId *outNewNodeId,
- UA_ClientAsyncAddNodesCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_addNode_async(
- client, UA_NODECLASS_VIEW, requestedNewNodeId, parentNodeId, referenceTypeId,
- browseName, UA_NODEID_NULL, (const UA_NodeAttributes *)&attr,
- &UA_TYPES[UA_TYPES_VIEWATTRIBUTES], outNewNodeId,
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_addReferenceTypeNode_async(
- UA_Client *client, const UA_NodeId requestedNewNodeId, const UA_NodeId parentNodeId,
- const UA_NodeId referenceTypeId, const UA_QualifiedName browseName,
- const UA_ReferenceTypeAttributes attr, UA_NodeId *outNewNodeId,
- UA_ClientAsyncAddNodesCallback callback, void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_addNode_async(
- client, UA_NODECLASS_REFERENCETYPE, requestedNewNodeId, parentNodeId,
- referenceTypeId, browseName, UA_NODEID_NULL, (const UA_NodeAttributes *)&attr,
- &UA_TYPES[UA_TYPES_REFERENCETYPEATTRIBUTES], outNewNodeId,
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_addDataTypeNode_async(UA_Client *client, const UA_NodeId requestedNewNodeId,
- const UA_NodeId parentNodeId,
- const UA_NodeId referenceTypeId,
- const UA_QualifiedName browseName,
- const UA_DataTypeAttributes attr, UA_NodeId *outNewNodeId,
- UA_ClientAsyncAddNodesCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_addNode_async(
- client, UA_NODECLASS_DATATYPE, requestedNewNodeId, parentNodeId, referenceTypeId,
- browseName, UA_NODEID_NULL, (const UA_NodeAttributes *)&attr,
- &UA_TYPES[UA_TYPES_DATATYPEATTRIBUTES], outNewNodeId,
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- static UA_INLINE UA_StatusCode
- UA_Client_addMethodNode_async(UA_Client *client, const UA_NodeId requestedNewNodeId,
- const UA_NodeId parentNodeId,
- const UA_NodeId referenceTypeId,
- const UA_QualifiedName browseName,
- const UA_MethodAttributes attr, UA_NodeId *outNewNodeId,
- UA_ClientAsyncAddNodesCallback callback, void *userdata,
- UA_UInt32 *reqId) {
- return __UA_Client_addNode_async(
- client, UA_NODECLASS_METHOD, requestedNewNodeId, parentNodeId, referenceTypeId,
- browseName, UA_NODEID_NULL, (const UA_NodeAttributes *)&attr,
- &UA_TYPES[UA_TYPES_METHODATTRIBUTES], outNewNodeId,
- (UA_ClientAsyncServiceCallback)callback, userdata, reqId);
- }
- /**
- * Misc Functionalities
- * ^^^^^^^^^^^^^^^^^^^^ */
- UA_StatusCode UA_EXPORT
- __UA_Client_translateBrowsePathsToNodeIds_async(UA_Client *client, char *paths[],
- UA_UInt32 ids[], size_t pathSize,
- UA_ClientAsyncServiceCallback callback,
- void *userdata, UA_UInt32 *reqId);
- typedef void (*UA_ClientAsyncTranslateCallback)(
- UA_Client *client, void *userdata, UA_UInt32 requestId,
- UA_TranslateBrowsePathsToNodeIdsResponse *tr);
- static UA_INLINE UA_StatusCode
- UA_Cient_translateBrowsePathsToNodeIds_async(UA_Client *client, char **paths,
- UA_UInt32 *ids, size_t pathSize,
- UA_ClientAsyncTranslateCallback callback,
- void *userdata, UA_UInt32 *reqId) {
- return __UA_Client_translateBrowsePathsToNodeIds_async(
- client, paths, ids, pathSize, (UA_ClientAsyncServiceCallback)callback, userdata,
- reqId);
- }
- _UA_END_DECLS
- #endif /* UA_CLIENT_HIGHLEVEL_ASYNC_H_ */
|