Skip to content

Reference

OpcServiceRequest Members

Defines the base class of the requests of the services of OPC UA, e.g. as passed to the Invoke method of a service.

Reference

OpcServiceRequest Members ​

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

Constructors ​

OpcServiceRequest ​

protected · 2 overloads

OverloadDescription
OpcServiceRequest()protectedInitializes a new instance of the OpcServiceRequest class using a new header.
OpcServiceRequest(IOpcServiceRequestHeader)protected · since v2.7Initializes a new instance of the OpcServiceRequest class using the specified header.

OpcServiceRequest() ​

protected

Initializes a new instance of the OpcServiceRequest class using a new header.

csharp
protected OpcServiceRequest()
vbnet
Protected Sub New()

OpcServiceRequest(IOpcServiceRequestHeader) ​

protected · since v2.7

Initializes a new instance of the OpcServiceRequest class using the specified header.

csharp
protected OpcServiceRequest(IOpcServiceRequestHeader header)
vbnet
Protected Sub New(header As IOpcServiceRequestHeader)

Parameters

NameTypeDescription
headerIOpcServiceRequestHeaderThe header of the request.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe header is a null reference (Nothing in Visual Basic).

Properties ​

Gets the header of the request.

csharp
public IOpcServiceRequestHeader Header { get; }
vbnet
Public ReadOnly Property Header As IOpcServiceRequestHeader

Property value

IOpcServiceRequestHeader

The IOpcServiceRequestHeader of the request.

Implements

Header

ServiceName ​

since v2.19

Gets the name of the service of the request.

csharp
public string ServiceName { get; }
vbnet
Public ReadOnly Property ServiceName As String

Property value

String

The name of the type of the request without the prefix "Opc" and the suffix "Request" (e.g. "ReadNodes" for OpcReadNodesRequest); for a request of a service without a type of its own, the name of the service as defined by OPC UA.

Methods ​

CreateHeader ​

protected · since v2.7

Creates the header of the request using CreateHeaderCore and assigns it to the request.

csharp
protected IOpcServiceRequestHeader CreateHeader()
vbnet
Protected Function CreateHeader() As IOpcServiceRequestHeader

Returns

IOpcServiceRequestHeader

The header created.

CreateHeaderCore ​

protected · virtual · since v2.7

When overridden in a derived class, creates the header of the request.

csharp
protected virtual IOpcServiceRequestHeader CreateHeaderCore()
vbnet
Protected Overridable Function CreateHeaderCore() As IOpcServiceRequestHeader

Returns

IOpcServiceRequestHeader

The header created. The default implementation returns an OpcServiceRequestHeader which represents the header of the request data, or a new OpcServiceRequestHeader if the request data does not have a header.

Validate ​

protected · virtual · since v2.50

When overridden in a derived class, validates the request before a server processes it.

csharp
protected virtual void Validate()
vbnet
Protected Overridable Sub Validate()

Remarks

A server rejects a request which fails the validation with the status code of the validation, e.g. a request without commands with BadNothingToDo. The default implementation does not validate anything.