Functions | |
CVOPCSRV | CreateCVOPCServer (cvbuint16_t PortNumber) |
Creates an Server OPCUA Server with the specified PortNumber. More... | |
cvbres_t | CVOPCNodeDeregisterMethodCallback (CVOPCNODE Method, size_t CallbackId) |
Unregisters the Callback referring to an OPCUA Method given an unique CallbackId. More... | |
cvbres_t | CVOPCNodeDeregisterVariableCallback (CVOPCNODE Variable, size_t CallbackId) |
Unregisters the Callback referring to an OPCUA Variable given an unique CallbackId. More... | |
cvbres_t | CVOPCNodeRegisterMethodCallback (CVOPCNODE Method, pfCVOpcM Callback, void *pPrivate, size_t &CallbackId) |
Registers callbacks of a OPCUA Method that has been already added to a server so that the Method is connected to the API. More... | |
cvbres_t | CVOPCNodeRegisterVariableCallback (CVOPCNODE Variable, pfCVOpcV CallbackRead, pfCVOpcV CallbackWrite, void *pPrivate, size_t &CallbackId) |
Registers callbacks of a OPCUA Variable that has been already added to server so that the Variable is connected to the API. More... | |
cvbres_t | CVOPCServerAddNameSpace (CVOPCSRV Server, const char *NameSpaceName, cvbuint16_t &NameSpaceIndex) |
Adds a new NameSpace defined as a C string to the Server. The NameSpaceIndex of this NameSpace will be returned. More... | |
cvbres_t | CVOPCServerAddNameSpaceW (CVOPCSRV Server, const wchar_t *NameSpaceName, cvbuint16_t &NameSpaceIndex) |
Adds a new NameSpace defined as a wide C string to the Server. The NameSpaceIndex of this NameSpace will be returned. More... | |
cvbres_t | CVOPCServerAddNode (CVOPCSRV Server, CVOPCNODE Node) |
Adds a OPCUA Node to the server. More... | |
cvbres_t | CVOPCServerDeleteNode (CVOPCSRV Server, CVOPCNODEID NodeOrId) |
Removes an OPCUA Node Attribute from OPCUA Server. More... | |
cvbres_t | CVOPCServerDeleteNodeEx (CVOPCSRV Server, CVOPCNODE Node) |
Removes an OPCUA Node Attribute from OPCUA Server. More... | |
cvbres_t | CVOPCServerDeregisterAll (CVOPCSRV Server) |
Unregisters all method and variable callbacks. More... | |
cvbres_t | CVOPCServerGetDisoveryURL (CVOPCSRV Server, char *URL, size_t &URLSize) |
Gets the URL of an Server OPCUA Server as an C string. More... | |
cvbres_t | CVOPCServerGetDisoveryURLW (CVOPCSRV Server, wchar_t *URL, size_t &URLSize) |
Gets the URL of an Server OPCUA Server as a wide C string. More... | |
cvbres_t | CVOPCServerGetNode (CVOPCSRV server, CVOPCNODEID NodeId, CVOPCNODE &Node) |
Gets a OPCUA NodeOrId to the server which is identified by an OPCUA NodeId. More... | |
cvbres_t | CVOPCServerGetState (CVOPCSRV Server, TCVOPCServerState &ServerState) |
Returns the current state of the OPCUA server. More... | |
cvbres_t | CVOPCServerStart (CVOPCSRV Server) |
Starts an OPCUA Server. More... | |
cvbres_t | CVOPCServerStop (CVOPCSRV Server) |
Stops an OPCUA Server. More... | |
cvbbool_t | IsCVOPCServer (CVOPCSRV Server) |
Tries to check whether the given Server handle is a valid object. More... | |
Functions to create OPCUA Server objects, create OPCUA NameSpaces on the Server, add OPCUA Node objects to the Server's address space, register callbacks for OPCUA Variables and OPCUA Methods.
CVOPCSRV CreateCVOPCServer | ( | cvbuint16_t | PortNumber | ) |
Creates an Server OPCUA Server with the specified PortNumber.
[in] | PortNumber | must have a valid positive integer number. 4840 and 4843 are reserved for the OpcUA TCP protocol. They are usually used to connect to a LDS server If you want to define a different number please use a number in between 1024 and 65535 to avoid conflict with well known ports that are registered by the Internet Assigned Numbers Authority (IANA) |
nullptr
on error (Use CVOPCGetLastErrorString function for a human readable error description). cvbres_t CVOPCNodeDeregisterMethodCallback | ( | CVOPCNODE | Method, |
size_t | CallbackId | ||
) |
Unregisters the Callback referring to an OPCUA Method given an unique CallbackId.
[in] | Method | OPCUA node handle. |
[in] | CallbackId | Unique callback ID that refers to OPCUA variable for which the callback should be removed. |
cvbres_t CVOPCNodeDeregisterVariableCallback | ( | CVOPCNODE | Variable, |
size_t | CallbackId | ||
) |
Unregisters the Callback referring to an OPCUA Variable given an unique CallbackId.
[in] | Variable | OPCUA node handle. |
[in] | CallbackId | Unique callback ID that refers to OPCUA variable for which the callback should be removed. |
cvbres_t CVOPCNodeRegisterMethodCallback | ( | CVOPCNODE | Method, |
pfCVOpcM | Callback, | ||
void * | pPrivate, | ||
size_t & | CallbackId | ||
) |
Registers callbacks of a OPCUA Method that has been already added to a server so that the Method is connected to the API.
[in] | Node | OPCUA Node handle. |
[in] | CallbackRead | Callback function pointer of function being called when an OPCUA Client calls the method. |
[in] | pPrivate | User data pointer to be given into Callback function. |
[out] | CallbackId | Unique callback ID that refers the callback of the added method. Use this ID to unregister the Callback. |
cvbres_t CVOPCNodeRegisterVariableCallback | ( | CVOPCNODE | Variable, |
pfCVOpcV | CallbackRead, | ||
pfCVOpcV | CallbackWrite, | ||
void * | pPrivate, | ||
size_t & | CallbackId | ||
) |
Registers callbacks of a OPCUA Variable that has been already added to server so that the Variable is connected to the API.
[in] | Node | OPCUA Node handle. |
[in] | CallbackRead | Callback function pointer of function being called when an OPCUA Client reads the variable. |
[in] | CallbackWrite | Callback function pointer of function being called when an OPCUA Client writes the variable. |
[in] | pPrivate | User data pointer to be given into Callback function. |
[out] | CallbackId | Unique callback ID that refers the callback of the added variable. Use this ID to unregister the Callback. |
cvbres_t CVOPCServerAddNameSpace | ( | CVOPCSRV | Server, |
const char * | NameSpaceName, | ||
cvbuint16_t & | NameSpaceIndex | ||
) |
Adds a new NameSpace defined as a C string to the Server. The NameSpaceIndex of this NameSpace will be returned.
[in] | Server | OPCUA Server handle to be initialized. |
[in] | NameSpaceName | New Name of the NameSpace to be added to the server. String must be 0 terminated. |
[out] | NameSpaceIndex | Numeric index of new namespace name which is assigned by the OPCUA Server. |
cvbres_t CVOPCServerAddNameSpaceW | ( | CVOPCSRV | Server, |
const wchar_t * | NameSpaceName, | ||
cvbuint16_t & | NameSpaceIndex | ||
) |
Adds a new NameSpace defined as a wide C string to the Server. The NameSpaceIndex of this NameSpace will be returned.
[in] | Server | OPCUA Server handle to be initialized. |
[in] | NameSpaceName | New Name of the NameSpace to be added to the server. This wide string must be 0 terminated. |
[out] | NameSpaceIndex | Numeric index of new namespace name which is assigned by the OPCUA Server. |
cvbres_t CVOPCServerAddNode | ( | CVOPCSRV | Server, |
CVOPCNODE | Node | ||
) |
Adds a OPCUA Node to the server.
[in] | Server | OPCUA Server handle. |
[in] | NodeOrId | OPCUA NodeOrId handle. |
cvbres_t CVOPCServerDeleteNode | ( | CVOPCSRV | Server, |
CVOPCNODEID | NodeOrId | ||
) |
Removes an OPCUA Node Attribute from OPCUA Server.
[in] | Server | OPCUA Server handle. |
[in] | NodeOrId | OPCUA NodeOrId handle or NodeId of the node to be removed form the server. |
cvbres_t CVOPCServerDeleteNodeEx | ( | CVOPCSRV | Server, |
CVOPCNODE | Node | ||
) |
Removes an OPCUA Node Attribute from OPCUA Server.
[in] | Server | OPCUA Server handle. |
[in] | NodeOrId | OPCUA NodeOrId handle or NodeId of the node to be removed form the server. |
cvbres_t CVOPCServerDeregisterAll | ( | CVOPCSRV | Server | ) |
Unregisters all method and variable callbacks.
[in] | Server | OPCUA Server handle. |
cvbres_t CVOPCServerGetDisoveryURL | ( | CVOPCSRV | Server, |
char * | URL, | ||
size_t & | URLSize | ||
) |
Gets the URL of an Server OPCUA Server as an C string.
[in] | Server | OPCUA server handle |
[out] | URL | Pointer of char array to contain c-string representation of URL. |
[in,out] | URLSize | Length Number of bytes allocated in URL string if it is unequal nullptr . Receives minimal number of bytes needed for full string representation including zero-termination. |
cvbres_t CVOPCServerGetDisoveryURLW | ( | CVOPCSRV | Server, |
wchar_t * | URL, | ||
size_t & | URLSize | ||
) |
Gets the URL of an Server OPCUA Server as a wide C string.
[in] | Server | OPCUA server handle |
[out] | URL | Pointer of wide char array to contain wide C string representation of URL. |
[in,out] | URLSize | Length Number of bytes allocated in URL string if it is unequal nullptr . Receives minimal number of bytes needed for full string representation including zero-termination. |
cvbres_t CVOPCServerGetNode | ( | CVOPCSRV | server, |
CVOPCNODEID | NodeId, | ||
CVOPCNODE & | Node | ||
) |
Gets a OPCUA NodeOrId to the server which is identified by an OPCUA NodeId.
[in] | Server | OPCUA Server handle. |
[in] | NodeId | OPCUA NodeId handle. |
[out] | NodeOrId | OPCUA NodeOrId handle. |
cvbres_t CVOPCServerGetState | ( | CVOPCSRV | Server, |
TCVOPCServerState & | ServerState | ||
) |
Returns the current state of the OPCUA server.
[in] | Server | OPCUA Server handle. |
[out] | Current | OPCUA Server State to be returned. |
cvbres_t CVOPCServerStart | ( | CVOPCSRV | Server | ) |
Starts an OPCUA Server.
[in] | Server | OPCUA Server handle. |
cvbres_t CVOPCServerStop | ( | CVOPCSRV | Server | ) |
Stops an OPCUA Server.
[in] | Server | OPCUA Server handle. |
cvbbool_t IsCVOPCServer | ( | CVOPCSRV | Server | ) |
Tries to check whether the given Server handle is a valid object.
nullptr
.[in] | Server | OPCUA Server handle to check. |