C# Class Opc.Ua.ClientBase

The client side interface with a UA server.
Inheritance: IDisposable
Afficher le fichier Open project: OPCFoundation/UA-.NETStandardLibrary

Private Properties

Свойство Type Description
UpdateRequestHeader void

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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

Méthode Description
UpdateRequestHeader ( IServiceRequest request ) : void

Method Details

ClientBase() public méthode

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

Close() public méthode

Closes the channel.
public Close ( ) : Opc.Ua.StatusCode
Résultat Opc.Ua.StatusCode

CloseChannel() protected méthode

Closes the channel.
protected CloseChannel ( ) : void
Résultat void

CreateAuditLogEntry() protected méthode

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

Dispose() public méthode

Frees any unmanaged resources.
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

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.
Résultat void

DisposeChannel() protected méthode

protected DisposeChannel ( ) : void
Résultat void

GetResult() public static méthode

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.
Résultat ServiceResult

NewRequestHandle() public méthode

Generates a unique request handle.
public NewRequestHandle ( ) : uint
Résultat uint

RequestCompleted() protected méthode

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.
Résultat void

UpdateRequestHeader() protected méthode

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].
Résultat void

UpdateRequestHeader() protected méthode

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.
Résultat void

ValidateDataValue() public static méthode

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.
Résultat ServiceResult

ValidateDiagnosticInfos() public static méthode

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

ValidateResponse() public static méthode

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

ValidateResponse() protected static méthode

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