NetworkNodes

The NetworkNodes class in the .NET Standard OAS Data API provides methods for managing the network node and failover behavior when calling Tag reading and writing methods in the Data class.

Info

The methods provided by this class can be called directly on the Data class.

Namespaces

OASData.NetworkNodes

Properties

PropertyTypeDescriptionAccess
TCPPortNumberintThe TCP port number of the OAS service (default: 58725)get/set

Methods

AddBackupNetworkNode

Add a redundant OAS instance IP or hostname to allow client side switchover when Tag Quality value is returned as Bad Quality. The same Tag name will be used, but the client will automatically try to connect to the alternative OAS instance given.

The backup logic operates at the Tag level. If only 1 Tag out of 10 tags is bad quality, then it will switch to the backup OAS node, but the remaining Tags will continue reading/writing on the original OAS node.

The Tag names and paths being monitored by the OAS data client must be the same on the Original and on the Revised OAS node.

If both the primary and backup servers return bad quality then the Tag's quality will also be set to bad quality.

You can only set one backup node for each primary OAS node.

Signatures:

public void AddBackupNetworkNode(string Original, string Revised)

Parameters:

  • Original (string): Original network node IP or hostname
  • Revised (string): Backup network node IP or hostname

Example:

var networkNodes = new NetworkNodes();

// if a Tag on 192.168.10.10 fails, try the 192.168.10.20 server
var result = networkNodes.AddBackupNetworkNode("192.168.10.10", "192.168.10.20");
AddNetworkNodeAlias

Add a network node alias to force Tags sourced from a given OAS node (the Original) to be sourced from a different OAS node (the Revised). This method is essentially a way for you to manually switch from one server to another.

This will force all Tags monitored by the primary to be switched to the backup.

The Tag names and paths being monitored by the OAS data client must be the same on the Original and on the Revised OAS node.

If both the primary and backup servers return bad quality then the Tag's quality will also be set to bad quality.

You can only set one backup node alias for each primary OAS node.

Signatures:

public void AddNetworkNodeAlias(string Original, string Revised)

Parameters:

  • Original (string): Original network node IP or hostname
  • Revised (string): Updated network node IP or hostname

Example:

var networkNodes = new NetworkNodes();

// force all Tag monitoring from the 192.168.10.10 node to the 192.168.10.20 node
var result = networkNodes.AddNetworkNodeAlias("192.168.10.10", "192.168.10.20");
GetBackupNetworkNode

Get the current backup node set for a given OAS instance.

Signatures:

public string GetBackupNetworkNode(string Original)

Parameters:

  • Original (string): Original network node IP or hostname

Returns:

  • string: The node IP or host name

Example:

var networkNodes = new NetworkNodes();
var result = networkNodes.GetBackupNetworkNode("192.168.10.10");
GetNetworkNodeAlias

Get the current node alias set for a given OAS instance.

Signatures:

public string GetNetworkNodeAlias(string Original)

Parameters:

  • Original (string): Original network node IP or hostname

Returns:

  • string: The node IP or host name

Example:

var networkNodes = new NetworkNodes();
var result = networkNodes.GetNetworkNodeAlias("192.168.10.10");
RemoveBackupNetworkNode

Remove the backup OAS node that has been set for the given primary OAS instance.

Signatures:

public void RemoveBackupNetworkNode(string Original)

Parameters:

  • Original (string): Original network node IP or hostname

Example:

var networkNodes = new NetworkNodes();
var result = networkNodes.RemoveBackupNetworkNode("192.168.10.10");
RemoveNetworkNodeAlias

Remove the OAS node alias that has been set for the given primary OAS instance.

Signatures:

public void RemoveNetworkNodeAlias(string Original)

Parameters:

  • Original (string): Original network node IP or hostname

Example:

var networkNodes = new NetworkNodes();
var result = networkNodes.RemoveNetworkNodeAlias("192.168.10.10");
SetReconnectTime
SetWatchDogRate