#include <client.h>
Public Member Functions | |
void | Abort () |
Abort server connection. | |
void | Connect (const std::string &endpoint) |
connect to a server, specify endpoint as string | |
void | Connect (const EndpointDescription &) |
connect to a server, specify endpoint as EndpointDesciption | |
ServerOperations | CreateServerOperations () |
Create a server operations object. | |
std::unique_ptr< Subscription > | CreateSubscription (unsigned int period, SubscriptionHandler &client) |
Create a subscription objects. | |
void | DeleteNodes (std::vector< OpcUa::Node > &nodes, bool recursive=false) |
void | Disconnect () |
Disconnect from server. | |
std::string | GetApplicationURI () const |
set application description | |
std::string | GetEndpoint () const |
uint32_t | GetNamespaceIndex (std::string uri) |
Node | GetNode (const NodeId &nodeid) const |
Get a specific node by nodeid. | |
Node | GetNode (const std::string &nodeid) const |
Node | GetObjectsNode () const |
std::string | GetProductURI () const |
Node | GetRootNode () const |
helper methods for node you will probably want to access | |
std::string | GetSecurityPolicy () const |
std::vector< EndpointDescription > | GetServerEndpoints (const std::string &endpoint) |
Connect to server and get endpoints. | |
std::vector< EndpointDescription > | GetServerEndpoints () |
get endpoints from server, assume we are already connected | |
std::vector< std::string > | GetServerNamespaces () |
Get namespaces used by server. | |
Node | GetServerNode () const |
std::string | GetSessionName () const |
UaClient & | operator= (const UaClient &) |
EndpointDescription | SelectEndpoint (const std::string &) |
Connect to server and select one endpoint. | |
void | SetApplicationURI (std::string uri) |
void | SetProductURI (std::string uri) |
void | SetSecurityPolicy (std::string sec) |
set security policy | |
void | SetSessionName (const std::string &str) |
set session name | |
UaClient (bool debug=false) | |
create high level client this class is meant to be used to quickly/easily connect to an OPCUA server it may not offer absolutely all features available in protocol you may want to look at code and implement your own client if you need debug argument will make freeopcua write A LOT to stdout set endpoint uri on wich server will listen. opc.tcp://localhost:4841/opcua/server opc.tcp://192.168.1.1:4840/opcua/server opc.tcp://server.freeopca.org:4841/opcua/server | |
UaClient (const UaClient &&) | |
UaClient (const UaClient &) | |
~UaClient () | |
Protected Attributes | |
Services::SharedPtr | Server |
Private Member Functions | |
std::vector< OpcUa::Node > | AddChilds (std::vector< OpcUa::Node > nodes) |
void | CloseSecureChannel () |
void | OpenSecureChannel () |
Private Attributes | |
std::string | ApplicationUri = "urn:freeopcua:client" |
bool | Debug = false |
uint32_t | DefaultTimeout = 3600000 |
EndpointDescription | Endpoint |
KeepAliveThread | KeepAlive |
std::string | ProductUri = "urn:freeopcua.github.no:client" |
uint32_t | SecureChannelId |
std::string | SecurityPolicy = "none" |
std::string | SessionName = "Open source OPC-UA Client Session" |
OpcUa::UaClient::UaClient | ( | bool | debug = false | ) | [inline] |
create high level client this class is meant to be used to quickly/easily connect to an OPCUA server it may not offer absolutely all features available in protocol you may want to look at code and implement your own client if you need debug argument will make freeopcua write A LOT to stdout set endpoint uri on wich server will listen. opc.tcp://localhost:4841/opcua/server opc.tcp://192.168.1.1:4840/opcua/server opc.tcp://server.freeopca.org:4841/opcua/server
Definition at line 268 of file client.cpp.
OpcUa::UaClient::UaClient | ( | const UaClient && | ) |
OpcUa::UaClient::UaClient | ( | const UaClient & | ) |
void OpcUa::UaClient::Abort | ( | ) |
Abort server connection.
Definition at line 286 of file client.cpp.
std::vector< OpcUa::Node > OpcUa::UaClient::AddChilds | ( | std::vector< OpcUa::Node > | nodes | ) | [private] |
Definition at line 369 of file client.cpp.
void OpcUa::UaClient::CloseSecureChannel | ( | ) | [private] |
Definition at line 263 of file client.cpp.
void OpcUa::UaClient::Connect | ( | const std::string & | endpoint | ) |
connect to a server, specify endpoint as string
Definition at line 162 of file client.cpp.
void OpcUa::UaClient::Connect | ( | const EndpointDescription & | endpoint | ) |
connect to a server, specify endpoint as EndpointDesciption
Definition at line 169 of file client.cpp.
Create a server operations object.
Definition at line 395 of file client.cpp.
std::unique_ptr< Subscription > OpcUa::UaClient::CreateSubscription | ( | unsigned int | period, |
SubscriptionHandler & | client | ||
) |
Create a subscription objects.
Definition at line 387 of file client.cpp.
void OpcUa::UaClient::DeleteNodes | ( | std::vector< OpcUa::Node > & | nodes, |
bool | recursive = false |
||
) |
Definition at line 346 of file client.cpp.
void OpcUa::UaClient::Disconnect | ( | ) |
Disconnect from server.
Definition at line 273 of file client.cpp.
std::string OpcUa::UaClient::GetApplicationURI | ( | ) | const [inline] |
std::string OpcUa::UaClient::GetEndpoint | ( | ) | const [inline] |
uint32_t OpcUa::UaClient::GetNamespaceIndex | ( | std::string | uri | ) |
Definition at line 300 of file client.cpp.
Node OpcUa::UaClient::GetNode | ( | const NodeId & | nodeid | ) | const |
Get a specific node by nodeid.
Definition at line 322 of file client.cpp.
Node OpcUa::UaClient::GetNode | ( | const std::string & | nodeid | ) | const |
Definition at line 317 of file client.cpp.
Node OpcUa::UaClient::GetObjectsNode | ( | ) | const |
Definition at line 334 of file client.cpp.
std::string OpcUa::UaClient::GetProductURI | ( | ) | const [inline] |
Node OpcUa::UaClient::GetRootNode | ( | ) | const |
helper methods for node you will probably want to access
Definition at line 328 of file client.cpp.
std::string OpcUa::UaClient::GetSecurityPolicy | ( | ) | const [inline] |
std::vector< EndpointDescription > OpcUa::UaClient::GetServerEndpoints | ( | const std::string & | endpoint | ) |
Connect to server and get endpoints.
Definition at line 93 of file client.cpp.
std::vector< EndpointDescription > OpcUa::UaClient::GetServerEndpoints | ( | ) |
get endpoints from server, assume we are already connected
Definition at line 113 of file client.cpp.
std::vector< std::string > OpcUa::UaClient::GetServerNamespaces | ( | ) |
Get namespaces used by server.
Definition at line 293 of file client.cpp.
Node OpcUa::UaClient::GetServerNode | ( | ) | const |
Definition at line 340 of file client.cpp.
std::string OpcUa::UaClient::GetSessionName | ( | ) | const [inline] |
void OpcUa::UaClient::OpenSecureChannel | ( | ) | [private] |
Definition at line 244 of file client.cpp.
EndpointDescription OpcUa::UaClient::SelectEndpoint | ( | const std::string & | endpoint | ) |
Connect to server and select one endpoint.
Definition at line 124 of file client.cpp.
void OpcUa::UaClient::SetApplicationURI | ( | std::string | uri | ) | [inline] |
void OpcUa::UaClient::SetProductURI | ( | std::string | uri | ) | [inline] |
void OpcUa::UaClient::SetSecurityPolicy | ( | std::string | sec | ) | [inline] |
void OpcUa::UaClient::SetSessionName | ( | const std::string & | str | ) | [inline] |
std::string OpcUa::UaClient::ApplicationUri = "urn:freeopcua:client" [private] |
bool OpcUa::UaClient::Debug = false [private] |
uint32_t OpcUa::UaClient::DefaultTimeout = 3600000 [private] |
EndpointDescription OpcUa::UaClient::Endpoint [private] |
KeepAliveThread OpcUa::UaClient::KeepAlive [private] |
std::string OpcUa::UaClient::ProductUri = "urn:freeopcua.github.no:client" [private] |
uint32_t OpcUa::UaClient::SecureChannelId [private] |
std::string OpcUa::UaClient::SecurityPolicy = "none" [private] |
Services::SharedPtr OpcUa::UaClient::Server [protected] |
std::string OpcUa::UaClient::SessionName = "Open source OPC-UA Client Session" [private] |