|
typedef void * | CVOPCCLT |
| Handle of an OPCUA Client object. It handles the client side of the OPCUA client/server interaction. More...
|
|
|
CVOPCCLT | CreateCVOPCClient () |
| Creates an OPCUA Client object. More...
|
|
cvbres_t | CVOPCClientAddMonitoredItem (CVOPCCLT Client, CVOPCNODE Variable, size_t SubscriptionIndex, pfCVOpcV Callback, void *pPrivate, size_t &CallbackId) |
| Adds a monitored item to an existing subscription. More...
|
|
cvbres_t | CVOPCClientConnect (CVOPCCLT Client, const char *DiscoveryURL) |
| Connects an OPCUA Client with an OPCUA Server which can be found under the given DiscoveryURL. More...
|
|
cvbres_t | CVOPCClientConnectW (CVOPCCLT Client, const wchar_t *DiscoveryURL) |
| Connects an OPCUA Client with an OPCUA Server which can be found under the given DiscoveryURL. More...
|
|
cvbres_t | CVOPCClientCreateSubscription (CVOPCCLT Client, size_t &SubscriptionIndex) |
| Creates an OPCUA Subscription for an OPCUA Client, where monitored items could be added to (receive updates if variable data changes). More...
|
|
cvbres_t | CVOPCClientDeleteMonitoredItem (CVOPCCLT Client, size_t SubscriptionIndex, size_t CallbackId) |
| Deletes an OPCUA Monitored Item which is identified by the unique CallbackId. More...
|
|
cvbres_t | CVOPCClientDeleteSubscription (CVOPCCLT Client, size_t SubscriptionIndex) |
| Creates the OPCUA Subscription for an OPCUA Client. More...
|
|
cvbres_t | CVOPCClientDisconnect (CVOPCCLT Client) |
| Disconnects an OPCUA Client that is connected to an OPCUA Server. More...
|
|
cvbres_t | CVOPCClientGetNode (CVOPCCLT Client, CVOPCNODEID NodeId, CVOPCNODE &Node) |
| Accesses a Node of the OPCUA Server, given a Client which is connected with that Server and given the NodeId of the Node. More...
|
|
cvbres_t | CVOPCClientGetState (CVOPCCLT Client, TCVOPCClientState &ClientState) |
| Gets the current state of an OPCUA Client. More...
|
|
cvbbool_t | IsCVOPCClient (CVOPCCLT Client) |
| Tries to check whether the given Client handle is a valid object. More...
|
|
Functions to create OPCUA Client objects that support the services Discovery, Read, Write, and Subscription.
◆ CVOPCCLT
◆ CreateCVOPCClient()
Creates an OPCUA Client object.
- Attention
- Release the returned object handle with ReleaseObject if not needed anymore.
- Returns
-
◆ CVOPCClientAddMonitoredItem()
cvbres_t CVOPCClientAddMonitoredItem |
( |
CVOPCCLT |
Client, |
|
|
CVOPCNODE |
Variable, |
|
|
size_t |
SubscriptionIndex, |
|
|
pfCVOpcV |
Callback, |
|
|
void * |
pPrivate, |
|
|
size_t & |
CallbackId |
|
) |
| |
Adds a monitored item to an existing subscription.
- Note
- This function is specialized to monitor the value of OPCUA Variables.
- Parameters
-
[in] | Client | OPCUA Client handle. |
[in] | Node | OPCUA Variable that should be monitored. |
[in] | Callback | Callback function pointer that is called when the value of the OPCUA Monitored Item changes. |
[in] | pPrivate | User data pointer to be given into Callback function. |
[out] | CallbackId | Unique CallbackId that refers to the callback of the OPCUA Monitored Item. |
- Returns
- #CVC_ERROR (#CVC_E_OK) on success.
- #CVC_ERROR (#CVC_E_WRONGOBJECT) if either Client or Variable are not a valid objects.
- Smaller than zero on error (Use CVOPCGetLastErrorString function for a human readable error description).
◆ CVOPCClientConnect()
cvbres_t CVOPCClientConnect |
( |
CVOPCCLT |
Client, |
|
|
const char * |
DiscoveryURL |
|
) |
| |
Connects an OPCUA Client with an OPCUA Server which can be found under the given DiscoveryURL.
- Attention
- Always use initialized variables and initialize unused handles with
nullptr
.
- Parameters
-
[in] | Client | OPCUA Client object. |
[in] | DiscoveryURL | URL of the OPCUA Server to be connected with. String must be 0 terminated. |
- Returns
- #CVC_ERROR (#CVC_E_OK) on success.the given OPCUA Client
- #CVC_ERROR (#CVC_E_WRONGOBJECT) if Client is not a valid object.
- Smaller than zero on error (Use CVOPCGetLastErrorString function for a human readable error description).
◆ CVOPCClientConnectW()
cvbres_t CVOPCClientConnectW |
( |
CVOPCCLT |
Client, |
|
|
const wchar_t * |
DiscoveryURL |
|
) |
| |
Connects an OPCUA Client with an OPCUA Server which can be found under the given DiscoveryURL.
- Attention
- Always use initialized variables and initialize unused handles with
nullptr
.
- Parameters
-
[in] | Client | OPCUA Client object. |
[in] | DiscoveryURL | URL of the OPCUA Server to be connected with. This wide string must be 0 terminated. |
- Returns
- #CVC_ERROR (#CVC_E_OK) on success.
- #CVC_ERROR (#CVC_E_WRONGOBJECT) if Client is not a valid object.
- Smaller than zero on error (Use CVOPCGetLastErrorString function for a human readable error description).
◆ CVOPCClientCreateSubscription()
cvbres_t CVOPCClientCreateSubscription |
( |
CVOPCCLT |
Client, |
|
|
size_t & |
SubscriptionIndex |
|
) |
| |
Creates an OPCUA Subscription for an OPCUA Client, where monitored items could be added to (receive updates if variable data changes).
- Parameters
-
[in] | Client | OPCUA Client handle. |
- Returns
- #CVC_ERROR (#CVC_E_OK) on success.
- #CVC_ERROR (#CVC_E_WRONGOBJECT) if Client is not a valid object.
- Smaller than zero on error (Use CVOPCGetLastErrorString function for a human readable error description).
◆ CVOPCClientDeleteMonitoredItem()
cvbres_t CVOPCClientDeleteMonitoredItem |
( |
CVOPCCLT |
Client, |
|
|
size_t |
SubscriptionIndex, |
|
|
size_t |
CallbackId |
|
) |
| |
Deletes an OPCUA Monitored Item which is identified by the unique CallbackId.
- Parameters
-
[in] | Client | OPCUA Client handle. |
[in] | NodeId | OPCUA Variable that is |
[out] | Node | OPCUA Variable that is |
[in] | Callback | Callback function pointer that is called when the value of the OPCUA Monitored Item changes. |
[in] | pPrivate | User data pointer to be given into Callback function. |
[out] | CallbackId | Unique CallbackId that refers to the callback of the OPCUA Monitored Item. |
- Returns
- #CVC_ERROR (#CVC_E_OK) on success.
- #CVC_ERROR (#CVC_E_WRONGOBJECT) if Client is not a valid object.
- Smaller than zero on error (Use CVOPCGetLastErrorString function for a human readable error description).
◆ CVOPCClientDeleteSubscription()
cvbres_t CVOPCClientDeleteSubscription |
( |
CVOPCCLT |
Client, |
|
|
size_t |
SubscriptionIndex |
|
) |
| |
Creates the OPCUA Subscription for an OPCUA Client.
- Note
- All monitored items that are part of the given subscription will be deleted as well.
- Parameters
-
[in] | Client | OPCUA Client handle. |
- Returns
- #CVC_ERROR (#CVC_E_OK) on success.
- #CVC_ERROR (#CVC_E_WRONGOBJECT) if Client is not a valid object.
- Smaller than zero on error (Use CVOPCGetLastErrorString function for a human readable error description).
◆ CVOPCClientDisconnect()
cvbres_t CVOPCClientDisconnect |
( |
CVOPCCLT |
Client | ) |
|
Disconnects an OPCUA Client that is connected to an OPCUA Server.
- Note
- OPCUA Client must be connected to an OPCUA Server so that the function returns with success. If the OPCUA Client was not connected before calling the function returns with an error code.
- Attention
- Always use initialized variables and initialize unused handles with
nullptr
.
- Parameters
-
[in] | Client | OPCUA Client object to be disconnected. |
- Returns
- #CVC_ERROR (#CVC_E_OK) on success.
- #CVC_ERROR (#CVC_E_WRONGOBJECT) if Client is not a valid object.
- Smaller than zero on error (Use CVOPCGetLastErrorString function for a human readable error description).
◆ CVOPCClientGetNode()
cvbres_t CVOPCClientGetNode |
( |
CVOPCCLT |
Client, |
|
|
CVOPCNODEID |
NodeId, |
|
|
CVOPCNODE & |
Node |
|
) |
| |
Accesses a Node of the OPCUA Server, given a Client which is connected with that Server and given the NodeId of the Node.
- Note
- The OPCUA Client must be connected to an OPCUA Server to succeed. The OPCUA NodeId must refer to an OPCUA Node present in the address space of the OPCUA Server.
- Attention
- Always use initialized variables and initialize unused handles with
nullptr
.
- Parameters
-
[in] | Client | OPCUA Client object to be disconnected. |
[in] | NodeId | OPCUA NodeId which identifies the node to be retrieved. |
[out] | Node | OPCUA Node object to be filled with the content of the OPCUA Node of the server's address space. |
- Returns
- #CVC_ERROR (#CVC_E_OK) on success.
- #CVC_ERROR (#CVC_E_WRONGOBJECT) if either Client or NodeId are not a valid objects.
- Smaller than zero on error (Use CVOPCGetLastErrorString function for a human readable error description).
◆ CVOPCClientGetState()
cvbres_t CVOPCClientGetState |
( |
CVOPCCLT |
Client, |
|
|
TCVOPCClientState & |
ClientState |
|
) |
| |
Gets the current state of an OPCUA Client.
- Attention
- Always use initialized variables and initialize unused handles with
nullptr
.
- Parameters
-
[in] | Client | OPCUA Client object. |
[out] | Client | state enum. |
- Returns
- #CVC_ERROR (#CVC_E_OK) on success.the given OPCUA Client
- #CVC_ERROR (#CVC_E_WRONGOBJECT) if Client is not a valid object.
- Smaller than zero on error (Use CVOPCGetLastErrorString function for a human readable error description).
◆ IsCVOPCClient()
cvbbool_t IsCVOPCClient |
( |
CVOPCCLT |
Client | ) |
|
Tries to check whether the given Client handle is a valid object.
- Attention
- Always use initialized variables and initialize unused handles with
nullptr
.
- Parameters
-
[in] | OPCUA | client handle to check. |
- Returns
- TRUE if it is a valid object, FALSE otherwise.