C# Class Opc.Ua.ClientBase

The client side interface with a UA server.
Inheritance: IDisposable
ファイルを表示 Open project: OPCFoundation/UA-.NETStandardLibrary

Private Properties

Property Type Description
UpdateRequestHeader void

Public Methods

Method Description
ClientBase ( ITransportChannel channel ) : System

Intializes the object with a channel and a message context.

Close ( ) : Opc.Ua.StatusCode

Closes the channel.

Dispose ( ) : void

Frees any unmanaged resources.

GetResult ( Opc.Ua.StatusCode statusCode, int index, DiagnosticInfoCollection diagnosticInfos, ResponseHeader responseHeader ) : ServiceResult

Converts a service response to a ServiceResult object.

NewRequestHandle ( ) : uint

Generates a unique request handle.

ValidateDataValue ( Opc.Ua.DataValue value, Type expectedType, int index, DiagnosticInfoCollection diagnosticInfos, ResponseHeader responseHeader ) : ServiceResult

Validates a DataValue returned from the server.

ValidateDiagnosticInfos ( DiagnosticInfoCollection response, IList request ) : void

Validates a response returned by the server.

ValidateResponse ( IList response, IList request ) : void

Validates a response returned by the server.

Protected Methods

Method Description
CloseChannel ( ) : void

Closes the channel.

CreateAuditLogEntry ( IServiceRequest request ) : string

Creates an audit log entry for the request.

Dispose ( bool disposing ) : void

An overrideable version of the Dispose.

DisposeChannel ( ) : void
RequestCompleted ( IServiceRequest request, IServiceResponse response, string serviceName ) : void

Called when a request completes.

UpdateRequestHeader ( IServiceRequest request, bool useDefaults ) : void

Updates the header of a service request.

UpdateRequestHeader ( IServiceRequest request, bool useDefaults, string serviceName ) : void

Updates the header of a service request.

ValidateResponse ( ResponseHeader header ) : void

Throws an exception if a response contains an error.

Private Methods

Method Description
UpdateRequestHeader ( IServiceRequest request ) : void

Method Details

ClientBase() public method

Intializes the object with a channel and a message context.
public ClientBase ( ITransportChannel channel ) : System
channel ITransportChannel The channel.
return System

Close() public method

Closes the channel.
public Close ( ) : Opc.Ua.StatusCode
return Opc.Ua.StatusCode

CloseChannel() protected method

Closes the channel.
protected CloseChannel ( ) : void
return void

CreateAuditLogEntry() protected method

Creates an audit log entry for the request.
protected CreateAuditLogEntry ( IServiceRequest request ) : string
request IServiceRequest The request.
return string

Dispose() public method

Frees any unmanaged resources.
public Dispose ( ) : void
return void

Dispose() protected method

An overrideable version of the Dispose.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void

DisposeChannel() protected method

protected DisposeChannel ( ) : void
return void

GetResult() public static method

Converts a service response to a ServiceResult object.
public static GetResult ( Opc.Ua.StatusCode statusCode, int index, DiagnosticInfoCollection diagnosticInfos, ResponseHeader responseHeader ) : ServiceResult
statusCode Opc.Ua.StatusCode The status code.
index int The index.
diagnosticInfos DiagnosticInfoCollection The diagnostic information.
responseHeader ResponseHeader The response header.
return ServiceResult

NewRequestHandle() public method

Generates a unique request handle.
public NewRequestHandle ( ) : uint
return uint

RequestCompleted() protected method

Called when a request completes.
protected RequestCompleted ( IServiceRequest request, IServiceResponse response, string serviceName ) : void
request IServiceRequest The request.
response IServiceResponse The response.
serviceName string The name of the service.
return void

UpdateRequestHeader() protected method

Updates the header of a service request.
protected UpdateRequestHeader ( IServiceRequest request, bool useDefaults ) : void
request IServiceRequest The request.
useDefaults bool if set to true use defaults].
return void

UpdateRequestHeader() protected method

Updates the header of a service request.
protected UpdateRequestHeader ( IServiceRequest request, bool useDefaults, string serviceName ) : void
request IServiceRequest The request.
useDefaults bool if set to true the no request header was provided.
serviceName string The name of the service.
return void

ValidateDataValue() public static method

Validates a DataValue returned from the server.
public static ValidateDataValue ( Opc.Ua.DataValue value, Type expectedType, int index, DiagnosticInfoCollection diagnosticInfos, ResponseHeader responseHeader ) : ServiceResult
value Opc.Ua.DataValue The value.
expectedType System.Type The expected type.
index int The index.
diagnosticInfos DiagnosticInfoCollection The diagnostic information.
responseHeader ResponseHeader The response header.
return ServiceResult

ValidateDiagnosticInfos() public static method

Validates a response returned by the server.
public static ValidateDiagnosticInfos ( DiagnosticInfoCollection response, IList request ) : void
response DiagnosticInfoCollection The response.
request IList The request.
return void

ValidateResponse() public static method

Validates a response returned by the server.
public static ValidateResponse ( IList response, IList request ) : void
response IList The response.
request IList The request.
return void

ValidateResponse() protected static method

Throws an exception if a response contains an error.
protected static ValidateResponse ( ResponseHeader header ) : void
header ResponseHeader The header.
return void