Skip to content

Reference

OpcClient Members

Provides session based methods to access OPC UA server services.

Reference

OpcClient Members ​

Type
OpcClient
Namespace
Opc.UaFx.Client
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0
Also in
Opc.UaFx.Client

Inherits members from OpcApplicationInstance<OpcTransport, OpcClientSecurity>.

Constructors ​

NameDescription
OpcClient5 overloadsInitializes a new instance of the OpcClient class.

Fields ​

NameDescription
DefaultDisconnectTimeoutstaticRepresents the default timeout value that is used by the OpcClient as initial value of the DisconnectTimeout property.
DefaultOperationTimeoutstaticRepresents the default timeout value that is used by the OpcClient as initial value of the OperationTimeout property.
DefaultReconnectIntervalstatic · since v2.58Represents the default interval that is used by the OpcClient as initial value of the ReconnectInterval property.
DefaultReconnectTimeoutstatic · Obsolete: Use DefaultReconnectInterval instead.Represents the default interval that is used by the OpcClient as initial value of the ReconnectInterval property.
DefaultSessionTimeoutstaticRepresents the default timeout value that is used by the OpcClient as initial value of the SessionTimeout property.

Properties ​

NameDescription
ApplicationNameoverrideGets or sets the name of the client application.
ConfigurationoverrideGets or sets an instance of the OpcApplicationConfiguration class which is used as a low-level representation of the code/file based client application configuration.
DefaultSubscriptionGets or sets the subscription which is assigned as the default subscription of the sessions used by the OpcClient.
DisconnectTimeoutGets or sets the wait time before terminating the attempt to shut-down an activated session.
Interfacessince v2.18Gets the OpcClientInterfaces instance which provides options to control the access to the different OPC Classic interfaces used/provided by the OpcClient.
KeepAlivesince v2.8Gets the keep-alive options used by the OpcClient to monitor an established connection and recover from unexpected disconnection.
LocalesGets a collection of locales supported/used by the client.
MaxReconnectDurationsince v2.58Gets or sets the time after which the client stops attempting to reconnect to a halted session.
Namespacesoverride · since v2.12Gets a read-only collection of namespaces used by the server connected to.
NodeSetsince v2.8Gets or sets the OpcNodeSet which is offered by the server the client is operating on.
OperationTimeoutGets or sets the wait time before terminating an operation being processed by the server.
ReconnectIntervalsince v2.58Gets or sets the time between two attempts to reconnect to a halted session.
ReconnectTimeoutObsolete: Use ReconnectInterval instead.Gets or sets the time between two attempts to reconnect to a halted session.
ServerAddressGets or sets the Uri of the OPC UA server to operate on.
ServerInterfacessince v2.8Gets a collection of OPC Classic interfaces supported by the server and used by the client.
ServicesGets the OpcClientServices instance which provides direct access to the different OPC UA services used/provided by the OpcClient.
SessionNameGets or sets the name to use for sessions to identify a session of this client.
SessionTimeoutGets or sets the wait time before an active session is handled as expired.
StateGets a value that indicates the current state of the client regarding its channel used to communicate with the endpoint defined by ServerAddress and EndpointPolicy setup via Security.
SubscriptionsGets the subscriptions which are currently associated with the session of the OpcClient.
SystemContextoverrideGets the OpcContext which is used to store the context sensitive data and configuration used by the current OpcClient instance.
UseBreakDetectionGets or sets a value indicating whether a connection break detection is to be used.
UsedEndpointGets the OpcEndpointDescription of the servers provided endpoints which has been selected by the client to connect to the server.
UseDynamicsince v2.8Gets or sets a value indicating whether the current OpcClient shall use generic types to represent OPC UA server defined custom types.

Methods ​

NameDescription
AddNodesince v2.7Adds a new node into the address space hierarchy using the command specified.
AddNodes2 overloads · since v2.7Adds one or more nodes into the address space hierarchy using the commands specified.
AddObjectNode10 overloads · since v2.7Adds a new object node into the address space hierarchy using the specified type of object node to add, which shall be accessible by the name defined.
AddReference5 overloads · since v2.7Adds a new reference to existing nodes in the address space hierarchy using the command specified.
AddReferences2 overloads · since v2.7Adds one or more references to existing nodes in the address space hierarchy using the commands specified.
AddVariableNode10 overloads · since v2.7Adds a new variable node into the address space hierarchy using the specified type of variable node to add, which shall be accessible by the name defined.
BrowseNode7 overloadsBrowses the node identified by the nodeId specified to examine its attributes and its hierarchical references (see HierarchicalReferences) in the default view.
BrowseNodes2 overloads · since v2.9Browses the nodes as defined by the commands specified to examine their attributes and their references.
CallAction9 overloads · since v2.8Calls the method identified by the methodId on the object identified by the objectId specified without any input arguments and discards the values of the output arguments returned.
CallFunc9 overloads · since v2.8Calls the method identified by the methodId on the object identified by the objectId specified without any input arguments and returns the value of its first output argument.
CallMethod4 overloadsCalls the method as defined by the command specified.
CallMethods2 overloads · since v2.8Calls the methods as defined by the commands specified using a single call methods service request.
ChangeUserIdentitysince v2.58Changes the identity of the connected session to the identity specified without creating a new session (OPC 10000-4, ActivateSession).
ConnectEstablishes a connection to the server identified by the ServerAddress and creates/activates a new session to access the OPC UA services provided by the server.
ConnectCoreprotected · virtualPerforms all necessary tasks to establish a connection to the server identified by the ServerAddress and creates/activates a new session to access the OPC UA services provided by the server.
CreateNodeHistory15 overloadsCreates historical values of the node as defined by the command specified.
CreateNodesHistory2 overloadsCreates historical values of the nodes as defined by the commands specified using a single history update service request.
CreateSecurityprotected · override · since v2.6Creates a new instance of the OpcClientSecurity class.
CreateSubscriptionsince v2.32Creates a new OpcSubscription using the setup specified.
CreateTransportprotected · override · since v2.6Creates a new instance of the OpcTransport class.
DeleteNode3 overloadsDeletes a node from the address space hierarchy using the command specified.
DeleteNodeHistory16 overloadsDeletes all raw historical values of the node identified by the nodeId specified.
DeleteNodeHistoryAtTime16 overloadsDeletes historical values at specific timestamps of the node as defined by the command specified.
DeleteNodeHistoryModified16 overloadsDeletes all modified historical values of the node identified by the nodeId specified.
DeleteNodes4 overloadsDeletes one or more nodes from the address space hierarchy using the commands specified.
DeleteNodesHistory2 overloadsDeletes raw historical values of the nodes as defined by the commands specified using a single history update service request.
DeleteNodesHistoryAtTime2 overloadsDeletes historical values at specific timestamps of the nodes as defined by the commands specified using a single history update service request.
DeleteNodesHistoryModified2 overloadsDeletes modified historical values of the nodes as defined by the commands specified using a single history update service request.
DeleteReference5 overloadsDeletes a reference of existing nodes in the address space hierarchy using the command specified.
DeleteReferences2 overloads · since v2.7Deletes one or more references of existing nodes in the address space hierarchy using the commands specified.
DenyIfNotConnectedprotectedVerifies whether the client is connected to the server.
DisconnectCloses an activated session and terminates the connection to the server.
DisconnectCoreprotected · virtualPerforms all necessary tasks to close an activated session and to terminate the connection to the server.
Disposeprotected · overrideReleases the unmanaged resources used by the OpcClient and optionally releases the managed resources.
GetDataType6 overloads · since v2.9Retrieves the OpcDataTypeInfo object which is known under the name specified.
GetDataTypessince v2.9Retrieves all OpcDataTypeInfo objects offered by the IOpcTypeProvider.
GetDataTypeSystemsince v2.8Retrieves the system used to describe the data exchanged via OPC UA using the type of encoding configured by the client and supported by the endpdoint of the server connected to.
GetNodeType4 overloads · since v2.9Retrieves the OpcNodeTypeInfo object which is known under the name specified.
GetNodeTypessince v2.9Retrieves all OpcNodeTypeInfo objects offered by the IOpcTypeProvider.
GetNodeTypeSystemsince v2.9Retrieves the system used to describe the type of nodes accessed on the server connected to.
GetType4 overloads · since v2.19Retrieves the IOpcType object which is known under the name specified.
GetTypessince v2.19Retrieves all IOpcType objects offered by the IOpcTypeProviders supported.
IsSubtypeOfsince v2.19Determines whether the type identified by subtypeId derives from the type specified by typeId.
OnBreakDetectedprotected · virtualRaises the BreakDetected event of the OpcClient.
OnCertificateJudgementprotected · virtual · since v2.9Raises the CertificateJudgement event of the OpcClient.
OnConnectedprotected · virtualRaises the Connected event of the OpcClient.
OnConnectingprotected · virtualRaises the Connecting event of the OpcClient.
OnDataChangeReceivedprotected · virtualRaises the DataChangeReceived event of the OpcClient.
OnDialogRequestedprotected · virtualRaises the DialogRequested event of the OpcClient.
OnDisconnectedprotected · virtualRaises the Disconnected event of the OpcClient.
OnDisconnectingprotected · virtualRaises the Disconnecting event of the OpcClient.
OnEventReceivedprotected · virtualRaises the EventReceived event of the OpcClient.
OnNotificationFailedprotected · virtual · since v2.57Raises the NotificationFailed event of the OpcClient.
OnNotificationReceivedprotected · virtualRaises the NotificationReceived event of the OpcClient.
OnReconnectedprotected · virtualRaises the Reconnected event of the OpcClient.
OnReconnectingprotected · virtualRaises the Reconnecting event of the OpcClient.
OnStateChangedprotected · virtualRaises the StateChanged event of the OpcClient.
OnSubscriptionsChangedprotected · virtualRaises the SubscriptionsChanged event of the OpcClient.
OnTypeResolveprotected · virtual · since v2.27Raises the TypeResolve event of the OpcClient.
ReadEventHistory24 overloads · since v2.54
ReadEventsHistory17 overloads · since v2.54
ReadNode21 overloadsReads the Value attribute of the node specified by nodeId.
ReadNodeHistory24 overloadsReads the historical values of the node identified by the nodeId specified using the details specified to select the values.
ReadNodeHistoryAtTime18 overloads
ReadNodeHistoryModified24 overloads
ReadNodeHistoryProcessed24 overloads
ReadNodes10 overloadsReads the Value attribute of the nodes specified by nodeIds.
ReadNodesHistory17 overloadsReads the historical values of the nodes identified by the nodeIds specified using the details specified to select the values.
ReadNodesHistoryAtTime12 overloads
ReadNodesHistoryModified17 overloads
ReadNodesHistoryProcessed16 overloads
ReadNodeValuesince v2.8Reads the Value attribute of the node specified.
ReadNodeValues2 overloads · since v2.8Reads the Value attributes of the nodes specified.
RegisterNode2 overloads · since v2.8Registers a node for optimized node access using the command specified.
RegisterNodes4 overloads · since v2.8Registers one or more nodes for optimized node access using the specified commands.
ReplaceNodeHistory15 overloadsReplaces existing entries of the history of the node as defined by the command specified.
ReplaceNodesHistory2 overloadsReplaces existing entries of the history of the nodes as defined by the commands specified using a single history update service request.
SubscribeDataChange66 overloadsSubscribes data changes on the Value attribute of the node specified by nodeId.
SubscribeEvent44 overloadsSubscribes events on the node specified by nodeId.
SubscribeNode45 overloadsSubscribes the Value attribute of the node specified by nodeId.
SubscribeNodes2 overloadsCreates a OpcSubscription using the OpcMonitoredItem setup defined by the commands specified.
TranslatePath12 overloads · since v2.18Translates a path starting from the root node using the pathElements specified.
TranslatePaths16 overloads · since v2.18Translates paths starting from the root node using the pathsElements specified.
UnregisterNode2 overloads · since v2.8Unregisters a node to not longer optimize its node access using the command specified.
UnregisterNodes4 overloads · since v2.8Unregisters one or more nodes to not longer optimize their node access using the specified commands.
UpdateNodeHistory16 overloadsUpdates the history of the node as defined by the command specified.
UpdateNodesHistory4 overloadsUpdates the history of the nodes as defined by the commands specified using a single history update service request.
WriteNode21 overloadsWrites one value to one attribute of one node using the specified command.
WriteNodes2 overloadsWrites one or more values to one or more attributes of one or more nodes using the specified commands.
WriteNodeValuesince v2.8Writes the Value attribute of the node using the further specified value.
WriteNodeValues2 overloads · since v2.8Writes the Value attributes using the nodes and values in the nodeValues specified.

Events ​

NameDescription
BreakDetectedOccurs when a connection break has been detected.
CertificateJudgementsince v2.9Occurs when the validation of a opponent application instance certificate has already fulfilled the requirements for valid and trusted certificates, but while being connected the server may behave different regarding its initially offered certificate.
ConnectedOccurs when the OpcClient has successfully established a connection to the server using a new session.
ConnectingOccurs when the OpcClient is about to establish a connection to the server.
DataChangeReceivedOccurs when a monitored item of one of the Subscriptions of the OpcClient receives a data change notification which is not handled by the monitored item and not handled by its subscription.
DialogRequestedOccurs when a monitored item receives an OpcDialogCondition event notification which is not handled by any OpcEventReceivedEventHandler and can be therefore used to explictly respond to OpcDialogCondition events.
DisconnectedOccurs when the OpcClient has successfully terminated a connection to the server.
DisconnectingOccurs when the OpcClient is about to terminate a connection to the server.
EventReceivedOccurs when a monitored item receives an event notification which is not handled by any other OpcEventReceivedEventHandler.
NotificationFailedsince v2.57Occurs when a notification message from the server connected to failed to be received, so that its data changes and events do not reach the monitored items.
NotificationReceivedOccurs when the OpcClient received a notification message form the server connected to.
ReconnectedOccurs when the OpcClient has successfully re-established a broken connection to the server using the previously used session.
ReconnectingOccurs when the OpcClient is about to re-establish a broken connection to the server.
StateChangedOccurs when ever the State property has been changed to a different value.
SubscriptionsChangedOccurs when a subscription has been added to or removed from the Subscriptions of the OpcClient and when the Subscriptions have been cleared while disconnecting from the server.
TypeResolvesince v2.27Occurs before the resolution of a data type takes place.