Namespace: Opc.UaFx.Server
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcServerBase type exposes the following members.
C#
protected OpcServerBase(OpcServerType type, string address)
Parameters
type
OpcServerType
address
String
Exceptions
The address
format / scheme can not be used as a server address.
C#
protected OpcServerBase(OpcServerType type, Uri address)
Parameters
type
OpcServerType
address
Uri
Exceptions
The address
format / scheme can not be used as a server address.
C#
public event EventHandler Started
C#
public event EventHandler Starting
Occurs when ever the State property has been changed to a different value.
C#
public event EventHandler<OpcServerStateChangedEventArgs> StateChanged
C#
public event EventHandler Stopped
C#
public event EventHandler Stopping
Gets or sets the (first) base address of the server.
C#
public Uri Address { get; set; }
Property Value
The first Uri used by the server to listen and response to OPC UA requests or a null reference (Nothing in Visual Basic) in case there is no base address defined.
Exceptions
The address format / scheme can not be used as a server address.
The value is a null reference (Nothing in Visual Basic).
Gets a read-only collection of Uri instances representing the base addresses used by the server.
C#
public ReadOnlyCollection<Uri> Addresses { get; }
Property Value
A ReadOnlyCollection´1 of Uri instances used by the server to listen and response to OPC UA requests.
Remarks
To manage the different base addresses used use the RegisterAddress(String)/RegisterAddress(Uri) method to add an additional base address or use the UnregisterAddress(String)/ UnregisterAddress(Uri) method to remove a base address.
Gets the OpcServerBinding instance used to maintain the different binding options used by the server application.
C#
public OpcServerBinding Binding { get; }
Property Value
An instance of the OpcServerBinding class used by the OpcServer to setup and maintain the different binding options.
Gets or sets an instance of the OpcApplicationConfiguration class which is used as a low-level representation of the code/file based server application configuration.
C#
[CLSCompliant(false)] public override OpcApplicationConfiguration Configuration { get; set; }
Property Value
An instance of the OpcApplicationConfiguration class configured with the server specific setup to use. An assignment of a null reference (Nothing in Visual Basic) will lead to the creation of a new instance of the OpcApplicationConfiguration class with all defaults typically used by server applications.
Remarks
A file based OpcApplicationConfiguration needs to be loaded manually either using a specific config-section in its App.config (see LoadServerConfig(String)) or using a custom file using LoadServerConfigFile(String). A low-level code based server configuration can be directly performed using an instance of the OpcApplicationConfiguration like the instance provided by this property. In case there is a different instance applied to this property the property will ensure that the Address property will represent the first base address configured in the base addresses of the passed configuration instance.
Gets a read-only collection of namespaces used by the server.
C#
public override OpcReadOnlyNamespaceCollection Namespaces { get; }
Property Value
OpcReadOnlyNamespaceCollection
An instance of the OpcReadOnlyNamespaceCollection class with OpcNamespace items for each 'NamespaceUri' used by the server to organize the nodes in its address space.
Remarks
The items in the OpcReadOnlyNamespaceCollection provided are created during the startup of the server.
Gets a value that indicates the current state of the server.
C#
public OpcServerState State { get; }
Property Value
One of the members defined by the OpcServerState enumeration. Which specifies the current state of the server.
C#
[CLSCompliant(false)] protected virtual OpcApplicationConfiguration CreateConfiguration()
Returns
Creates a new instance of the OpcServerSecurity class.
C#
protected override sealed OpcServerSecurity CreateSecurity()
Returns
A new instance of theOpcServerSecurity class.
Creates a new instance of the OpcTransport class.
C#
protected override sealed OpcTransport CreateTransport()
Returns
A new instance of theOpcTransport class.
Verifies whether the server is in started state.
C#
protected void DenyIfNotStarted()
Exceptions
Releases the unmanaged resources used by the OpcServerBase and optionally releases the managed resources.
C#
protected override void Dispose(bool disposing)
Parameters
disposing
Boolean
The value true to release both managed and unmanaged resources; otherwise the value false to release only unmanaged resources.
C#
protected virtual void OnStateChanged(OpcServerStateChangedEventArgs e)
Parameters
e
OpcServerStateChangedEventArgs
Registers the address
specified as one of the base addresses used by the server.
C#
public void RegisterAddress(string address)
Parameters
address
String
The uniform resource identifier which defines the communication schema, the host, the port and optionally the path to listen to.
Exceptions
The address
is a null reference (Nothing in Visual Basic).
The address
is an empty string or the address format / scheme can not be used as a server address.
The address
is not a valid URI format.
Remarks
In case there the address
is already in use as a base address, it will not be added to the list of base addresses a second time. In case there the Address properties is a null reference (Nothing in Visual Basic), the address
will be used.
Registers the address
specified as one of the base addresses used by the server.
C#
public void RegisterAddress(Uri address)
Parameters
address
Uri
The Uri which defines the communication schema, the host, the port and optionally the path to listen to.
Exceptions
The address
format / scheme can not be used as a server address.
The address
is a null reference (Nothing in Visual Basic).
Remarks
In case there the address
is already in use as a base address, it will not be added to the list of base addresses a second time. In case there the Address properties is a null reference (Nothing in Visual Basic), the address
will be used.
C#
public void Resume()
Exceptions
C#
protected virtual void ResumeCore()
C#
[CLSCompliant(false)] protected override void Setup(OpcApplicationConfiguration configuration)
Parameters
configuration
OpcApplicationConfiguration
C#
[CLSCompliant(false)] protected virtual void StartCore(OpcApplicationConfiguration configuration)
Parameters
configuration
OpcApplicationConfiguration
C#
protected abstract void StopCore()
C#
public void Suspend()
Exceptions
C#
protected virtual void SuspendCore()
Unregisters the address
specified from the list of base addresses used by the server.
C#
public void UnregisterAddress(string address)
Parameters
address
String
The uniform resource identifier which defines the communication schema, the host, the port and optionally the path to remove.
Exceptions
The address
is a null reference (Nothing in Visual Basic).
The address
is an empty string.
The address
is not a valid URI format.
Remarks
In case there address
is equals to Address the Address property will be set to a null reference (Nothing in Visual Basic) if there is no other address registered; otherwise the first entry in Addresses will be used for Address.
Unregisters the address
specified from the list of base addresses used by the server.
C#
public void UnregisterAddress(Uri address)
Parameters
address
Uri
The Uri which defines the communication schema, the host, the port and optionally the path to remove.
Exceptions
The address
is a null reference (Nothing in Visual Basic).
Remarks
In case there address
is equals to Address the Address property will be set to a null reference (Nothing in Visual Basic) if there is no other address registered; otherwise the first entry in Addresses will be used for Address.