.NET Based OPC UA Client/Server SDK  3.3.3.537
UnifiedAutomation.UaClient.GdsPullManagement Class Reference

Automatically registers an application at a Global Discovery Server (GDS), requests the signing of the application instance certificate and updates the trust list if necessary. More...

Inherits UnifiedAutomation.UaClient.GdsRegisterManagement.

Public Member Functions

 GdsPullManagement (ApplicationInstanceBase application)
 Creates a new instances. More...
 
- Public Member Functions inherited from UnifiedAutomation.UaClient.GdsRegisterManagement
 GdsRegisterManagement (ApplicationInstanceBase application)
 Creates an instance of GdsRegisterManagement. More...
 
void Dispose ()
 
virtual void Start (GdsSettings settings)
 Starts the registering process. More...
 
virtual void Stop ()
 Starts the unregistering process. More...
 

Protected Member Functions

override async void DoIntialGdsIntercation (object state)
 Is called by a Timer started in the GdsRegisterManagement.Start method. More...
 
override void OnApplicationIdUpdated ()
 Resets the last request id to create a new certificate request. More...
 
- Protected Member Functions inherited from UnifiedAutomation.UaClient.GdsRegisterManagement
void DisposeMembers ()
 Disconnects the GdsRegisterManagement.Session and disposes GdsRegisterManagement.Client and GdsRegisterManagement.Session. More...
 
async Task ConnectToGdsAsync ()
 Connects to the GDS. More...
 
async Task RegisterIfRequiredAsync ()
 Checks if the application already has been registered and registers it if required. More...
 

Properties

NodeId LastRequestId = DateTime.MinValue [get, set]
 The return value of the last CreateSigningRequest call. More...
 
ushort LifetimeInMonthToRequest [get, set]
 The requested lifetime for the certificates after signing by the GDS. More...
 
string TemporaryStorePath = 1 [get, set]
 The store path for certificates to sign. More...
 
- Properties inherited from UnifiedAutomation.UaClient.GdsRegisterManagement
ApplicationInstanceBase Application [get]
 The managed application instance. More...
 
GdsSettings Settings [get, set]
 The configured settings. More...
 
Session Session [get]
 The Session for communicating with the GDS by GdsRegisterManagement.Client. More...
 
CertificateDirectoryClient Client [get, set]
 The CertificateDirectoryClient used for communicating with the GDS. More...
 
Timer Timer [get, set]
 The Timer for initial GDS interaction and periodic status checks (subclasses only). More...
 
NodeId ApplicationId [get]
 The ApplicationId returned by the GDS. More...
 
int OperationTimeout [get, set]
 The default OperationTimeout in milliseconds. More...
 

Events

EventHandler< EventArgs > NewCertificate
 Is called after a new signed certificate is assigned to the managed application instance. More...
 
EventHandler
< ActionFailedEventArgs
SignCertificateFailed
 Is called after signing the application instance certificate failed. More...
 
EventHandler< EventArgs > TrustListUpdated
 Is called after the trust list has been updated. More...
 
EventHandler< EventArgs > IntitialGdsInteractionDone
 Is called after the application has been registered, the application instance certificate has been checked and updated if required and the trust list has been initially updated. More...
 
- Events inherited from UnifiedAutomation.UaClient.GdsRegisterManagement
EventHandler
< BeforeConnectEventArgs
BeforeConnect
 Is called before the Session to the Gds will connect. Can be used to update the user credentials. More...
 
EventHandler
< ActionFailedEventArgs
ConnectFailed
 Is called if the client could not connect to the GDS. More...
 
EventHandler
< ApplicationRegisteredEventArgs
ApplicationRegistered
 Is called after the application has been registered at the GDS. More...
 
EventHandler
< ActionFailedEventArgs
RegisterApplicationFailed
 Is called if registering failed. More...
 
EventHandler< EventArgs > ApplicationUnregistered
 Is called in the application has been unregistered after calling the GdsRegisterManagement.Stop method. More...
 

Detailed Description

Automatically registers an application at a Global Discovery Server (GDS), requests the signing of the application instance certificate and updates the trust list if necessary.

This class can be used on client side and server side. It shall be set at UaBase.ApplicationInstanceBase.GdsHandler and the UaSchema.GdsSettings shall be set in the application configuration.

After the Start method is called, the GdsPullManagement

  • connects to the GDS
  • checks if the application has already been registered and registers it if necessary
  • updates the application certificate if required by the GDS
  • reads and updates the TrustList and the LastUpdateTime
  • reads the UpdateFrequency proposed by the GDS
  • disconnects from the GDS

After the Start procedure sucessfully finished, the GdsPullManagement periodically (UpdateFrequency / 2)

  • connects to the GDS
  • updates the TrustList if required
  • checks the certificate status and updates the certificate if required
  • disconnects from the GDS

Constructor & Destructor Documentation

UnifiedAutomation.UaClient.GdsPullManagement.GdsPullManagement ( ApplicationInstanceBase  application)

Creates a new instances.

Parameters
applicationThe application instance to manage.

Member Function Documentation

override async void UnifiedAutomation.UaClient.GdsPullManagement.DoIntialGdsIntercation ( object  state)
protectedvirtual

Is called by a Timer started in the GdsRegisterManagement.Start method.

The cycle time is the configured RetryFrequency in the GdsRegisterManagement.Settings. Tries to

  • register at the GDS
  • start signing of the application instance certificate if necessary
  • get the current trust list

After success a new Timer is started for periodically checks if the application instance certificate is still valid and the trust list need to be updated.

Reimplemented from UnifiedAutomation.UaClient.GdsRegisterManagement.

override void UnifiedAutomation.UaClient.GdsPullManagement.OnApplicationIdUpdated ( )
protectedvirtual

Resets the last request id to create a new certificate request.

Reimplemented from UnifiedAutomation.UaClient.GdsRegisterManagement.

Property Documentation

NodeId UnifiedAutomation.UaClient.GdsPullManagement.LastRequestId = DateTime.MinValue
getset

The return value of the last CreateSigningRequest call.

Gets null after FinishRequest succeeded.

ushort UnifiedAutomation.UaClient.GdsPullManagement.LifetimeInMonthToRequest
getset

The requested lifetime for the certificates after signing by the GDS.

Another value may be revised by the GDS.

string UnifiedAutomation.UaClient.GdsPullManagement.TemporaryStorePath = 1
getset

The store path for certificates to sign.

If not specified temporary store will be created in the own store.

Event Documentation

EventHandler<EventArgs> UnifiedAutomation.UaClient.GdsPullManagement.IntitialGdsInteractionDone

Is called after the application has been registered, the application instance certificate has been checked and updated if required and the trust list has been initially updated.

EventHandler<EventArgs> UnifiedAutomation.UaClient.GdsPullManagement.NewCertificate

Is called after a new signed certificate is assigned to the managed application instance.

EventHandler<ActionFailedEventArgs> UnifiedAutomation.UaClient.GdsPullManagement.SignCertificateFailed

Is called after signing the application instance certificate failed.

EventHandler<EventArgs> UnifiedAutomation.UaClient.GdsPullManagement.TrustListUpdated

Is called after the trust list has been updated.


The documentation for this class was generated from the following file: