#include <client.h>
Public Member Functions | |
void | Abort () |
Abort server connection. More... | |
void | Connect (const std::string &endpoint) |
connect to a server, specify endpoint as string More... | |
void | Connect (const EndpointDescription &) |
connect to a server, specify endpoint as EndpointDesciption More... | |
ServerOperations | CreateServerOperations () |
Create a server operations object. More... | |
Subscription::SharedPtr | CreateSubscription (unsigned int period, SubscriptionHandler &client) |
Create a subscription objects. More... | |
void | DeleteNodes (std::vector< OpcUa::Node > &nodes, bool recursive=false) |
void | Disconnect () |
Disconnect from server. More... | |
std::string | GetApplicationURI () const |
set application description More... | |
std::string | GetEndpoint () const |
uint32_t | GetNamespaceIndex (std::string uri) |
Node | GetNode (const NodeId &nodeid) const |
Get a specific node by nodeid. More... | |
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 More... | |
std::string | GetSecurityPolicy () const |
std::vector< EndpointDescription > | GetServerEndpoints (const std::string &endpoint) |
Connect to server and get endpoints. More... | |
std::vector< EndpointDescription > | GetServerEndpoints () |
get endpoints from server, assume we are already connected More... | |
std::vector< std::string > | GetServerNamespaces () |
Get namespaces used by server. More... | |
Node | GetServerNode () const |
std::string | GetSessionName () const |
UaClient & | operator= (const UaClient &)=delete |
EndpointDescription | SelectEndpoint (const std::string &) |
Connect to server and select one endpoint. More... | |
void | SetApplicationURI (std::string uri) |
void | SetProductURI (std::string uri) |
void | SetSecurityPolicy (std::string sec) |
set security policy More... | |
void | SetSessionName (const std::string &str) |
set session name More... | |
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 More... | |
UaClient (std::shared_ptr< spdlog::logger > logger) | |
UaClient (const UaClient &&)=delete | |
UaClient (const UaClient &)=delete | |
virtual | ~UaClient () |
Protected Member Functions | |
virtual void | EncryptPassword (OpcUa::UserIdentifyToken &identity, const CreateSessionResponse &response) |
Protected Attributes | |
std::string | ApplicationUri = "urn:freeopcua:client" |
uint32_t | DefaultTimeout = 3600000 |
EndpointDescription | Endpoint |
KeepAliveThread | KeepAlive |
Common::Logger::SharedPtr | Logger |
std::string | ProductUri = "urn:freeopcua.github.no:client" |
uint32_t | SecureChannelId |
std::string | SecurityPolicy = "none" |
Services::SharedPtr | Server |
std::string | SessionName = "Open source OPC-UA Client Session" |
Private Member Functions | |
std::vector< OpcUa::Node > | AddChilds (std::vector< OpcUa::Node > nodes) |
void | CloseSecureChannel () |
void | OpenSecureChannel () |
OpcUa::UaClient::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
Definition at line 114 of file client.cpp.
|
inline |
|
virtual |
Definition at line 342 of file client.cpp.
|
delete |
|
delete |
void OpcUa::UaClient::Abort | ( | ) |
Abort server connection.
Definition at line 363 of file client.cpp.
|
private |
Definition at line 458 of file client.cpp.
|
private |
Definition at line 337 of file client.cpp.
void OpcUa::UaClient::Connect | ( | const std::string & | endpoint | ) |
connect to a server, specify endpoint as string
Definition at line 213 of file client.cpp.
void OpcUa::UaClient::Connect | ( | const EndpointDescription & | endpoint | ) |
connect to a server, specify endpoint as EndpointDesciption
Definition at line 220 of file client.cpp.
ServerOperations OpcUa::UaClient::CreateServerOperations | ( | ) |
Create a server operations object.
Definition at line 487 of file client.cpp.
Subscription::SharedPtr OpcUa::UaClient::CreateSubscription | ( | unsigned int | period, |
SubscriptionHandler & | client | ||
) |
Create a subscription objects.
Definition at line 479 of file client.cpp.
void OpcUa::UaClient::DeleteNodes | ( | std::vector< OpcUa::Node > & | nodes, |
bool | recursive = false |
||
) |
Definition at line 431 of file client.cpp.
void OpcUa::UaClient::Disconnect | ( | ) |
Disconnect from server.
Definition at line 347 of file client.cpp.
|
protectedvirtual |
Definition at line 492 of file client.cpp.
|
inline |
uint32_t OpcUa::UaClient::GetNamespaceIndex | ( | std::string | uri | ) |
Definition at line 378 of file client.cpp.
Get a specific node by nodeid.
Definition at line 403 of file client.cpp.
Node OpcUa::UaClient::GetNode | ( | const std::string & | nodeid | ) | const |
Definition at line 398 of file client.cpp.
Node OpcUa::UaClient::GetObjectsNode | ( | ) | const |
Definition at line 417 of file client.cpp.
|
inline |
Node OpcUa::UaClient::GetRootNode | ( | ) | const |
helper methods for node you will probably want to access
Definition at line 410 of file client.cpp.
|
inline |
std::vector< EndpointDescription > OpcUa::UaClient::GetServerEndpoints | ( | const std::string & | endpoint | ) |
Connect to server and get endpoints.
Definition at line 133 of file client.cpp.
std::vector< EndpointDescription > OpcUa::UaClient::GetServerEndpoints | ( | ) |
get endpoints from server, assume we are already connected
Definition at line 153 of file client.cpp.
std::vector< std::string > OpcUa::UaClient::GetServerNamespaces | ( | ) |
Get namespaces used by server.
Definition at line 370 of file client.cpp.
Node OpcUa::UaClient::GetServerNode | ( | ) | const |
Definition at line 424 of file client.cpp.
|
inline |
|
private |
Definition at line 317 of file client.cpp.
EndpointDescription OpcUa::UaClient::SelectEndpoint | ( | const std::string & | endpoint | ) |
Connect to server and select one endpoint.
Definition at line 164 of file client.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |