Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes
OpcUa::UaClient Class Reference

#include <client.h>

List of all members.

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< SubscriptionCreateSubscription (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< EndpointDescriptionGetServerEndpoints (const std::string &endpoint)
 Connect to server and get endpoints.
std::vector< EndpointDescriptionGetServerEndpoints ()
 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
UaClientoperator= (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::NodeAddChilds (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"

Detailed Description

Definition at line 61 of file client.h.


Constructor & Destructor Documentation

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 73 of file client.h.

Definition at line 268 of file client.cpp.


Member Function Documentation

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.

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.

Disconnect from server.

Definition at line 273 of file client.cpp.

std::string OpcUa::UaClient::GetApplicationURI ( ) const [inline]

set application description

Definition at line 114 of file client.h.

std::string OpcUa::UaClient::GetEndpoint ( ) const [inline]

Definition at line 111 of file client.h.

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.

Definition at line 334 of file client.cpp.

std::string OpcUa::UaClient::GetProductURI ( ) const [inline]

Definition at line 116 of file client.h.

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]

Definition at line 122 of file client.h.

std::vector< EndpointDescription > OpcUa::UaClient::GetServerEndpoints ( const std::string &  endpoint)

Connect to server and get endpoints.

Definition at line 93 of file client.cpp.

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.

Definition at line 340 of file client.cpp.

std::string OpcUa::UaClient::GetSessionName ( ) const [inline]

Definition at line 82 of file client.h.

Definition at line 244 of file client.cpp.

UaClient& OpcUa::UaClient::operator= ( const UaClient )
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]

Definition at line 115 of file client.h.

void OpcUa::UaClient::SetProductURI ( std::string  uri) [inline]

Definition at line 117 of file client.h.

void OpcUa::UaClient::SetSecurityPolicy ( std::string  sec) [inline]

set security policy

Definition at line 121 of file client.h.

void OpcUa::UaClient::SetSessionName ( const std::string &  str) [inline]

set session name

Definition at line 81 of file client.h.


Member Data Documentation

std::string OpcUa::UaClient::ApplicationUri = "urn:freeopcua:client" [private]

Definition at line 162 of file client.h.

bool OpcUa::UaClient::Debug = false [private]

Definition at line 167 of file client.h.

uint32_t OpcUa::UaClient::DefaultTimeout = 3600000 [private]

Definition at line 168 of file client.h.

Definition at line 159 of file client.h.

Definition at line 165 of file client.h.

std::string OpcUa::UaClient::ProductUri = "urn:freeopcua.github.no:client" [private]

Definition at line 163 of file client.h.

Definition at line 166 of file client.h.

std::string OpcUa::UaClient::SecurityPolicy = "none" [private]

Definition at line 164 of file client.h.

Services::SharedPtr OpcUa::UaClient::Server [protected]

Definition at line 171 of file client.h.

std::string OpcUa::UaClient::SessionName = "Open source OPC-UA Client Session" [private]

Definition at line 161 of file client.h.


The documentation for this class was generated from the following files:


ros_opcua_impl_freeopcua
Author(s): Denis Štogl
autogenerated on Sat Jun 8 2019 18:25:00