Config (.NET Standard)
OPCSystemsComponent (.NET Framework)

The Config class in the .NET Standard library and the OPCSystemsComponent class in the .NET Framework library provide a complete set of methods for configuration of a local or remote Open Automation Software node.

Common Properties

Many of the methods in this class have a standard set of optional parameters. If you don't specify these parameters then the defaults will be used.

  • NetworkNode (string): The hostname or IP address of the OAS node that you want to communicate with [default: localhost].
  • ErrorString (ref string): A string variable for storing the result message (success or error message) of the operation [default: no result string is set].
  • RemoteSCADAHostingName (string): The name of a remote node as registered using the alias defined in the Live Data Cloud feature [default: none].

Tips

Live Data Cloud is a feature that allows an OAS node to act as a proxy server (hosting node) between the client using this API and an internal OAS node that isn't directly visible to the client. This allows clients to communicate with one or more internal OAS nodes without those nodes having to expose their internal network. You can think of the hosting node as a typical DMZ.

The NetworkNode parameter defines the IP or host name of the hosting node instance, which will then forward the request to the internal node registered using the alias as defined by the RemoteSCADAHostingName parameter.

For more information about Live Data Cloud see: Live Data Cloud Networking

Namespaces

.NET Standard: OASConfig.Config
.NET Framework: OPCSystems.OPCSystemsComponent

Enums

DBProviderTypes - Supported database provider types for `GetDatabaseData` method

Namespace: OASConfig.Config.DBProviderTypes

ValueDescription
CassandraCassandra database provider
MariaDBMariaDB database provider
MongoDBMongoDB database provider
MSAccessMicrosoft Access database provider
mySQLMySQL database provider
OracleOracle database provider
PostgreSQLPostgreSQL database provider
SQLiteSQLite database provider
SQLServerMicrosoft SQL Server database provider
FieldDataTypes - Supported field types for `GetDatabaseData` method

Namespace: OASConfig.Config.FieldDataTypes

ValueDescription
BooleanDataBoolean data type
DateTimeDataDatetime data type
DoubleFloatDataDouble float data type
IntegerDataInteger (32-bit) data type
LongIntegerLong integer (64-bit) data type
SByteIntegerByte (8-bit) data type
ShortIntegerShort (16-bit) integer data type
SingleFloatDataSingle float data type
StringDataString data type
LogixType - Supported RS Logix Types for `ImportABTags` method

Namespace: OASConfig.Config.LogixType

ValueDescription
Logix500Logix 500 series
Logix5000Logix 5000 series

Properties

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

Methods

General

GetAssemblyVersion

Returns the version number of the OAS Engine executable assembly.

Signatures:

public string GetAssemblyVersion()
public string GetAssemblyVersion(string NetworkNode)
public string GetAssemblyVersion(string NetworkNode, ref string ErrorString)
public string GetAssemblyVersion(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: The OAS engine assembly version number in semantic format

Example:

var oasConfig = new Config();
var result = oasConfig.GetAssemblyVersion();
// result = "20.0.0.133"
GetAvailableVersionsFromDownloadServer

Returns a list of the latest available OAS version numbers on the update server.

If used without any parameters, then the public OAS update server will be used.

If used with parameters, you can use your own FTP server for hosting OAS update files.

Signatures:

public string[] GetAvailableVersionsFromDownloadServer()
public string[] GetAvailableVersionsFromDownloadServer(string CustomServerFilePath)
public string[] GetAvailableVersionsFromDownloadServer(string CustomServerFilePath, string FTPUser, string FTPPassword)

Parameters:

  • CustomServerFilePath (string): The server HTTP URL or FTP host/IP where the OAS update packages reside
  • FTPUser (string): The custom update server FTP username
  • FTPPassword (string): The custom update server FTP password

Returns:

  • string[]: A list of versions available on the update server

Example:

var oasConfig = new Config();
var result = oasConfig.GetAvailableVersionsFromDownloadServer();
// result = [
//  "20.0.0.143",
//  "20.0.0.142",
//  "20.0.0.141",
//  "20.0.0.140",
//  ...
// ]
GetOEMCode

Gets the current OEM code.

Signatures:

public string GetOEMCode()
public string GetOEMCode(string NetworkNode)
public string GetOEMCode(string NetworkNode, ref string ErrorString)
public string GetOEMCode(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: The OEM code

Example:

var oasConfig = new Config();
var result = oasConfig.GetOEMCode();
// result = ""
GetProductVersion

Returns the version number of the OAS platform that is installed on the server being queried.

Signatures:

public string GetProductVersion()
public string GetProductVersion(string NetworkNode)
public string GetProductVersion(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: The OAS engine version in semantic format

Example:

var oasConfig = new Config();
var result = oasConfig.GetProductVersion();
// result = "20.00.0133"
GetServiceVersion

Returns the version of the OAS engine service represented as a single number returned as a string.

The version is incremented with each new release rather than being represented in a semantic versioning format.

Signatures:

public string GetServiceVersion()
public string GetServiceVersion(string NetworkNode)
public string GetServiceVersion(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: String value representing the OAS service version

Example:

var oasConfig = new Config();
var result = oasConfig.GetServiceVersion();
// result = "315"
GetSystemErrors

Query system errors as shown on the System Errors screen in the Configure OAS application.

To get a list of available SystemType parameters, set each of the first three parameters to an empty string. The SystemType parameter typically relates to an OAS subsystem or product feature.

To drill down to the next level and get a list of Group parameters, set the SystemType parameter to one of the previously returned strings and leave the remaining two parameters empty. For example, you might set the SystemType to DataLog if there is an active or previous data logging alarm. The Group parameter typically relates to a configuration group name such as a data logging group or an alarm notification group name.

To drill down further again, also set the Group parameter to one of the returned strings and leave the Category parameter empty. This will return a list of alarm categories that relate to a specific step within a given operation. For example, it might relate to CreateDB operation.

Finally, to access the actual alarm, you can now set all three parameters including the Category parameter you just obtained.

Signatures:

public string[] GetSystemErrors(string SystemType, string Group, string Category, ref bool[] CurrentlyInError)
public string[] GetSystemErrors(string SystemType, string Group, string Category, ref bool[] CurrentlyInError, string NetworkNode)
public string[] GetSystemErrors(string SystemType, string Group, string Category, ref bool[] CurrentlyInError, string NetworkNode, ref string ErrorString)
public string[] GetSystemErrors(string SystemType, string Group, string Category, ref bool[] CurrentlyInError, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • SystemType (string): The subsystem name
  • Group (string): The group name
  • Category (string): The category name
  • CurrentlyInError (ref bool[]): Boolean array that corresponds to number of items returned to indicate whether the given error item is currently in an alarm state
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: A list of requested error parameters

Example:

var oasConfig = new Config();
var currentlyInError = Array.Empty<bool>();

var result = oasConfig.GetSystemErrors(string.Empty, string.Empty string.Empty ref currentlyInError);
//result = [
//  "DataBuffering",
//  "DataLog",
//  "Service"
//]
//currentlyInError = []
//  true,
//  true,
//  false
//]

var result = oasConfig.GetSystemErrors("DataLog", string.Empty string.Empty ref currentlyInError);
//result = [
//  "MyDataLoggingGroup"
//]
//currentlyInError = []
//  false
//]

var result = oasConfig.GetSystemErrors("DataLog", "MyDataLoggingGroup", string.Empty ref currentlyInError);
//result = [
//  "Create - 001",
//  "CreateDB - 009",
//  "OpenConnection - 005"
//]
//currentlyInError = []
//  false,
//  true,
//  true
//]

var result = oasConfig.GetSystemErrors("DataLog", "MyDataLoggingGroup", "CreateDB - 009", ref currentlyInError);
//result = [
//  "[0] = "7/9/2025 13:19:14.701 ClassDBConn: CreateOpenComplete: Error Creating Database: Logging Group: MyDataLoggingGroup 
//     Exception: CREATE DATABASE permission denied in database 'master'.\r\nOAS Version: 20.0.0.133 File: Products\\Data Log\\ClassDBConn Method: Cr..."
//]
//currentlyInError = []
//  true
//]
GetSystemStatus

Returns the system status as an array of strings.

The output is the same as on the System Status screen of the Configure OAS application.

Signatures:

public string[] GetSystemStatus()
public string[] GetSystemStatus(string NetworkNode)
public string[] GetSystemStatus(string NetworkNode, ref string ErrorString)
public string[] GetSystemStatus(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: Returns the system status as an array of strings

Example:

var oasConfig = new Config();
var result = oasConfig.GetSystemStatus();
//result = [
//    "Windows OAS Engine",
//    "Processor Type: x64",
//    "Service Version: 20.0.0.133",
//    "Service Interface Version: 315",
//    "License Code: A03151007C02...", // Truncated for brevity
//    "",
//    "Demo 318 days remaining. Valid License for Full OAS Suite - Drivers: OPC | OPC UA | Modbus | ABLogix | ABClassic | Siemens | MQTT | Kafka | MTConnect | UDI",
//    "",
//    "Update Version Status:",
//    " Installed Manually",
//    "",
//    "Service In Runtime Mode",
//    "Max Worker Threads: 32767",
//    "Max Port Threads: 1000",
//    "Available Worker Threads: 32764",
//    "Available Port Threads: 1000",
//    "Running Threads: 112",
//    "Maximum Number of Driver Interface Threads: 100",
//    "OAS OPC Service Comm Rate: 100",
//    "OAS Reports Service Comm Rate: 100",
//    "",
//    "Defaults",
//    "--------",
//    "Default Tag Configuration File is C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles\\Calculations.Tags",
//    "Data Logging Configuration File is not specified to load automatically",
//    "Alarm Logging Configuration File is not specified to load automatically",
//    "Report Configuration File is not specified to load automatically",
//    "Recipe Configuration File is not specified to load automatically",
//    "Data Route Configuration File is not specified to load automatically",
//    "Alarm Notification Configuration File is not specified to load automatically",
//    "Default UDP Broadcast File is not specified",
//    "Default UDP Receive File is not specified",
//    "Default Live Data Cloud File is not specified",
//    "Default AE OPC Servers File is not specified",
//    "Error Logging Is Enabled to \\Log\\OASErrors",
//    "Communication Error Logging Is Disabled",
//    "Transaction Logging Is Enabled to \\Log\\OASTransactions",
//    "UDI Transaction Logging Is Disabled",
//    "Communication Errors are not included in alarms",
//    "Communication Errors are not included in error log",
//    "Tag Communication Errors are not included in alarms",
//    "Tag Communication Errors are not included in error log",
//    "Classic TCP is disabled.",
//    "Classic RSlina Browsing Fix is disabled.",
//    "Auto Runtime Is Set",
//    "Runtime Startup Delay is 1 second",
//    "Device Read and Writes are immediate and do not wait for pending callbacks.",
//    "Data is not buffered for remote data logging or driver interface services if they inform this service that they are stopping.",
//    "Data is not buffered when a remote engine loses communications for driver interface IoT Publish.",
//    "OPC Server Watchdog Rate is 60 seconds",
//    "Time Stamp is from CPU Clock",
//    "AB and Siemens Time Stamp is from Controller",
//    "Time Stamps are in local time",
//    "UTC Date Time String format is from regional settings",
//    "Tag TimestampString format is from regional settings",
//    "Date Time String format is from Short Date setting in regional settings",
//    "Default Client Packet Rate is 30 ms",
//    "Websocket Update Rate is 100 ms",
//    "Hold Last Good Value On Network Tags is Disabled",
//    "Client Watchdog Rate = 10",
//    "Web HMI WCF HTTP Max Request Size is 2147483647",
//    "Web HMI Session Timeout: 30 Minutes",
//    "REST API Session Timeout : 30 Minutes",
//    "Web REST Remote Tag Timeout: 300 Seconds",
//    "Live Data Cloud Hosting is Disabled except for the following.",
//    " OAS_OT_1::034798F0-83D0-4F9F-8FDF-9241F66D7FA307D9141NA1E074207BFEBFBFF000B0671197EF1DBA64AB313A8A2D843AE3E468A",
//    "Live Data Cloud Server that are Connected to Service:",
//    "CSV Export Delimiter: ,",
//    "Array Delimiter: ,",
//    "Update Alarm Status Without Alarm Time Delay",
//    "Alarm Date and Time is set without Time Delay",
//    "Remove Alarms With Comment Containing: ",
//    "Data Route enabled to write when Target is bad quality",
//    "Data Route writes do not include quality",
//    "Data Route Write Frequency When Bad Quality: 10",
//    "Ignore OPC Quality Flags is disabled",
//    "Data Logging is Buffered to Disk at \\StoreAndForward\\ with limit of 24 hours",
//    "Data Logging is Buffer Index Files will remain when all buffer files are processed.",
//    "Data Logging Buffer Data Source Index File Name: SourceDataLogBufferQueue.dlb",
//    "Data Logging Buffer Database Index File Name: DataLogBufferQueue.dlb",
//    "Maximum Data Logging Records To Buffer 10000",
//    "Maximum Alarm Logging Records To Buffer 10000",
//    "High and Low Alarms are normally processed",
//    "Real-Time Alarms are processed and cleared normally",
//    "Remove Alarms When Disabled",
//    "Time Delay to Process Alarm Logging and Alarm Notification: 0",
//    "Time Delay to Process Alarms on Startup: 0",
//    "OEM Code: ",
//    "Instance GUID: 034798f0-83d0-4f9f-8fdf-9241f66d7fa307D9141NA1E074207BFEBFBFF000B0671197EF1DBA64AB313A8A2D843AE3E468A",
//    "Real-Time Values data is not Stored",
//    "Time On And Counts are not Stored",
//    "Totals are not Stored",
//    "Real-Time Trend data is not Stored",
//    "Real-Time Alarm data is not Stored",
//    "Custom History Date Format is disabled",
//    "Custom History Date Format: yyyy-MM-dd HH:mm:ss",
//    "Maximum Database Connections: 10",
//    "File Data Source Path: C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles\\FileDataSource\\OASTagValues",
//    "File Data Source Alarm Group: FileDataSource",
//    "Tag Configuration is not automatically saved on a write to a value",
//    "",
//    "Totals",
//    "-------",
//    "Number of Tags Available: Unlimited",
//    "Number of Tags Used: 400",
//    "================================",
//    "Number of Tags: 400",
//    "Number of Array Items In Use: 0",
//    "Number of DirectOPC Tags (List at end of this report): 0",
//    "================================",
//    "",
//    "Configurations",
//    "--------------",
//    "Number of Data Logging Groups: 1",
//    "Number of Security Groups: 4",
//    "Number of Alarm Logging Groups: 0",
//    "Number of Alarm Notifications: 0",
//    "Number of Reports: 0",
//    "Number of Recipes: 0",
//    "Number of Data Route Groups: 0",
//    "",
//    "Data Totals",
//    "--------------",
//    "Number of OPC Items: 0",
//    "Number of Tag Client Values: 152",
//    "Number of UDP Client Values: 0",
//    "Number of OPC Item Values Received: 0",
//    "Number of Tags with Source Driver Interface at Start Runtime: 0",
//    "Number of Tags with Source OPC Item at Start Runtime: 0",
//    "Number of Tags with Target OPC Item at Start Runtime: 0",
//    "Number of Client Tags at Start Runtime: 9",
//    "Number of Calculation Client Tags at Start Runtime: 186",
//    "Number of Alarm Text Client Tags at Start Runtime: 6",
//    "Number of Reset Time On And Counts Client Tags at Start Runtime: 1",
//    "Number of Source Tags For Bad Quality at Start Runtime: 0",
//    "Number of OPC Enable Comm Client Tags at Start Runtime: 0",
//    "Number of Driver Interface Enable Comm Client Tags at Start Runtime: 0",
//    "Number of Trend Points Monitored: 0",
//    "Number of Alarms: 30",
//    "",
//    "Modbus Communications",
//    "--------------",
//    "",
//    "",
//    "Number of Pending Data Log Data Change Queues: 0",
//    "MyDataLoggingGroup - Continuous - Values to process: 0",
//    " ",
//    "Queue to send to Database Service: 0",
//    "Total Queues and Values to process: 0",
//    "Data Buffering is not currently active",
//    "Alarm Buffering is not currently active",
//    "",
//    "Clients",
//    "-------",
//    "Number of Data Clients: 0",
//    "Number of Recipe Data Clients: 0",
//    "Number of Driver Data Clients: 0",
//    "Number of Data Log Data Clients: 0",
//    "Number of Data Clients Removed: 3",
//    "Number of Alarm Clients: 0",
//    "Number of Alarm Clients Removed: 0",
//    "Number of Alarm History Clients: 0",
//    "Longest Allowed Trend Time Frame: 86400",
//    "Longest Actual Trend Time Frame in use: 0",
//    "Enable Stepped Trend: False",
//    "Number of Trend Steps: 12",
//    "Number of Trend Clients: 0",
//    "Number of Trend Clients Removed: 0",
//    "Number of Trend History Clients: 0",
//    "Number of Data Logging Clients: 0",
//    "Number of Data Logging Clients Removed: 0",
//    "Number of Alarm Logging Clients: 0",
//    "Number of Alarm Logging Clients Removed: 0",
//    "Number of Trend History Pending: 0",
//    "Number of Alarm History Pending: 0",
//    "",
//    "Executions",
//    "----------",
//    "Number of SafeInvokeClientTagsDataEvent Executions: 0",
//    "Number of SafeInvokeTrendDataEvent Executions: 0",
//    "Number of SafeInvokeAlarmDataEvent Executions: 9830264",
//    "Number of SafeInvokeLogDataEvent Executions: 0",
//    "Number of SafeInvokeAlarmLogDataEvent Executions: 0",
//    "",
//    "Watchdog Events",
//    "---------------",
//    "Number of OPC Server Watchdog Events: 0",
//    "",
//    "List of DirectOPC Items",
//    "---------------",
//    "Statistic Calculations Frequency: 1 Seconds",
//    "Statistic function samples:\r\nTotal: 0",
//    "Time On and Counts Transitions:\r\nTag: UIEngine.Chip.Total Prod.Value\r\nPeriod 1 Times: 0\r\nPeriod 2 Times: 0\r\nCurrent Day Times: 294471\r\n\r\nTotal number of transitions: 294471"
//]
GetVersion

Returns the version of the OAS engine service represented as a single number returned as an integer.

The version is incremented with each new release rather than being represented in a semantic versioning format.

Signatures:

public int GetVersion()
public int GetVersion(string NetworkNode)
public int GetVersion(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int: Integer value representing the OAS service version

Example:

var oasConfig = new Config();
var result = oasConfig.GetVersion();
// result = "315"
InRuntime

Returns the Runtime Status of the OAS Service.

Signatures:

public int InRuntime()
public int InRuntime(string NetworkNode)
public int InRuntime(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if OAS instance is in Runtime
    • 0 if OAS instance is not in Runtime
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.InRuntime();
// result = 1
SetOEMCode

Set the OEM code as provided by OAS. This functionality is only used for special cases.

Signatures:

public void SetOEMCode(string Value)
public void SetOEMCode(string Value, string NetworkNode)
public void SetOEMCode(string Value, string NetworkNode, ref string ErrorString)
public void SetOEMCode(string Value, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Value (string): The OEM code
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
oasConfig.SetOEMCode("111", "localhost", ref resultMessage);

if (resultMessage.Equals("Success"))
{
    Console.WriteLine("OEM code set successfully");
}
else
{
    Console.WriteLine($"Failed to set OEM code: {resultMessage}");
}
Started

Checks if the OAS Runtime has started.

Signatures:

public bool Started()
public bool Started(string NetworkNode)
public bool Started(string NetworkNode, ref string ErrorString)
public bool Started(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • bool: true if Runtime has started, otherwise false

Example:

var oasConfig = new Config();
var result = oasConfig.Started();
// result = true
StartRuntime

Start the runtime on the given OAS NetworkNode (default is localhost).

Signatures:

public void StartRuntime()
public void StartRuntime(string NetworkNode)
public void StartRuntime(string NetworkNode, ref string ErrorString)
public void StartRuntime(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
oasConfig.StartRuntime("localhost", ref resultMessage);
// resultMessage = "Success"

oasConfig.StartRuntime("localhost", ref resultMessage);
// resultMessage = "OAS Engine is already in Runtime Mode"
Stopped

Checks if the OAS Runtime has stopped.

Signatures:

public bool Stopped()
public bool Stopped(string NetworkNode)
public bool Stopped(string NetworkNode, ref string ErrorString)
public bool Stopped(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • bool: true if Runtime has stopped, otherwise false

Example:

var oasConfig = new Config();
var result = oasConfig.Stopped();
// result = false
StopRuntime

Stop the OAS Runtime.

The ErrorString will be set to Success if the OAS service is stopped successfully or if already stopped.

Signatures:

public void StopRuntime()
public void StopRuntime(string NetworkNode)
public void StopRuntime(string NetworkNode, ref string ErrorString)
public void StopRuntime(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
oasConfig.StopRuntime("localhost", ref resultMessage);
// resultMessage = "Success"
UpdateOASVersion

Update OAS to the latest available version.

By default the latest download will be downloaded from the OAS download servers.

To use your own hosting server you can use the CustomServerFilePathOAS, CustomServerFilePathOASUpdate, FTPUser and FTPPassword fields.

Signatures:

public string UpdateOASVersion(string NetworkNode)
public string UpdateOASVersion(string NetworkNode, string RemoteSCADAHostingName)
public string UpdateOASVersion(string NetworkNode, string RemoteSCADAHostingName, string CustomServerFilePathOAS, string CustomServerFilePathOASUpdate, string FTPUser, string FTPPassword)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name
  • CustomServerFilePathOAS (string): The server HTTP URL or FTP host/IP where the OAS update packages reside
  • CustomServerFilePathOASUpdate (string): The server HTTP URL or FTP host/IP where the OAS update applications reside
  • FTPUser (string): The custom update server FTP username
  • FTPPassword (string): The custom update server FTP password

Returns:

  • string: Success if update begins successfully, otherwise an error string

Example:

var oasConfig = new Config();
var result = oasConfig.UpdateOASVersion("localhost");

Authentication

LogIn

Use the LogIn method to set the username and password that is used when making API requests.

When using the LogIn method, the username and password is not validated immediately. If an invalid username or password is used an error result will be returned on the next API call.

Related Information: Authentication

Signatures:

public void LogIn(string UserName, string Password)

Parameters:

  • UserName (string): User username
  • Password (string): User password

Example:

var oasConfig = new Config();
oasConfig.LogIn("api_username", "api_key");
LogInWithValidation

Use the LogInWithValidation method to set the username and password that is used when making API requests.

This method will validate the provided credentials with the server and return a result.

Related Information: Authentication

Signatures:

public bool LogInWithValidation(string UserName, string Password)
public bool LogInWithValidation(string UserName, string Password, string NetworkNode)
public bool LogInWithValidation(string UserName, string Password, string NetworkNode, string RemoteSCADAHostingName)
public bool LogInWithValidation(string UserName, string Password, string NetworkNode, string RemoteSCADAHostingName, ref string ErrorString)

Parameters:

  • UserName (string): User username
  • Password (string): User password
  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name
  • ErrorString (ref string): Error string result

Returns:

  • bool: true if authentication is successful, otherwise false

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
var authResult = oasConfig.LogInWithValidation("api_username", "api_key", "localhost", string.Empty, ref resultMessage);

if (!authResult)
{
    Console.WriteLine(resultMessage);
}
LogOff

Clear the user credentials.

Signatures:

public void LogOff()

Example:

var oasConfig = new Config();
oasConfig.LogIn("api_username", "api_key");

// perform some operations

// clear credentials
oasConfig.LogOff();

Alarms

AddAlarms

Create one or more custom alarm instances.

You can use this method to inject alarms into the OAS platform that are not associated with any tags. It means you have to manually specify all of the alarm details through this API call.

Configuration Alarm Types

  • Digital
  • Low
  • Low Low
  • High
  • High High
  • ROC
  • System
  • Tag Event

Signatures:

public void AddAlarms(string[] AlarmIDs, string[] AlarmTypes, string[] AlarmGroups, int[] AlarmPriorities, string[] AlarmText, bool[] AlarmActive, double[] AlarmValues, DateTime[] AlarmTimeStamps, int[] AlarmTimeDelays, bool[] AcknowledgeImmediately, bool[] ForceNewAlarm)
public void AddAlarms(string[] AlarmIDs, string[] AlarmTypes, string[] AlarmGroups, int[] AlarmPriorities, string[] AlarmText, bool[] AlarmActive, double[] AlarmValues, DateTime[] AlarmTimeStamps, int[] AlarmTimeDelays, bool[] AcknowledgeImmediately, bool[] ForceNewAlarm, string NetworkNode)
public void AddAlarms(string[] AlarmIDs, string[] AlarmTypes, string[] AlarmGroups, int[] AlarmPriorities, string[] AlarmText, bool[] AlarmActive, double[] AlarmValues, DateTime[] AlarmTimeStamps, int[] AlarmTimeDelays, bool[] AcknowledgeImmediately, bool[] ForceNewAlarm, string NetworkNode, ref string ErrorString)
public void AddAlarms(string[] AlarmIDs, string[] AlarmTypes, string[] AlarmGroups, int[] AlarmPriorities, string[] AlarmText, bool[] AlarmActive, double[] AlarmValues, DateTime[] AlarmTimeStamps, int[] AlarmTimeDelays, bool[] AcknowledgeImmediately, bool[] ForceNewAlarm, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • AlarmIDs (string[]): An alarm ID string
  • AlarmTypes (string[]): Alarm type (see AlarmTypes list above)
  • AlarmGroups (string[]): The alarm group
  • AlarmPriorities (int[]): The alarm priority
  • AlarmText (string[]): The alarm text
  • AlarmActive (bool[]): Alarm active if set to true, otherwise false
  • AlarmValues (double[]): Alarm value
  • AlarmTimeStamps (DateTime[]): Alarm timestamp
  • AlarmTimeDelays (int[]): Alarm delay in seconds
  • AcknowledgeImmediately (bool[]): Acknowledge alarm immediately if set to true, otherwise false
  • ForceNewAlarm (bool[]): Force new alarm even if alarm ID matches existing alarm
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var result = oasConfig.AddAlarms(new string[]{}, new string[]{}, new string[]{}, new int[]{}, new string[]{}, new bool[]{}, new double[]{}, new DateTime[]{}, new int[]{}, new bool[]{}, new bool[]{});
GetAllAlarmGroups

Get a list of all alarm groups defined in the OAS platform across all alarms.

Signatures:

public string[] GetAllAlarmGroups()
public string[] GetAllAlarmGroups(string NetworkNode)
public string[] GetAllAlarmGroups(string NetworkNode, ref string ErrorString)
public string[] GetAllAlarmGroups(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of alarm groups

Example:

var oasConfig = new Config();
var result = oasConfig.GetAllAlarmGroups();
//result = [
//    "Bottling",
//    "Communications",
//    "DataLog",
//    "FEC",
//    "FileDataSource",
//    "Office",
//    "OPC",
//    "OPC Alarm And Event",
//    "Operator Events",
//    "Process",
//    "System",
//    "Tag Client",
//    "Tanks",
//    "Values",
//    "Wastewater",
//    "Yacht"
//]
GetAllAlarms

Get all alarm instances in the OAS Runtime memory.

This includes all active, inactive, acknowledged and unacknowledged alarms since OAS was last started.

Each unique Tag alarm instance is represented by an AlarmID consisting of the Tag path and alarm type. Because the uniqueness of the alarm ID is a Tag and Instance Alarm Type combination, if a particular alarm clears and then triggers again it will have the same Alarm ID, but with a new alarm timestamp.

For example: an Alarm ID with the value Tanks.Tank 2.Level_Lo means it was the Tanks.Tank 2.Level tag and the alarm was a Low alarm type.

The runtime alarm types are the types configured or set by the OAS system.

Runtime Alarm Types

  • Digital
  • Low
  • Low Low
  • High
  • High High
  • ROC
  • System
  • Tag Event (when the Log as Event checkbox is set in the alarm configuration)

Instance Alarm Types

The following represent the six alarm types. If the Log as Event checkbox is set then the alarm type will have _Event appended. System alarms do not have an an alarm instance type appended to the AlarmID field.

  • Dig
  • Dig_Event
  • Lo
  • Lo_Event
  • LoLo
  • LoLo_Event
  • Hi
  • Hi_Event
  • HiHi
  • HiHi_Event
  • ROC
  • ROC_Event

Signatures:

public object[] GetAllAlarms()
public object[] GetAllAlarms(string NetworkNode)
public object[] GetAllAlarms(string NetworkNode, ref string ErrorString)
public object[] GetAllAlarms(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[string[]]: List of alarms. The first row is a header row.
    • AlarmID (string): Alarm ID
    • AlarmType (string): Alarm type (see Runtime Alarm Types list above)
    • Group (string): Alarm group
    • Priority (int): Alarm priority
    • Text (string): Alarm text
    • Active (bool): Active state (true means active, false means inactive)
    • Acked (bool): Acknowledgement state (true means acknowledged, false means unacknowledged)
    • AlarmLimit (object): The Tag value when alarm will be triggered
    • AlarmValue (object): Tag value when alarm limit was reached
    • ClearedValue (object): Tag value when alarm cleared
    • AlarmDateTime (datetime): Timestamp when alarm was triggered (after delay)
    • ClearedDateTime (datetime): Timestamp when alarm cleared
    • AckedDateTime (datetime): Timestamp when alarm was acknowledged
    • AckedUser (string): The logged in user name when the alarm was acknowledged
    • TimeDelay (int): The configured alarm delay in seconds
    • TimeOffset (int): The configured alarm time offset in hours
    • Units (string): Alarm value units
    • Document (string): The configured document link
    • Comment (string): The comment set by a user
    • LastUserForComment (string): The last user to update the alarm comment
    • TagName (string): The name of the Tag (without the Tag Group)
    • TagReference (string): The name of the Tag Group that the Tag is in
    • TagParameter (string): The instance alarm type (see Instance Alarm Types list above)

Example:

var oasConfig = new Config();
var result = oasConfig.GetAllAlarms();

//result = [
//  [
//    "AlarmID","AlarmType","Group","Priority","Text","Active","Acked","AlarmLimit","AlarmValue","ClearedValue","AlarmDateTime","ClearedDateTime","AckedDateTime","AckedUser","TimeDelay","TimeOffset","Units","Document","Comment","LastUserForComment","TagName","TagReference","TagParameter"
//  ],
//  [
//    "UIEngine.Bottling Line.Run Status 2_Dig", "Digital", "Bottling", 0, "Label Reject Alarm", false, false, 1, 1, 0, "7/11/2025 2:55:22 PM", "7/11/2025 2:55:24 PM", "1/1/0001 12:00:00 AM", "", 0, 0, "", "", "", "", "Run Status 2", "UIEngine.Bottling Line", "Dig
//  ],
//  [
//    "Saw_HiHi_Event", "Tag Event", "Values", 1000, "Saw High High Alarm", false, false, 8, 8, 7, "7/11/2025 2:55:08 PM", "7/11/2025 2:55:13 PM", "1/1/0001 12:00:00 AM", "", 0, 0, "", "", "", "", "Saw", "", "HiHiEvent"
//  ],
//  [
//    "Tanks.Tank 2.Level_Lo", "Low", "Tanks", 500, "Tank 2 Level Low Alarm", true, false, 1, 0, 0, "7/11/2025 2:49:36 PM", "1/1/0001 12:00:00 AM", "1/1/0001 12:00:00 AM", "", 0, 0, "Feet", "", "", "", "Level", "Tanks.Tank 2", "Lo"
//  ],
//  [
//    "UIEngine.Office.Fire_Dig", "Digital", "Office", 0, "Fire Alarm in OFFICE 602", false, false, 1, 1, 0, "7/11/2025 2:55:00 PM", "7/11/2025 2:55:20 PM", "1/1/0001 12:00:00 AM", "", 0, 0, "", "", "", "", "Fire", "UIEngine.Office", "Dig"
//  ]
//]

Alarm Logging

AddAlarmLoggingGroup

Add a new Alarm Logging Group with the given group name.

Signatures:

public int AddAlarmLoggingGroup(string Group)
public int AddAlarmLoggingGroup(string Group, string NetworkNode)
public int AddAlarmLoggingGroup(string Group, string NetworkNode, ref string ErrorString)
public int AddAlarmLoggingGroup(string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Group (string): Alarm logging group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if an Alarm Logging Group with the given name already exists
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
var result = oasConfig.AddAlarmLoggingGroup("AlarmLoggingGroupName", "localhost", ref resultMessage);

if (result > 0)
{
    Console.WriteLine("Alarm logging group added successfully");
    //result = 1
    //resultMessage = "Success"
}
else
{
    Console.WriteLine($"Error: {resultMessage}");
    //result = 0
    //resultMessage = "Cannot Add Alarm Logging Group"
}
AlarmBufferingIsActive

Determine if alarm buffering to disk is active due to alarm logging failure.

Signatures:

public bool AlarmBufferingIsActive(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • bool: true if alarm buffering is active, otherwise false

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
var result = oasConfig.AlarmBufferingIsActive("localhost", ref resultMessage, "");
// Example: alarm buffering is active
// result = true
AlarmBufferingSeconds

Determine how long alarm buffering to disk due to alarm logging failure has been active for in number of seconds.

Signatures:

public int AlarmBufferingSeconds(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int: The number of seconds since alarm data buffering started

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
var result = oasConfig.AlarmBufferingSeconds("localhost", ref resultMessage, "");
InitialAlarmBufferTime

The timestamp of when alarm buffering to disk due to failure first started.

Signatures:

public DateTime InitialAlarmBufferTime(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • DateTime: The timestamp of when alarm buffering started

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
var result = oasConfig.InitialAlarmBufferTime("localhost", ref resultMessage, "");
AlarmLoggingCSVExport

Export the Alarm Logging configurations to a list of CSV strings. The first row is the header row as returned by AlarmLoggingCSVHeaderString followed by one row for each Alarm Logging Group configuration. The first column is the primary key.

Signatures:

public string[] AlarmLoggingCSVExport()
public string[] AlarmLoggingCSVExport(string NetworkNode)
public string[] AlarmLoggingCSVExport(string NetworkNode, ref string ErrorString)
public string[] AlarmLoggingCSVExport(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: Returns a list of CSV strings

Example:

var oasConfig = new Config();
var result = oasConfig.AlarmLoggingCSVExport();
AlarmLoggingCSVHeaderString

Returns all of the column heading names for the Alarm Logging configuration CSV export.

Signatures:

public string AlarmLoggingCSVHeaderString()
public string AlarmLoggingCSVHeaderString(string NetworkNode)
public string AlarmLoggingCSVHeaderString(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: A delimited string of all CSV headers for Alarm Logging configuration export

Example:

var oasConfig = new Config();
var result = oasConfig.AlarmLoggingCSVHeaderString();

// result = "Logging Group Name,Logging Active,Use Tag Value To Activate Logging,Tag For Activate Logging,Remove Old Data,Remove Old Data Days,Web History Time Offset,Include Active Alarm,Include Not Active Alarm,Include Active Acked Alarm,Include Not Active Acked Alarm,Include System Alarm,Include OPC Alarm,Include Tag Client Alarm,Include High High Alarm,Include High Alarm,Include Low Alarm,Include Low Low Alarm,Include Digital Alarm,Include ROC Alarm,Include Tag Events,Include Operator Events,Min Priority,Max Priority,Alarm Groups,Network Nodes,Log To DB,DB Provider,DB Server Name,Use Tag Value For DB Server Name,Tag For DB Server Name,MongoDB Srv,Enable SSL,SSL Certificate,SSL Key,MySQL SSL Mode,MongoDB Port,Cassandra Port,PostgreSQL Port,SQL Server Port,Oracle Port,mySQL Port,MariaDB Port,InfluxDB Port,Oracle Use TNS Names File,Oracle TNS Names Folder,Database Name,Use Tag Value For Database Name,Tag For Database Name,Table Name,Use Tag Value For Table Name,Tag For Table Name,Use WinNT Authentication,DB User Name,DB Password,Trust Server Certificate,Connect Timeout,Log One Record Per Alarm,Date Time Field High Res,Log To CSV,Path For CSV File Name,Use Tag Value To Change Path For CSV File Name,Tag For Path For CSV File Name,CSV File Name,Use Tag Value To Change CSV File Name,Tag For CSV File Name,Append Date To CSV File Name,Append Hour To CSV File Name,Append Minute To CSV File Name,Last Column"
AlarmLoggingCSVImport

Import Alarm Logging configuration using CSV strings.

The first row should provide the headers you wish to update. You only have to provide the headers you want to update, but the first header must always be Logging Group Name.

Use the AlarmLoggingCSVHeaderString() call to get a listing of valid header names

Following the header row should be one or more rows containing alarm logging configurations.

If the Logging Group Name does not match any existing logging group name then it will be added. Any properties not provided will use default values.

If an existing logging group name is found then the properties given by the headers will be updated. Any properties not provided will not be updated.

Signatures:

public string AlarmLoggingCSVImport(string[] CSVStrings)
public string AlarmLoggingCSVImport(string[] CSVStrings, string NetworkNode)
public string AlarmLoggingCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString)
public string AlarmLoggingCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • CSVStrings (string[]): List of CSV rows to import including header row
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: Returns number of alarm logging groups added and updated

Example:

List<string[]> alarmLoggingGroupRows = [];

alarmLoggingGroupRows.Add(["Logging Group Name", "Logging Active"]);
alarmLoggingGroupRows.Add(["MyAlarmLoggingGroup", "true"]);

var alarmLoggingGroupData = alarmLoggingGroupRows
    .Select(row => string.Join(',', row))
    .ToArray();

var oasConfig = new Config();
var resultMessage = string.Empty;
var result = oasConfig.AlarmLoggingCSVImport(alarmLoggingGroupData);

// New logging group example
// -------------------------
// result = "1 Alarm Logging Groups Added 
//           0 Alarm Logging Groups Updated"
// resultMessage = "Success"

// Existing logging group example
// ------------------------------
// result = "0 Alarm Logging Groups Added 
//           1 Alarm Logging Groups Updated"
// resultMessage = "Success"

// Failure example - missing first field
// -------------------------------------
// resultMessage = "No Logging Groups were imported.  Notification Group Name column is required"

// Failure example - bad header
// ----------------------------
// resultMessage = "Errors in Rows:1
//                  0 Alarm Logging Groups Added 
//                  0 Alarm Logging Groups Updated"
GetAlarmLogging_Parameter_Value

Read a parameter value of a given Alarm Logging group.

For a list of parameters see GetAlarmLoggingParameterStrings

Signatures:

public Object GetAlarmLogging_Parameter_Value(string Parameter, string Group)
public Object GetAlarmLogging_Parameter_Value(string Parameter, string Group, string NetworkNode)
public Object GetAlarmLogging_Parameter_Value(string Parameter, string Group, string NetworkNode, ref string ErrorString)
public Object GetAlarmLogging_Parameter_Value(string Parameter, string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Parameter (string): The parameter name
  • Group (string): Alarm logging group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • Object: Alarm Logging group parameter value

Example:

var oasConfig = new Config();
var result = oasConfig.GetAlarmLogging_Parameter_Value("LoggingActive", "MyAlarmLoggingGroup");
// result = true
GetAlarmLogging_Parameter_Values

Read all parameter values of a given Alarm Logging group.

For a list of parameters see GetAlarmLoggingParameterStrings

Signatures:

public object[] GetAlarmLogging_Parameter_Values(string Group)
public object[] GetAlarmLogging_Parameter_Values(string Group, string NetworkNode)
public object[] GetAlarmLogging_Parameter_Values(string Group, string NetworkNode, ref string ErrorString)
public object[] GetAlarmLogging_Parameter_Values(string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Group (string): Alarm logging group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • object[]: List of Alarm Logging group parameter values where the first row is a status message

Example:

var oasConfig = new Config();
var result = oasConfig.GetAlarmLogging_Parameter_Values("MyAlarmLoggingGroup");
// result = [
//   "Success",
//   "MyAlarmLoggingGroup",
//   "localhost",
//   true,
//   true,
//   ...
// ]
GetAlarmLoggingNames

Get a list of Alarm Logging group names.

Signatures:

public string[] GetAlarmLoggingNames()
public string[] GetAlarmLoggingNames(string NetworkNode)
public string[] GetAlarmLoggingNames(string NetworkNode, ref string ErrorString)
public string[] GetAlarmLoggingNames(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of Alarm Logging group names

Example:

var oasConfig = new Config();
var result = oasConfig.GetAlarmLoggingNames();
// result = [
//    "MyAlarmLoggingGroup",
//    "AnotherAlarmLoggingGroup"
// ]
GetAlarmLoggingParameterStrings

Get a list of Alarm Logging parameter names. These are useful when getting and setting configuration parameters.

Signatures:

public string[] GetAlarmLoggingParameterStrings()
public string[] GetAlarmLoggingParameterStrings(string NetworkNode)
public string[] GetAlarmLoggingParameterStrings(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of available Alarm Logging group parameter names

Example:

var oasConfig = new Config();
var result = oasConfig.GetAlarmLoggingParameterStrings();
// result = [
//   "ReturnSuccess",
//   "Name",
//   "NetworkNodes",
//   ...
// ]
LastAlarmBufferTime

The timestamp of when alarm buffering to disk due to alarm logging failure was last attempted.

Signatures:

public DateTime LastAlarmBufferTime(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • DateTime: The timestamp of when the last alarm logging was attempted

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
var result = oasConfig.LastAlarmBufferTime("localhost", ref resultMessage, "");
LoadAlarmLoggingConfiguration

Load the given Alarm Logging configuration file. The filename must end with the extension .AlarmLog.

Warning

This will replace the existing runtime configuration

Signatures:

public void LoadAlarmLoggingConfiguration(string ConfigurationFilePath)
public void LoadAlarmLoggingConfiguration(string ConfigurationFilePath, string NetworkNode)
public void LoadAlarmLoggingConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString)
public void LoadAlarmLoggingConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ConfigurationFilePath (string): The file system path of the configuration file
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
oasConfig.LoadAlarmLoggingConfiguration("C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles\\AlarmLoggingConfiguration.AlarmLog", "localhost", ref resultMessage);
// resultMessage = "Success"
RemoveAlarmLoggingGroup

Remove Alarm Logging group with the given name.

Signatures:

public int RemoveAlarmLoggingGroup(string Group)
public int RemoveAlarmLoggingGroup(string Group, string NetworkNode)
public int RemoveAlarmLoggingGroup(string Group, string NetworkNode, ref string ErrorString)
public int RemoveAlarmLoggingGroup(string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Group (string): Alarm logging group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if the Alarm Logging group does not exist or removing failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.RemoveAlarmLoggingGroup("MyAlarmLoggingGroup");
SaveAlarmLoggingConfiguration

Save the Alarm Logging configurations.

Requirements:

  • On Windows the path must start with: C:\ProgramData\OpenAutomationSoftware\ConfigFiles\
  • On Linux the path must start with: /oas/ConfigFiles/
  • The file extension must be set to: .AlarmLog

Signatures:

public void SaveAlarmLoggingConfiguration(string ConfigurationFilePath)
public void SaveAlarmLoggingConfiguration(string ConfigurationFilePath, string NetworkNode)
public void SaveAlarmLoggingConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString)
public void SaveAlarmLoggingConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ConfigurationFilePath (string): The file system path of the configuration file
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;

// Windows
oasConfig.SaveAlarmLoggingConfiguration("C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles\\AlarmLoggingConfiguration.AlarmLog", "localhost", ref resultMessage);

// Linux
oasConfig.SaveAlarmLoggingConfiguration("/oas/ConfigFiles/AlarmLoggingConfiguration.AlarmLog", "localhost", ref resultMessage);

// resultMessage = "Success"

// Windows incorrect file path or extension example
// ------------------------------------------------
// resultMessage = ""File must be saved to C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles directory with file extension .AlarmLog""

// Linux incorrect file path or extension example
// ----------------------------------------------
// resultMessage = "File must be saved to /oas/ConfigFiles directory with file extension .AlarmLog"
SetAlarmLogging_Parameter_Values

Set multiple parameter values of a given Alarm Logging group.

For a list of parameters see GetAlarmLoggingParameterStrings

Signatures:

public int SetAlarmLogging_Parameter_Values(string[] Parameters, object[] Values, string Group)
public int SetAlarmLogging_Parameter_Values(string[] Parameters, object[] Values, string Group, string NetworkNode)
public int SetAlarmLogging_Parameter_Values(string[] Parameters, object[] Values, string Group, string NetworkNode, ref string ErrorString)
public int SetAlarmLogging_Parameter_Values(string[] Parameters, object[] Values, string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Parameters (string[]): Parameter names
  • Values (object[]): Parameter values
  • Group (string): Alarm logging group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.SetAlarmLogging_Parameter_Values(["Logging Active"], [false], "MyAlarmLoggingGroup");
SetAlarmLogging_Parameter_Value

Set a parameter value of a given Alarm Logging group.

For a list of parameters see GetAlarmLoggingParameterStrings

Signatures:

public int SetAlarmLogging_Parameter_Value(string Parameter, Object Value, string Group)
public int SetAlarmLogging_Parameter_Value(string Parameter, Object Value, string Group, string NetworkNode)
public int SetAlarmLogging_Parameter_Value(string Parameter, Object Value, string Group, string NetworkNode, ref string ErrorString)
public int SetAlarmLogging_Parameter_Value(string Parameter, Object Value, string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Parameter (string): The parameter name
  • Value (Object): The parameter value
  • Group (string): Alarm logging group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.SetAlarmLogging_Parameter_Value("Logging Active", false, "MyAlarmLoggingGroup");

Alarm Notifications

AddAlarmNotificationGroup

Add a new Alarm Notification Group with the given group name.

Signatures:

public int AddAlarmNotificationGroup(string Group)
public int AddAlarmNotificationGroup(string Group, string NetworkNode)
public int AddAlarmNotificationGroup(string Group, string NetworkNode, ref string ErrorString)
public int AddAlarmNotificationGroup(string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Group (string): Alarm notification group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.AddAlarmNotificationGroup("MyAlarmNotificationGroup");
AlarmNotificationCSVExport

Export the Alarm Notification configurations to a list of CSV strings. The first row is the header row as returned by AlarmNotificationCSVHeaderString followed by one row for each Alarm Notification Group configuration. The first column is the primary key.

Signatures:

public string[] AlarmNotificationCSVExport()
public string[] AlarmNotificationCSVExport(string NetworkNode)
public string[] AlarmNotificationCSVExport(string NetworkNode, ref string ErrorString)
public string[] AlarmNotificationCSVExport(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: Returns a list of CSV strings

Example:

var oasConfig = new Config();
var result = oasConfig.AlarmLoggingCSVExport();
AlarmNotificationCSVHeaderString

Returns all of the column heading names for the Alarm Notification configuration CSV export.

Signatures:

public string AlarmNotificationCSVHeaderString()
public string AlarmNotificationCSVHeaderString(string NetworkNode)
public string AlarmNotificationCSVHeaderString(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: A delimited string of all CSV headers for Alarm Notification configuration export

Example:

var oasConfig = new Config();
var result = oasConfig.AlarmNotificationCSVHeaderString();

// result = "Notification Group Name,Notification Active,Use Tag Value To Activate Notification,Tag For Activate Notification,Include Active Alarm,Include Not Active Alarm,Include Active Acked Alarm,Include Not Active Acked Alarm,Include System Alarm,Include OPC Alarm,Include Tag Client Alarm,Include High High Alarm,Include High Alarm,Include Low Alarm,Include Low Low Alarm,Include Digital Alarm,Include ROC Alarm,Include Tag Events,Include Operator Events,Min Priority,Max Priority,Alarm Groups,Network Nodes,EMail Alarms,EMail From Address,EMail To Address,Use Tag Value For EMail To Address,Tag For EMail To Address,EMail Resend,EMail Resend Continuously,EMail Resend To Address,Use Tag Value For EMail Resend To Address,Tag For EMail Resend To Address,Resend Include Active Alarm,Resend Include Not Active Alarm,Resend Include Active Acked Alarm,Resend Include Not Active Acked Alarm,Resend Time Delay,EMail CC Address,EMail Outgoing Mail Server,EMail Use Credentials,EMail Username,EMail Password,EMail Outgoing Port Number,Alternate Mail Connection,EMail SSL,EMail SSL3,EMail TLS,EMail TLS11,EMail TLS12,Email Subject,EMail Subject From Alarm Message,EMail Include Item Names,EMail Include Alarm ID,EMail Include Alarm Type,EMail Include Alarm Group,EMail Include Alarm Priority,EMail Include Alarm Text,EMail Include Alarm Active Status,EMail Include Alarm Acknowledged Status,EMail Include Time Delay,EMail Include Alarm Value,EMail Alarm Value Format,EMail Include Cleared Value,EMail Cleared Value Format,EMail Include Alarm Limit,EMail Alarm Limit Format,EMail Include Document,EMail Include Comment,EMail Include Alarm Time,EMail Include Cleared Time,EMail Include Acknowledged Time,EMail Date And Time Format,EMail Date Offset,EMail Disable Sending Multiple EMails,EMail Disable Sending Time Period Minutes,EMail Enable Acknowledge,EMail Incoming Mail Server,EMail Incoming Port Number,EMail Incoming Username,EMail Incoming Password,EMail Required Response To Acknowledge,EMail Acknowledge Security Username,EMail Acknowledge Security Password,SMS Alarms,SMS Provider,SMS From Number,SMS To Number,Use Tag Value For SMS To Number,Tag For SMS To Number,SMS Account Username,SMS Account API Key,SMS Account SID,SMS Authentication Token,SMS Resend,SMS Resend Continuously,SMS Resend To Number,Use Tag Value For SMS Resend To Number,Tag For SMS Resend To Number,SMS Resend Include Active Alarm,SMS Resend Include Not Active Alarm,SMS Resend Include Active Acked Alarm,SMS Resend Include Not Active Acked Alarm,SMS Resend Time Delay,SMS Include Alarm ID,SMS Include Alarm Type,SMS Include Alarm Group,SMS Include Alarm Priority,SMS Include Alarm Text,SMS Include Alarm Active Status,SMS Include Alarm Acknowledged Status,SMS Include Time Delay,SMS Include Alarm Value,SMS Alarm Value Format,SMS Include Cleared Value,SMS Cleared Value Format,SMS Include Alarm Time,SMS Include Cleared Time,SMS Include Acknowledged Time,SMS Date And Time Format,SMS Include Alarm Limit,SMS Alarm Limit Format,SMS Include Document,SMS Include Comment,SMS Disable Sending Multiple SMS,SMS Disable Sending Time Period Minutes,SMS Include Item Names,SMS Date Offset,Voice Alarms,Voice Provider,Voice From Number,Voice To Number,Use Tag Value For Voice To Number,Tag For Voice To Number,Voice Account Username,Voice Account API Key,Voice Language,Voice Account SID,Voice Authentication Token,Voice Resend,Voice Resend Continuously,Voice Resend To Number,Use Tag Value For Voice Resend To Number,Tag For Voice Resend To Number,Voice Resend Include Active Alarm,Voice Resend Include Not Active Alarm,Voice Resend Include Active Acked Alarm,Voice Resend Include Not Active Acked Alarm,Voice Resend Time Delay,Voice Include Alarm ID,Voice Include Alarm Type,Voice Include Alarm Group,Voice Include Alarm Priority,Voice Include Alarm Text,Voice Include Alarm Active Status,Voice Include Alarm Acknowledged Status,Voice Include Time Delay,Voice Include Alarm Value,Voice Alarm Value Format,Voice Include Cleared Value,Voice Cleared Value Format,Voice Include Alarm Time,Voice Include Cleared Time,Voice Include Acknowledged Time,Voice Date And Time Format,Voice Include Alarm Limit,Voice Alarm Limit Format,Voice Include Document,Voice Include Comment,Voice Disable Sending Multiple Voice,Voice Disable Sending Time Period Minutes,Voice Include Item Names,Voice Date Offset,Enable Tag For Active Alarms,Tag For Active Alarms,Enable Tag For Active Not Acked Alarms,Tag For Active Not Acked Alarms,Enable Tag For Active Acked Alarms,Tag For Active Acked Alarms,Enable Tag For Not Active Not Acked Alarms,Tag For Not Active Not Acked Alarms,Enable Tag For Not Active Acked Alarms,Tag For Not Active Acked Alarms,Enable Tag For Active Alarms Count,Tag For Active Alarms Count,Enable Tag For Active Not Acked Alarms Count,Tag For Active Not Acked Alarms Count,Enable Tag For Active Acked Alarms Count,Tag For Active Acked Alarms Count,Enable Tag For Not Active Not Acked Alarms Count,Tag For Not Active Not Acked Alarms Count,Enable Tag For Not Active Acked Alarms Count,Tag For Not Active Acked Alarms Count,Enable Tag For Number Of Active Alarms In Period,Tag For Number Of Active Alarms In Period,Time Period For Number Of Active Alarms,Store Number Of Active Alarms In Period,Folder Path For Number Of Active Alarms In Period,Enable Tag For Number Of Alarms Still Active More Than Period,Tag For Number Of Alarms Still Active More Than Period,Time Period For Number Of Alarms Still Active,Last Column"

AlarmNotificationCSVImport

Import Alarm Notification configuration using CSV strings.

The first row should provide the headers you wish to update. You only have to provide the headers you want to update, but the first header must always be Notification Group Name.

Use the AlarmNotificationCSVHeaderString() call to get a listing of valid header names

Following the header row should be one or more rows containing alarm notification configurations.

If the Notification Group Name does not match any existing notification group name then it will be added. Any properties not provided will use default values.

If an existing notification group name is found then the properties given by the headers will be updated. Any properties not provided will not be updated.

Signatures:

public string AlarmNotificationCSVImport(string[] CSVStrings)
public string AlarmNotificationCSVImport(string[] CSVStrings, string NetworkNode)
public string AlarmNotificationCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString)
public string AlarmNotificationCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • CSVStrings (string[]): List of CSV rows to import including header row
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: Returns number of alarm notification groups added and updated

Example:

List<string[]> alarmNotificationGroupRows = [];

alarmNotificationGroupRows.Add(["Notification Group Name", "Notification Active"]);
alarmNotificationGroupRows.Add(["MyAlarmNotificationGroup", "true"]);

var alarmNotificationGroupData = alarmNotificationGroupRows
    .Select(row => string.Join(',', row))
    .ToArray();

var oasConfig = new Config();
var resultMessage = string.Empty;
var result = oasConfig.AlarmNotificationCSVImport(alarmNotificationGroupData, "localhost", ref resultMessage);

// New notification group example
// ------------------------------
// result = "1 Alarm Notification Groups Added 
//           0 Alarm Notification Groups Updated"
// resultMessage = "Success"

// Existing notification group example
// -----------------------------------
// result = "0 Alarm Notification Groups Added 
//           1 Alarm Notification Groups Updated"
// resultMessage = "Success"

// Failure example - missing first field
// -------------------------------------
// resultMessage = "No Notification Groups were imported.  Notification Group Name column is required"

// Failure example - bad header
// ----------------------------
// resultMessage = "Errors in Rows:1
//                  0 Alarm Notification Groups Added 
//                  0 Alarm Notification Groups Updated"
GetAlarmNotification_Parameter_Value

Read a parameter value of a given Alarm Notification group.

For a list of parameters see GetAlarmNotificationParameterStrings

Signatures:

public Object GetAlarmNotification_Parameter_Value(string Parameter, string Group)
public Object GetAlarmNotification_Parameter_Value(string Parameter, string Group, string NetworkNode)
public Object GetAlarmNotification_Parameter_Value(string Parameter, string Group, string NetworkNode, ref string ErrorString)
public Object GetAlarmNotification_Parameter_Value(string Parameter, string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Parameter (string): The parameter name
  • Group (string): Alarm notification group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • Object: Alarm Notification group parameter value

Example:

var oasConfig = new Config();
var result = oasConfig.GetAlarmNotification_Parameter_Value("example", "example");
GetAlarmNotification_Parameter_Values

Read all parameter values of a given Alarm Notification group.

For a list of parameters see GetAlarmNotificationParameterStrings

Signatures:

public object[] GetAlarmNotification_Parameter_Values(string Group)
public object[] GetAlarmNotification_Parameter_Values(string Group, string NetworkNode)
public object[] GetAlarmNotification_Parameter_Values(string Group, string NetworkNode, ref string ErrorString)
public object[] GetAlarmNotification_Parameter_Values(string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Group (string): Alarm notification group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • object[]: List of Alarm Notification group parameter values

Example:

var oasConfig = new Config();
var result = oasConfig.GetAlarmNotification_Parameter_Values("MyAlarmNotificationGroup");
// result = [
//   "Success",
//   "MyAlarmNotificationGroup",
//   "localhost",
//   true,
//   false,
//   ...
// ]
GetAlarmNotificationNames

Get a list of Alarm Notification group names.

Signatures:

public string[] GetAlarmNotificationNames()
public string[] GetAlarmNotificationNames(string NetworkNode)
public string[] GetAlarmNotificationNames(string NetworkNode, ref string ErrorString)
public string[] GetAlarmNotificationNames(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of Alarm Notification group names

Example:

var oasConfig = new Config();
var result = oasConfig.GetAlarmNotificationNames();
// result = [
//    "MyAlarmNotificationGroup",
//    "AnotherAlarmNotificationGroup"
// ]
GetAlarmNotificationParameterStrings

Get a list of Alarm Notification parameter names. These are useful when getting and setting configuration parameters.

Signatures:

public string[] GetAlarmNotificationParameterStrings()
public string[] GetAlarmNotificationParameterStrings(string NetworkNode)
public string[] GetAlarmNotificationParameterStrings(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of all available Alarm Notification group parameter names

Example:

var oasConfig = new Config();
var result = oasConfig.GetAlarmNotificationParameterStrings();
// result = [
//   "ReturnSuccess",
//   "Name",
//   "NetworkNodes",
//   ...
// ]
LoadAlarmNotificationConfiguration

Load the given Alarm Notification configuration file. The filename must end with the extension .AlarmNotification.

Warning

This will replace the existing runtime configuration

Signatures:

public void LoadAlarmNotificationConfiguration(string ConfigurationFilePath)
public void LoadAlarmNotificationConfiguration(string ConfigurationFilePath, string NetworkNode)
public void LoadAlarmNotificationConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString)
public void LoadAlarmNotificationConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ConfigurationFilePath (string): The file system path of the configuration file
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
oasConfig.LoadAlarmNotificationConfiguration("C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles\\AlarmNotificationConfiguration.AlarmNotification", "localhost", ref resultMessage);
// resultMessage = "Success"
RemoveAlarmNotificationGroup

Remove Alarm Notification group with the given name.

Signatures:

public int RemoveAlarmNotificationGroup(string Group)
public int RemoveAlarmNotificationGroup(string Group, string NetworkNode)
public int RemoveAlarmNotificationGroup(string Group, string NetworkNode, ref string ErrorString)
public int RemoveAlarmNotificationGroup(string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Group (string): Alarm notification group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if the Alarm Notification group does not exist or removing failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.RemoveAlarmNotificationGroup("MyAlarmNotification");
SaveAlarmNotificationConfiguration

Save the Alarm Notification configurations.

Requirements:

  • On Windows the path must start with: C:\ProgramData\OpenAutomationSoftware\ConfigFiles\
  • On Linux the path must start with: /oas/ConfigFiles/
  • The file extension must be set to: .AlarmNotification

Signatures:

public void SaveAlarmNotificationConfiguration(string ConfigurationFilePath)
public void SaveAlarmNotificationConfiguration(string ConfigurationFilePath, string NetworkNode)
public void SaveAlarmNotificationConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString)
public void SaveAlarmNotificationConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ConfigurationFilePath (string): The file system path of the configuration file
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;

// Windows
oasConfig.SaveAlarmNotificationConfiguration("C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles\\AlarmNotificationConfiguration.AlarmNotification", "localhost", ref resultMessage);

// Linux
oasConfig.SaveAlarmNotificationConfiguration("/oas/ConfigFiles/AlarmNotificationConfiguration.AlarmNotification", "localhost", ref resultMessage);

// resultMessage = "Success"

// Windows incorrect file path or extension example
// ------------------------------------------------
// resultMessage = "File must be saved to C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles directory with file extension .AlarmNotification"

// Linux incorrect file path or extension example
// ----------------------------------------------
// resultMessage = "File must be saved to /oas/ConfigFiles directory with file extension .AlarmNotification"
SetAlarmNotification_Parameter_Value

Set a parameter value of a given Alarm Notification group.

For a list of parameters see GetAlarmNotificationParameterStrings

Signatures:

public int SetAlarmNotification_Parameter_Value(string Parameter, Object Value, string Group)
public int SetAlarmNotification_Parameter_Value(string Parameter, Object Value, string Group, string NetworkNode)
public int SetAlarmNotification_Parameter_Value(string Parameter, Object Value, string Group, string NetworkNode, ref string ErrorString)
public int SetAlarmNotification_Parameter_Value(string Parameter, Object Value, string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Parameter (string): The parameter name
  • Value (Object): The parameter value
  • Group (string): Alarm notification group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.SetAlarmNotification_Parameter_Value("example", value, "MyAlarmNotificationGroup");
SetAlarmNotification_Parameter_Values

Set multiple parameter values of a given Alarm Notification group.

For a list of parameters see GetAlarmNotificationParameterStrings

Signatures:

public int SetAlarmNotification_Parameter_Values(string[] Parameters, object[] Values, string Group)
public int SetAlarmNotification_Parameter_Values(string[] Parameters, object[] Values, string Group, string NetworkNode)
public int SetAlarmNotification_Parameter_Values(string[] Parameters, object[] Values, string Group, string NetworkNode, ref string ErrorString)
public int SetAlarmNotification_Parameter_Values(string[] Parameters, object[] Values, string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Parameters (string[]): Parameter names
  • Values (object[]): Parameter values
  • Group (string): Alarm notification group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.SetAlarmNotification_Parameter_Values(new string[]{}, new object[]{}, "MyAlarmNotificationGroup");

Alarm & Events OPC Servers

AddAEOPCServer

Add a new Alarm and Event OPC Server with the given server name.

Signatures:

public int AddAEOPCServer(string Server)
public int AddAEOPCServer(string Server, string NetworkNode)
public int AddAEOPCServer(string Server, string NetworkNode, ref string ErrorString)
public int AddAEOPCServer(string Server, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Server (string): OPC server name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.AddAEOPCServer("MyAEOPCServer");
AEOPCServersCSVExport

Export the Alarm and Events OPC Servers configurations to a list of CSV strings. The first row is the header row as returned by AEOPCServersCSVHeaderString followed by one row for each Alarm and Events OPC Server configuration. The first column is the primary key.

Signatures:

public string[] AEOPCServersCSVExport()
public string[] AEOPCServersCSVExport(string NetworkNode)
public string[] AEOPCServersCSVExport(string NetworkNode, ref string ErrorString)
public string[] AEOPCServersCSVExport(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: Returns a list of CSV strings

Example:

var oasConfig = new Config();
var result = oasConfig.AEOPCServersCSVExport();
AEOPCServersCSVHeaderString

Returns all of the column heading names for the Alarm and Events OPC Servers configuration CSV export.

Signatures:

public string AEOPCServersCSVHeaderString()
public string AEOPCServersCSVHeaderString(string NetworkNode)
public string AEOPCServersCSVHeaderString(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: A delimited string of all CSV headers for Alarm and Events OPC Servers configuration export

Example:

var oasConfig = new Config();
var result = oasConfig.AEOPCServersCSVHeaderString();

// result = "AE OPC Server,Classic OPC,OPC UA Server URL,OPC UA EndPoint,OPC UA Authentication Type,OPC UA Username,OPC UA Password,OPC UA PFX Certificate File Path,OPC UA PFX Certificate Password,OPC UA Use Security,OPC UA Domain Name Security Override,OPC UA Allow Invalid Certificate,Alarm Group Source,Alarm Group Static Name,Alarm Type,Include Source Name In Alarm Text,Include Condition Name In Alarm Text,Include Message In Alarm Text,Include Current State In Alarm Text,Include Source Name In Document,Include Condition Name In Document,Attributes For Comment,Include Blank Conditions And SubConditions In AlarmID,OPC UA Include Events,Last Column"
AEOPCServersCSVImport

Import AE OPC Servers configuration using CSV strings.

The first row should provide the headers you wish to update. You only have to provide the headers you want to update, but the first header must always be AE OPC Server.

Use the AEOPCServersCSVHeaderString() call to get a listing of valid header names

Following the header row should be one or more rows containing AE OPC Server configurations.

If the AE OPC Server does not match any existing AE OPC server name then it will be added. Any properties not provided will use default values.

If an existing AE OPC server name is found then the properties given by the headers will be updated. Any properties not provided will not be updated.

Signatures:

public string AEOPCServersCSVImport(string[] CSVStrings)
public string AEOPCServersCSVImport(string[] CSVStrings, string NetworkNode)
public string AEOPCServersCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString)
public string AEOPCServersCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • CSVStrings (string[]): List of CSV rows to import including header row
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: Returns number of AE OPC servers added and updated

Example:

List<string[]> aeServerRows = [];

aeServerRows.Add(["AE OPC Server", "Classic OPC"]);
aeServerRows.Add(["MyAEServer", "true"]);

var aeServerData = aeServerRows
    .Select(row => string.Join(',', row))
    .ToArray();

var oasConfig = new Config();
var resultMessage = string.Empty;
var result = oasConfig.AEOPCServersCSVImport(aeServerData, "localhost", ref resultMessage);

// New AE OPC server example
// -------------------------
// result = "1 AE OPC Servers Added 
//           0 AE OPC Servers Updated"
// resultMessage = "Success"

// Existing AE OPC server example
// ------------------------------
// result = "0 AE OPC Servers Added 
//           1 AE OPC Servers Updated"
// resultMessage = "Success"

// Failure example - missing first field
// -------------------------------------
// resultMessage = "No AE OPC Servers were imported.  AE OPC Server column is required"

// Failure example - bad header
// ----------------------------
// resultMessage = "Errors in Rows:1
//                  0 AE OPC Servers Added 
//                  0 AE OPC Servers Updated"
GetAEOPCServerNames

Get a list of Alarm & Events OPC Server configuration names.

Signatures:

public string[] GetAEOPCServerNames()
public string[] GetAEOPCServerNames(string NetworkNode)
public string[] GetAEOPCServerNames(string NetworkNode, ref string ErrorString)
public string[] GetAEOPCServerNames(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of configured A&E OPC Server names

Example:

var oasConfig = new Config();
var result = oasConfig.GetAEOPCServerNames();
// result = [
//    "MyAEOPCServer",
//    "AnotherAEOPCServer"
// ]
GetListOfAEOPCServers

Returns a list of A&E OPC Server configurations.

Signatures:

public string[] GetListOfAEOPCServers()
public string[] GetListOfAEOPCServers(string NetworkNode)
public string[] GetListOfAEOPCServers(string NetworkNode, ref string ErrorString)
public string[] GetListOfAEOPCServers(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of A&E OPC Server names discovered

Example:

var oasConfig = new Config();
var result = oasConfig.GetListOfAEOPCServers();
LoadAEOPCServersConfiguration

Load the given Alarm and Events OPC Server configuration file. The filename must end with the extension .AEOPCServers.

Warning

This will replace the existing runtime configuration

Signatures:

public void LoadAEOPCServersConfiguration(string ConfigurationFilePath)
public void LoadAEOPCServersConfiguration(string ConfigurationFilePath, string NetworkNode)
public void LoadAEOPCServersConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString)
public void LoadAEOPCServersConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ConfigurationFilePath (string): The file system path of the configuration file
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
oasConfig.LoadAEOPCServersConfiguration("C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles\\AEOPCConfiguration.AEOPCServers", "localhost", ref resultMessage);
// resultMessage = "Success"
RemoveAEOPCServer

Remove Alarm and Events OPC Server with the given name.

Signatures:

public int RemoveAEOPCServer(string Server)
public int RemoveAEOPCServer(string Server, string NetworkNode)
public int RemoveAEOPCServer(string Server, string NetworkNode, ref string ErrorString)
public int RemoveAEOPCServer(string Server, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Server (string): OPC server name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if the A&E OPC Server does not exist or removing failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.RemoveAEOPCServer("MyAEOPCServer");
SaveAEOPCServersConfiguration

Save the Alarm and Event Servers configurations.

Requirements:

  • On Windows the path must start with: C:\ProgramData\OpenAutomationSoftware\ConfigFiles\
  • On Linux the path must start with: /oas/ConfigFiles/
  • The file extension must be set to: .AEOPCServers

Signatures:

public void SaveAEOPCServersConfiguration(string ConfigurationFilePath)
public void SaveAEOPCServersConfiguration(string ConfigurationFilePath, string NetworkNode)
public void SaveAEOPCServersConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString)
public void SaveAEOPCServersConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ConfigurationFilePath (string): The file system path of the configuration file
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;

// Windows
oasConfig.SaveAEOPCServersConfiguration("C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles\\AEOPCServersConfiguration.AEOPCServers", "localhost", ref resultMessage);

// Linux
oasConfig.SaveAEOPCServersConfiguration("/oas/ConfigFiles/AEOPCServersConfiguration.AEOPCServers", "localhost", ref resultMessage);

// resultMessage = "Success"

// Windows incorrect file path or extension example
// ------------------------------------------------
// resultMessage = "File must be saved to C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles directory with file extension .AEOPCServers"

// Linux incorrect file path or extension example
// ----------------------------------------------
// resultMessage = "File must be saved to /oas/ConfigFiles directory with file extension .AEOPCServers"
SetAEOPCServerParameter

Set an A&E OPC Server configuration parameter.

For a list of parameters see AEOPCServersCSVHeaderString

Signatures:

public int SetAEOPCServerParameter(string Server, string Parameter, Object Value)
public int SetAEOPCServerParameter(string Server, string Parameter, Object Value, string NetworkNode)
public int SetAEOPCServerParameter(string Server, string Parameter, Object Value, string NetworkNode, ref string ErrorString)
public int SetAEOPCServerParameter(string Server, string Parameter, Object Value, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Server (string): OPC server name
  • Parameter (string): The parameter name
  • Value (Object): The parameter value
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.SetAEOPCServerParameter("MyAEOPCServer", "Classic OPC", true);

Custom Object

ClearAllCustomObjectValues

Delete all custom object values.

Signatures:

public void ClearAllCustomObjectValues()
public void ClearAllCustomObjectValues(string NetworkNode)
public void ClearAllCustomObjectValues(string NetworkNode, ref string ErrorString)
public void ClearAllCustomObjectValues(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var result = oasConfig.ClearAllCustomObjectValues();
DeleteCustomObjectValue

Delete Custom Object value.

Signatures:

public void DeleteCustomObjectValue(string ObjectName)
public void DeleteCustomObjectValue(string ObjectName, string NetworkNode)
public void DeleteCustomObjectValue(string ObjectName, string NetworkNode, ref string ErrorString)
public void DeleteCustomObjectValue(string ObjectName, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ObjectName (string): The name of the object
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var result = oasConfig.DeleteCustomObjectValue("MyCustomObject");
GetCustomObjectNames

Get a list of Custom Object names.

Signatures:

public string[] GetCustomObjectNames()
public string[] GetCustomObjectNames(string NetworkNode)
public string[] GetCustomObjectNames(string NetworkNode, ref string ErrorString)
public string[] GetCustomObjectNames(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of Custom Object names

Example:

var oasConfig = new Config();
var result = oasConfig.GetCustomObjectNames();
// result = [
//    "CustomObjectName1",
//    "CustomObjectName2"
// ]
GetCustomObjectValue

Get a Custom Object value by object name.

Signatures:

public Object GetCustomObjectValue(string ObjectName)
public Object GetCustomObjectValue(string ObjectName, string NetworkNode)
public Object GetCustomObjectValue(string ObjectName, string NetworkNode, ref string ErrorString)
public Object GetCustomObjectValue(string ObjectName, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ObjectName (string): The name of the object
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • Object: The values of a Custom Object

Example:

var oasConfig = new Config();
var result = oasConfig.GetCustomObjectValue("MyCustomObject");
SetCustomObjectValue

Set a Custom Object value.

Signatures:

public void SetCustomObjectValue(string ObjectName, Object Value)
public void SetCustomObjectValue(string ObjectName, Object Value, string NetworkNode)
public void SetCustomObjectValue(string ObjectName, Object Value, string NetworkNode, ref string ErrorString)
public void SetCustomObjectValue(string ObjectName, Object Value, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ObjectName (string): The name of the object
  • Value (Object): The parameter value
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var result = oasConfig.SetCustomObjectValue("MyCustomObject", value);

Database

GetDatabaseData

Query a database through the OAS engine.

This allows you to query a remote database via a remote OAS Engine without having the expose the actual database. OAS will handle the data tunnel back to the caller.

This method will be executed on the OAS instance given by the NetworkNode IP or host name. The default is localhost.

Signatures:

public DataTable GetDatabaseData(DBProviderTypes DBProvider, string DBServer, string Database, string TableOrView, bool MSSQLWindowsAuthentication, string DBUser, string DBPassword, string[] FieldNames, FieldDataTypes[] DataTypes, bool UseDates, string DateTimeFieldName, DateTime StartDate, DateTime EndDate, string QueryString)
public DataTable GetDatabaseData(DBProviderTypes DBProvider, string DBServer, string Database, string TableOrView, bool MSSQLWindowsAuthentication, string DBUser, string DBPassword, string[] FieldNames, FieldDataTypes[] DataTypes, bool UseDates, string DateTimeFieldName, DateTime StartDate, DateTime EndDate, string QueryString, string NetworkNode)
public DataTable GetDatabaseData(DBProviderTypes DBProvider, string DBServer, string Database, string TableOrView, bool MSSQLWindowsAuthentication, string DBUser, string DBPassword, string[] FieldNames, FieldDataTypes[] DataTypes, bool UseDates, string DateTimeFieldName, DateTime StartDate, DateTime EndDate, string QueryString, string NetworkNode, ref string ErrorString)
public DataTable GetDatabaseData(DBProviderTypes DBProvider, string DBServer, string Database, string TableOrView, bool MSSQLWindowsAuthentication, string DBUser, string DBPassword, string[] FieldNames, FieldDataTypes[] DataTypes, bool UseDates, string DateTimeFieldName, DateTime StartDate, DateTime EndDate, string QueryString, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • DBProvider (DBProviderTypes): The database provider type
  • DBServer (string): The database server IP or host name
  • Database (string): The database name
  • TableOrView (string): The table or view name
  • MSSQLWindowsAuthentication (bool): true if using Window Authentication, otherwise false
  • DBUser (string): The database username
  • DBPassword (string): The database password
  • FieldNames (string[]): The columns to read
  • DataTypes (FieldDataTypes[]): The column data types
  • UseDates (bool): true if dates should be used, otherwise false
  • DateTimeFieldName (string): The name of the date and time column
  • StartDate (DateTime): The start date/time of the query
  • EndDate (DateTime): The end date/time of the query
  • QueryString (string): The WHERE query string
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • DataTable: The result of the data query

Example:

var oasConfig = new Config();
var result = oasConfig.GetDatabaseData(value, "example", "example", "example", true, "example", "example", new string[]{}, new FieldDataTypes[]{}, true, "example", DateTime.Now, DateTime.Now, "example");

Data Logging

AddDataLoggingField

Add a field for a given Tag to an existing Data Logging group when using the Wide table format.

See the AddDataLoggingTagAlias method for adding a field when using Narrow table formats.

Signatures:

public int AddDataLoggingField(string FieldName, string TagName, string DataType, int StringLength, string Group)
public int AddDataLoggingField(string FieldName, string TagName, string DataType, int StringLength, string Group, string NetworkNode)
public int AddDataLoggingField(string FieldName, string TagName, string DataType, int StringLength, string Group, string NetworkNode, ref string ErrorString)
public int AddDataLoggingField(string FieldName, string TagName, string DataType, int StringLength, string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • FieldName (string): The field (column) name
  • TagName (string): The name of the tag to log
  • DataType (string): The database data type of the field (column)
  • StringLength (int): The length of the data type (only applies to string types)
  • Group (string): Data logging group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.AddDataLoggingField("MyTag", "MyTag.Value", "Double", 100, "MyDataLoggingGroup");
AddDataLoggingFields

Add fields for multiple Tags to an existing Data Logging group when using the Wide table format.

The number of parameters given in each array should be the same.

See the AddDataLoggingTagAliases method for adding fields when using Narrow table formats.

Signatures:

public int AddDataLoggingFields(string[] FieldNames, string[] TagNames, string[] DataTypes, int[] StringLengths, string Group)
public int AddDataLoggingFields(string[] FieldNames, string[] TagNames, string[] DataTypes, int[] StringLengths, string Group, string NetworkNode)
public int AddDataLoggingFields(string[] FieldNames, string[] TagNames, string[] DataTypes, int[] StringLengths, string Group, string NetworkNode, ref string ErrorString)
public int AddDataLoggingFields(string[] FieldNames, string[] TagNames, string[] DataTypes, int[] StringLengths, string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • FieldNames (string[]): Field names corresponding to each TagNames
  • TagNames (string[]): Tag names
  • DataTypes (string[]): Data types
  • StringLengths (int[]): String lengths
  • Group (string): Data logging group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.AddDataLoggingFields(["MyTag", "MyOtherTag"], ["MyTag.Value", "TagGroup.MyTag.Value"], ["Double", "Boolean"], [100, 100], "MyDataLoggingGroup");
AddDataLoggingGroup

Add a new Data Logging Group with the given group name.

Signatures:

public int AddDataLoggingGroup(string Group)
public int AddDataLoggingGroup(string Group, string NetworkNode)
public int AddDataLoggingGroup(string Group, string NetworkNode, ref string ErrorString)
public int AddDataLoggingGroup(string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Group (string): Data logging group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.AddDataLoggingGroup("MyDataLoggingGroup");
AddDataLoggingTagAlias

Add a Tag to database field name (alias) for the given Data Logging configuration when using the Narrow data format.

See the AddDataLoggingField method for adding a field when using Wide table formats.

Signatures:

public int AddDataLoggingTagAlias(string TagName, string TagAlias, string Group)
public int AddDataLoggingTagAlias(string TagName, string TagAlias, string Group, string NetworkNode)
public int AddDataLoggingTagAlias(string TagName, string TagAlias, string Group, string NetworkNode, ref string ErrorString)
public int AddDataLoggingTagAlias(string TagName, string TagAlias, string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • TagName (string): The name of the tag
  • TagAlias (string): The tag alias
  • Group (string): Data logging group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.AddDataLoggingTagAlias("MyTag.Value", "MyTagFieldName", "MyDataLoggingGroup");
AddDataLoggingTagAliases

Add multiple Tag to database field names (alias) for the given Data Logging configuration when using the Narrow data format.

See the AddDataLoggingFields method for adding fields when using Wide table formats.

Signatures:

public int AddDataLoggingTagAliases(string[] TagNames, string[] TagAliases, string Group)
public int AddDataLoggingTagAliases(string[] TagNames, string[] TagAliases, string Group, string NetworkNode)
public int AddDataLoggingTagAliases(string[] TagNames, string[] TagAliases, string Group, string NetworkNode, ref string ErrorString)
public int AddDataLoggingTagAliases(string[] TagNames, string[] TagAliases, string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • TagNames (string[]): Tag names
  • TagAliases (string[]): Tag aliases
  • Group (string): Data logging group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.AddDataLoggingTagAliases(["MyTag.Value"], ["MyTagFieldName"], ["MyDataLoggingGroup"]);
DataBufferingIsActive

Determine if data buffering to disk is active due to data logging failure.

Signatures:

public bool DataBufferingIsActive(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • bool: true if data log buffering is active, otherwise false

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
var result = oasConfig.DataBufferingIsActive("localhost", ref resultMessage, "");
DataBufferingSeconds

Determine how long data buffering to disk due to data logging failure has been active for in number of seconds.

Signatures:

public int DataBufferingSeconds(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int: The number of seconds data log buffering has been active

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
var result = oasConfig.DataBufferingSeconds("localhost", ref resultMessage, "");
DataLoggingCSVExport

Export the Data Logging Group configurations to a list of CSV strings. The first row is the header row as returned by DataLoggingCSVHeaderString followed by one row for each Data Logging Group configuration. The first column is the primary key.

Signatures:

public string[] DataLoggingCSVExport()
public string[] DataLoggingCSVExport(string NetworkNode)
public string[] DataLoggingCSVExport(string NetworkNode, ref string ErrorString)
public string[] DataLoggingCSVExport(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: Returns a list of CSV strings

Example:

var oasConfig = new Config();
var result = oasConfig.DataLoggingCSVExport();
DataLoggingCSVHeaderString

Returns all of the column heading names for the Data Logging configuration CSV export.

Signatures:

public string DataLoggingCSVHeaderString()
public string DataLoggingCSVHeaderString(string NetworkNode)
public string DataLoggingCSVHeaderString(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: A list of all CSV headers for Data Logging configuration export

Example:

var oasConfig = new Config();
var result = oasConfig.DataLoggingCSVHeaderString();

// result = "Logging Group Name,Logging Type,Logging Rate,Use Tag Value For Logging Rate,Tag For Logging Rate,Snapshot Time,Logging Active,Use Tag Value To Activate Logging,Tag For Activate Logging,Tag For Event Driven Logging,Event Driven Digital Log Type,Perform OPC Device Read,Use Tag Value For Confirmation,Tag For Confirmation,Use Tag Value For Errors,Tag For Errors,Confirm With Success When Written To Buffer,Use Date And Time Field,DateTime Field Name,DateTime Field High Precision,With Time Zone,Log With Time Zone,Date Format,Time Format,Include Time Field,Time Field Name,Use MilliSecond Field,MilliSecond Field Name,Use MicroSecond Field,MicroSecond Field Name,Use NanoSecond Field,NanoSecond Field Name,Narrow Tag Field Name,Narrow Value Field Name,Narrow Value Data Type,Narrow Value Text Length,Log Boolean True As 1,Data Change Deadband,Increment Time When Multiple Tags Per Field,Disable New Time Stamp Check,Do Not Buffer When Nulls Are Not Allowed In Database,Do Not Buffer On Error,Do Not Buffer On Primary Index Failure,Write Single After Multiple Write Fail,Number Of Retries,Retry Wait Time,Reconnect Time,Single Insert Timeout,Bulk Copy Timeout,Multiple Write With TableLock,Multiple Write With FireEvents,Bulk Copy Batch Size,Number Of Records For Bulk Write,Time Stamp Offset Hours,Convert Timestamps To UTC,Convert Timestamps To Local Time,Create Primary Index For Event Logging,Keep Items On Scan When Disabled,Disable Logging Initial Values On Active,Disable Logging Null Values,Create Only One Record,Time Of Day To Log Data,Set Date And Time To Previous Day,Remove Old Data,Remove Old Data Days,Remove Old CSV Files,Remove Old CSV Files Days,Log To DB,DB Provider,InfluxDB Version,InfluxDB Bucket,InfluxDB Org,InfluxDB Url,InfluxDB Token,Url,DB Server Name,Use Tag Value For DB Server Name,Tag For For DB Server Name,MongoDB Srv,Amazon Region,Cluster,Access Key,Secret Key,Enable SSL,SSL Certificate,SSL Key,MySQL SSL Mode,MongoDB Port,Cassandra Port,PostgreSQL Port,SQL Server Port,Oracle Port,mySQL Port,MariaDB Port,InfluxDB Port,Redshift Port,InfluxDB Indexed Fields,InfluxDB Retention Time,Oracle Use TNS Names File,Oracle TNS Names Folder,Database Name,Use Tag Value For Database Name,Tag For Database Name,Table Name,Use Tag Value For Table Name,Tag For Table Name,Create And Verify Table,Update With Query String,Insert If Query Records Does Not Exist,Query String,Use Tag Value For Query String,Tag For Query String,Stored Procedure Logging,Use WinNT Authentication,DB User Name,DB Password,Trust Server Certificate,Connect Timeout,Use Get App Lock,Log To CSV,Path For CSV File Name,Use Tag Value To Change Path For CSV File Name,Tag For Path For CSV File Name,CSV File Name,Use Tag Value To Change CSV File Name,Tag For CSV File Name,Append Year To CSV File Name,Append Month To CSV File Name,Append Day To CSV File Name,Append Date To CSV File Name,Append Hour To CSV File Name,Append Minute To CSV File Name,CSV File Name Extension,Include CSV Header,Overwrite CSV File,CSV Separator Character,Last Column"
DataLoggingCSVImport

Import Data Logging configuration using CSV strings.

The first row should provide the headers you wish to update. You only have to provide the headers you want to update, but the first header must always be Logging Group Name.

Use the DataLoggingCSVHeaderString() call to get a listing of valid header names

Following the header row should be one or more rows containing data logging group configurations.

If the Logging Group Name does not match any existing data logging group name then it will be added. Any properties not provided will use default values.

If an existing data logging group name is found then the properties given by the headers will be updated. Any properties not provided will not be updated.

Signatures:

public string DataLoggingCSVImport(string[] CSVStrings)
public string DataLoggingCSVImport(string[] CSVStrings, string NetworkNode)
public string DataLoggingCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString)
public string DataLoggingCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • CSVStrings (string[]): List of CSV rows to import including header row
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: Returns number of data logging groups added and updated

Example:

List<string[]> dataLoggingGroupRows = [];

dataLoggingGroupRows.Add(["Logging Group Name", "Logging Active"]);
dataLoggingGroupRows.Add(["MyLoggingGroup", "true"]);

var dataLoggingGroupData = dataLoggingGroupRows
    .Select(row => string.Join(',', row))
    .ToArray();

var oasConfig = new Config();
var resultMessage = string.Empty;
var result = oasConfig.DataLoggingCSVImport(dataLoggingGroupData, "localhost", ref resultMessage);

// New logging group example
// -------------------------
// result = "1 Logging Groups Added 
//           0 Logging Groups Updated"
// resultMessage = "Success"

// Existing logging group example
// ------------------------------
// result = "0 Logging Groups Added 
//           1 Logging Groups Updated"
// resultMessage = "Success"

// Failure example - missing first field
// -------------------------------------
// resultMessage = "No Logging Groups were imported.  Logging Group Name column is required"

// Failure example - bad header
// ----------------------------
// resultMessage = "Errors in Rows:1
//                  0 Logging Groups Added 
//                  0 Logging Groups Updated"
GetDataLogging_Parameter_Value

Read a parameter value of a given Data Logging group.

For a list of parameters see GetDataLoggingParameterStrings

Signatures:

public Object GetDataLogging_Parameter_Value(string Parameter, string Group)
public Object GetDataLogging_Parameter_Value(string Parameter, string Group, string NetworkNode)
public Object GetDataLogging_Parameter_Value(string Parameter, string Group, string NetworkNode, ref string ErrorString)
public Object GetDataLogging_Parameter_Value(string Parameter, string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Parameter (string): The parameter name
  • Group (string): Data logging group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • Object: Data Logging group parameter value

Example:

var oasConfig = new Config();
var result = oasConfig.GetDataLogging_Parameter_Value("example", "example");
GetDataLogging_Parameter_Values

Read all parameter values of a given Data Logging group.

For a list of parameters see GetDataLoggingParameterStrings

Signatures:

public object[] GetDataLogging_Parameter_Values(string Group)
public object[] GetDataLogging_Parameter_Values(string Group, string NetworkNode)
public object[] GetDataLogging_Parameter_Values(string Group, string NetworkNode, ref string ErrorString)
public object[] GetDataLogging_Parameter_Values(string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Group (string): Data logging group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • object[]: List of Data Logging group parameter values

Example:

var oasConfig = new Config();
var result = oasConfig.GetDataLogging_Parameter_Values("MyDataLoggingGroup");
// result = [
//   "Success",
//   "MyDataLoggingGroup",
//   "",
//   "Continuous",
//   60,
//   ...
// ]
GetDataLoggingNames

Get a list of Data Logging group names.

Signatures:

public string[] GetDataLoggingNames()
public string[] GetDataLoggingNames(string NetworkNode)
public string[] GetDataLoggingNames(string NetworkNode, ref string ErrorString)
public string[] GetDataLoggingNames(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of Data Logging group names

Example:

var oasConfig = new Config();
var result = oasConfig.GetDataLoggingNames();
// result = [
//    "MyDataLoggingGroup",
//    "AnotherDataLoggingGroup"
// ]
GetDataLoggingParameterStrings

Get a list of Data Logging parameter names. These are useful when getting and setting configuration parameters.

Signatures:

public string[] GetDataLoggingParameterStrings()
public string[] GetDataLoggingParameterStrings(string NetworkNode)
public string[] GetDataLoggingParameterStrings(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of available Data Logging group parameter names

Example:

var oasConfig = new Config();
var result = oasConfig.GetDataLoggingParameterStrings();
// result = [
//   "ReturnSuccess",
//   "Name",
//   "DBFields",
//   "LoggingType",
//   ...
// ]
GetHistoryTagNames

Get a list of Field Names for the given Data Logging configuration.

Signatures:

public string[] GetHistoryTagNames(string Group)
public string[] GetHistoryTagNames(string Group, string NetworkNode)
public string[] GetHistoryTagNames(string Group, string NetworkNode, ref string ErrorString)
public string[] GetHistoryTagNames(string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Group (string): Data logging group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of field names

Example:

var oasConfig = new Config();
var result = oasConfig.GetHistoryTagNames("MyDataLoggingGroup");
// result = [
//    "MyFieldName",
//    "AnotherFieldName"
//]
GetHistoryTagNamesFromTagName

Looks up where a Tag has been used in a Data Logging configuration and returns the Data Logging group name and the field name in the format {data_logging_group_name}.{field_name}.

Note that you have to specify the exact parameter being logged. Usually this is the Value parameter and the full Tag path would be MyTag.Value.

Signatures:

public string[] GetHistoryTagNamesFromTagName(string TagName)
public string[] GetHistoryTagNamesFromTagName(string TagName, string NetworkNode)
public string[] GetHistoryTagNamesFromTagName(string TagName, string NetworkNode, ref string ErrorString)
public string[] GetHistoryTagNamesFromTagName(string TagName, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • TagName (string): The name of the tag
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: A list of data logging group and field names

Example:

var oasConfig = new Config();
var result = oasConfig.GetHistoryTagNamesFromTagName("MyTag.Value");
// result = [
//    "MyDataLoggingGroup.MyTagField"
// ]
InitialBufferTime

The timestamp of when data buffering to disk due to failure first started.

Signatures:

public DateTime InitialBufferTime(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • DateTime: The timestamp of when data logging buffering started

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
var result = oasConfig.InitialBufferTime("localhost", ref resultMessage, "");
LastBufferTime

The timestamp of when data buffering to disk due to data logging failure was last attempted.

Signatures:

public DateTime LastBufferTime(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • DateTime: The timestamp of when the last data logging was attempted

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
var result = oasConfig.LastBufferTime("localhost", ref resultMessage, "");
LoadDataLoggingConfiguration

Load the given Data Logging configuration file. The filename must end with the extension .DataLog.

Warning

This will replace the existing runtime configuration

Signatures:

public void LoadDataLoggingConfiguration(string ConfigurationFilePath)
public void LoadDataLoggingConfiguration(string ConfigurationFilePath, string NetworkNode)
public void LoadDataLoggingConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString)
public void LoadDataLoggingConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ConfigurationFilePath (string): The file system path of the configuration file
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
oasConfig.LoadDataLoggingConfiguration("C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles\\DataLoggingConfiguration.DataLog", "localhost", ref resultMessage);
// resultMessage = "Success"
RemoveDataLoggingGroup

Remove Data Logging group with the given name.

Signatures:

public int RemoveDataLoggingGroup(string Group)
public int RemoveDataLoggingGroup(string Group, string NetworkNode)
public int RemoveDataLoggingGroup(string Group, string NetworkNode, ref string ErrorString)
public int RemoveDataLoggingGroup(string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Group (string): Data logging group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if the Data Logging group does not exist or removing failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.RemoveDataLoggingGroup("MyDataLoggingGroup");
SaveDataLoggingConfiguration

Save the Data Logging configurations.

Requirements:

  • On Windows the path must start with: C:\ProgramData\OpenAutomationSoftware\ConfigFiles\
  • On Linux the path must start with: /oas/ConfigFiles/
  • The file extension must be set to: .DataLog

Signatures:

public void SaveDataLoggingConfiguration(string ConfigurationFilePath)
public void SaveDataLoggingConfiguration(string ConfigurationFilePath, string NetworkNode)
public void SaveDataLoggingConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString)
public void SaveDataLoggingConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ConfigurationFilePath (string): The file system path of the configuration file
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;

// Windows
oasConfig.SaveDataLoggingConfiguration("C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles\\DataLoggingConfiguration.DataLog", "localhost", ref resultMessage);

// Linux
oasConfig.SaveDataLoggingConfiguration("/oas/ConfigFiles/DataLoggingConfiguration.DataLog", "localhost", ref resultMessage);

// resultMessage = "Success"

// Windows incorrect file path or extension example
// ------------------------------------------------
// resultMessage = "File must be saved to C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles directory with file extension .DataLog"

// Linux incorrect file path or extension example
// ----------------------------------------------
// resultMessage = "File must be saved to /oas/ConfigFiles directory with file extension .DataLog"
SetDataLogging_Parameter_Value

Set a parameter value of a given Data Logging group.

For a list of parameters see GetDataLoggingParameterStrings

Signatures:

public int SetDataLogging_Parameter_Value(string Parameter, Object Value, string Group)
public int SetDataLogging_Parameter_Value(string Parameter, Object Value, string Group, string NetworkNode)
public int SetDataLogging_Parameter_Value(string Parameter, Object Value, string Group, string NetworkNode, ref string ErrorString)
public int SetDataLogging_Parameter_Value(string Parameter, Object Value, string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Parameter (string): The parameter name
  • Value (Object): The parameter value
  • Group (string): Data logging group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.SetDataLogging_Parameter_Value("example", value, "example");
SetDataLogging_Parameter_Values

Set multiple parameter values of a given Data Logging group.

For a list of parameters see GetDataLoggingParameterStrings

Signatures:

public int SetDataLogging_Parameter_Values(string[] Parameters, object[] Values, string Group)
public int SetDataLogging_Parameter_Values(string[] Parameters, object[] Values, string Group, string NetworkNode)
public int SetDataLogging_Parameter_Values(string[] Parameters, object[] Values, string Group, string NetworkNode, ref string ErrorString)
public int SetDataLogging_Parameter_Values(string[] Parameters, object[] Values, string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Parameters (string[]): Parameter names
  • Values (object[]): Parameter values
  • Group (string): Data logging group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.SetDataLogging_Parameter_Values(new string[]{}, new object[]{}, "example");

Drivers

DriverInterfaceCSVExport

Export the Driver Interface configurations to a list of CSV strings. The first row is the header row as returned by DriverInterfaceCSVHeaderString followed by one row for each Driver Interface configuration. The first column is the primary key.

Signatures:

public string[] DriverInterfaceCSVExport()
public string[] DriverInterfaceCSVExport(string NetworkNode)
public string[] DriverInterfaceCSVExport(string NetworkNode, ref string ErrorString)
public string[] DriverInterfaceCSVExport(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: Returns a list of CSV strings

Example:

var oasConfig = new Config();
var result = oasConfig.DriverInterfaceCSVExport();
DriverInterfaceCSVHeaderString

Returns all of the column heading names for the Driver Interface configuration CSV export.

Signatures:

public string DriverInterfaceCSVHeaderString()
public string DriverInterfaceCSVHeaderString(string NetworkNode)
public string DriverInterfaceCSVHeaderString(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: A list of all CSV headers for Driver Interface configuration export

Example:

var oasConfig = new Config();
var result = oasConfig.DriverInterfaceCSVHeaderString();

// result = "Name,Driver,Enable,Enable By Tag,Enable Tag,Good Quality When Disabled,Connection,Simulation,IP Address,Host,TCP Port Number,Serial Port Number,Serial Port Name,Serial Type,Baud Rate,Data Bits,Parity,Stop Bits,RTS Enable,Modbus Type,Modbus Slave Device Address,Modbus Ethernet Type,Enable Single Write,Enable Multiple Write,Modbus Delay Between Packets,Timeout,Number Of Retries,Number Of Bad Messages To Offline,Offline On Error,Check To Return To Online Rate,Simulate,AB Logix Processor Type,AB Classic Processor Type,Backplane,Slot,Gateway,AB Classic Driver,Transaction Timeout,Connection Timeout,AB CSP TCP Port Number,AB EIP TCP Port Number,Siemens Processor Type,Siemens Link Type,Siemens Rack,Siemens Slot,MQTT Port,SSL,UserName,Password,Keep Alive Time,Session Expiry Interval,Reconnect Time,MQTT Buffer Timeout,MQTT Max Buffer Messages,Retain Messages,Azure Type,Schema Type,Azure Event Hub Host,Azure IoT Device ID,Azure IoT Connection String,Azure IoT Hub URL,Azure Partition Key,Azure IoT Transport,Azure Tenant Id,Azure Client Id,Azure Client Secret,Azure Schema Group,Azure Schema GUID,Create Certificate,Certificate File Path,Private Key File Path,PFX Certificate File Path,PFX Certificate Password,Server Certificate File Path,Server PFX Certificate File Path,Server PFX Certificate Password,IoT End Point,MQTT Protocol Version,Client ID,AWS Broker Port,Publish SpB Group ID Filter,Publish SpB Edge Node ID Filter,Publish SpB Device ID Filter,Publish Selected Tags,Publish Payload Name,Publish Include Payload Timestamp,Publish Payload Timestamp Id,Publish Payload Timestamp Type,Publish Payload Timestamp Format,Publish Include Payload Id,Publish Payload Id Name,Publish Payload Id,Publish Values Id,Publish Tag Id,Publish Value Id,Publish Include Quality,Publish Quality Id,Publish Include Timestamp,Publish Timestamp Id,Publish Timestamp Type,Publish Timestamp Format,Publish Type,Publish Interval,Publish On Startup,Publish Trigger Tag,Publish Digital Trigger Type,Publish Time of Day,Publish Latest Value Only,Publish All Tags As One Topic,Max Tags Per Publish,Publish Topic ID,Include All Tags Each Publish,Include Tags For Period,Include Tags Time,OPCUA Server,OPCUA EndPoint,OPCUA DomainName Security Override,OPCUA Allow Invalid Certificate,OPCUA Use Security,OPCUA Disable Endpoint Validation,OPCUA Authentication Type,OPCUA Username,OPCUA Password,OPCUA PFX Certificate File Path,OPCUA PFX Certificate Password,OPCUA Watchdog Timeout,OPCUA Session Timeout,OPCUA Operation Timeout,OPCUA Publish Timeout,OPCUA Secure Channel Timeout,OPCUA Max Keep Alive Time,OPCUA Lifetime,OPCUA Max Notifications Per Publish,OPCUA Priority,OPCUA Watchdog Cycle Time,OPCUA Reconnect Delay,OPCUA Reconnect Timeout,OPCUA Default Namespace Index,SpB Mode,SpB SCADA Host Mode,SpB SCADA Host ID,SpB Version,SpB Reorder Timeout,Add Tags Automatically,SpB Filter Groups,SpB Filter Edge Nodes,SpB Filter Devices,MTConnect Enable,MTConnect Add Tags Automatically,MTConnect Live Data Url,Interval,DB Provider,DB Server Name,Use Tag Value For DB Server Name,Tag For DB Server Name,DB Enable SSL,DB SSL Certificate,DB SSL Key,MySQL SSL Mode,Cassandra Port,PostgreSQL Port,SQL Server Port,Oracle Port,mySQL Port,MariaDB Port,Oracle Use TNS Names File,Oracle TNS Names Folder,Database Name,Use Tag Value For Database Name,Tag For Database Name,Use WinNT Authentication,DB User Name,DB Password,Trust Server Certificate,DB Connect Timeout,DB Reconnect Time,DB Timeout,Allow Writes,Disable Writing Null Values,Write Latest Value Only,Single Write,Read After Write,Enable Store and Forward,Last In First Out,Kafka Bootstrap Servers,Kafka Security Protocol,Kafka SASL Mechanism,Kafka SASL Username,Kafka SASL Password,Kafka SSL CA Location,Kafka SSL CA Pem,Kafka SSL Certificate Location,Kafka SSL Certificate Pem,Kafka SSL Key Location,Kafka SSL Key Password,Kafka SSL Key Pem,Kafka SSL Keystore Location,Kafka SSL Keystore Password,Kafka Acks,Kafka Batch Num Messages,Kafka Batch Size,Kafka Client Id,Kafka Compression Type,Kafka Linger Ms,Kafka Max In Flight,Kafka Message Max Bytes,Kafka Message Timeout Ms,Kafka Queue Buffering Max Kbytes,Kafka Queue Buffering Max Messages,Kafka Request Timeout Ms,Kafka Socket Connection Setup Timeout Ms,Kafka Socket Keepalive Enable,Kafka Socket Timeout Ms,Kafka Transaction Timeout Ms,Kafka Automatically Create Topics,Kafka Replication Factor,Kafka Number Partitions,Enable Failover,Failover IP Address,Failover Host,Failover TCP Port Number,Failover Serial Port Number,Failover Serial Port Name,Failover Baud Rate,Failover Data Bits,Failover Parity,Failover Stop Bits,Failover RTS Enable,Failover Backplane,Failover Slot,Failover AB CSP TCP Port Number,Failover AB EIP TCP Port Number,Failover Siemens Rack,Failover Siemens Slot,Failover MQTT Port,Failover UserName,Failover Password,Failover Azure Event Hub Host,Failover Azure IoT Device ID,Failover Azure IoT Connection String,Failover Azure IoT Hub URL,Failover Azure Partition Key,Failover Azure IoT Transport,Failover Azure Tenant Id,Failover Azure Client Id,Failover Azure Client Secret,Failover Azure Schema Group,Failover Azure Schema GUID,Failover Create Certificate,Failover Certificate File Path,Failover Private Key File Path,Failover PFX Certificate File Path,Failover PFX Certificate Password,Failover Server Certificate File Path,Failover Server PFX Certificate File Path,Failover Server PFX Certificate Password,Failover IoT End Point,Failover AWS Broker Port,Failover OPCUA Server,Failover OPCUA EndPoint,Failover OPCUA Use Security,Failover OPCUA Authentication Type,Failover OPCUA Username,Failover OPCUA Password,Failover OPCUA PFX Certificate File Path,Failover OPCUA PFX Certificate Password,Failover MTConnect Live Data Url,Kafka Failover Bootstrap Servers,Kafka Failover Security Protocol,Kafka Failover SASL Mechanism,Kafka Failover SASL Username,Kafka Failover SASL Password,Kafka Failover SSL CA Location,Kafka Failover SSL CA Pem,Kafka Failover SSL Certificate Location,Kafka Failover SSL Certificate Pem,Kafka Failover SSL Key Location,Kafka Failover SSL Key Password,Kafka Failover SSL Key Pem,Kafka Failover SSL Keystore Location,Kafka Failover SSL Keystore Password,Machine Name,Comm Bad Count,Comm Bad Count Tag,Comm Bad Read Count,Comm Bad Read Count Tag,Comm Bad Time,Comm Bad Time Tag,Comm Bad Write Count,Comm Bad Write Count Tag,Comm Good Count,Comm Good Count Tag,Comm Good Read Count,Comm Good Read Count Tag,Comm Good Time,Comm Good Time Tag,Comm Good Write Count,Comm Good Write Count Tag,Comm Count Reset,Comm Count Reset Tag,Last Column"
DriverInterfaceCSVImport

Import Driver Interface configuration using CSV strings.

The first row should provide the headers you wish to update. You only have to provide the headers you want to update, but the first header must always be Name.

Use the DriverInterfaceCSVHeaderString() call to get a listing of valid header names

Following the header row should be one or more rows containing driver interface configurations.

If the Name does not match any existing driver interface name then it will be added. Any properties not provided will use default values.

If an existing driver interface name is found then the properties given by the headers will be updated. Any properties not provided will not be updated.

Signatures:

public string DriverInterfaceCSVImport(string[] CSVStrings)
public string DriverInterfaceCSVImport(string[] CSVStrings, string NetworkNode)
public string DriverInterfaceCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString)
public string DriverInterfaceCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • CSVStrings (string[]): List of CSV rows to import including header row
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: Returns number of driver interfaces added and updated

Example:

List<string[]> driverInterfaceRows = [];

driverInterfaceRows.Add(["Name", "Driver", "Enable"]);
driverInterfaceRows.Add(["MyModbusDriver", "Modbus", "true"]);

var driverInterfaceData = driverInterfaceRows
    .Select(row => string.Join(',', row))
    .ToArray();

var oasConfig = new Config();
var resultMessage = string.Empty;
var result = oasConfig.DriverInterfaceCSVImport(driverInterfaceData, "localhost", ref resultMessage);

// New driver interface example
// ----------------------------
// result = "1 Driver Interfaces Added 
//           0 Driver Interfaces Updated"
// resultMessage = "Success"

// Existing driver interface example
// ---------------------------------
// result = "0 Driver Interfaces Added 
//           1 Driver Interfaces Updated"
// resultMessage = "Success"

// Failure example - missing first field
// -------------------------------------
// resultMessage = "No Driver Interfaces were imported.  Name column is required"

// Failure example - bad header
// ----------------------------
// resultMessage = "Errors in Rows:1
//                  0 Driver Interfaces Added 
//                  0 Driver Interfaces Updated"
GetABPrograms

Query the Allen Bradley controller's program names for the given Driver Interface name.

Signatures:

public string[] GetABPrograms(string DriverInterface)
public string[] GetABPrograms(string DriverInterface, string NetworkNode)
public string[] GetABPrograms(string DriverInterface, string NetworkNode, ref string ErrorString)
public string[] GetABPrograms(string DriverInterface, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)
public object[] GetABPrograms(string DriverInterface, string Program, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • DriverInterface (string): Driver Interface name
  • NetworkNode (string): OAS node IP or hostname
  • Program (string): Allen Bradley program name
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • object[]: A list of program names

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;

// Example: default program
var result = oasConfig.GetABPrograms("MyMicro820");
// result = [ "Controller Tags" ]

// Example: failed connection
var result = oasConfig.GetABPrograms("MyMicro820");
// resultMessage = "or connecting to target device. Error description: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond."

GetABTags

Get a list of Tags from an Allen Bradley controller for the given Driver Interface name and program name.

Note that the return value consists of a list of string arrays each with a number of values. Typically these contain the Tag names and the data types as configured in the Allen Bradley controller.

Signatures:

public object[] GetABTags(string DriverInterface, string Program)
public object[] GetABTags(string DriverInterface, string Program, string NetworkNode)
public object[] GetABTags(string DriverInterface, string Program, string NetworkNode, ref string ErrorString)

Parameters:

  • DriverInterface (string): Driver Interface name
  • Program (string): Allen Bradley program name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result

Returns:

  • object[]: List of Tags represented as string arrays

Example:

var oasConfig = new Config();
var result = oasConfig.GetABTags("Micro820-Source", "Controller Tags", "localhost", ref resultMessage);
// result = [
//    ["_IO_EM_AI_00", "UINT", "_IO_EM_AI_00"],
//    ["_IO_EM_AI_01", "UINT", "_IO_EM_AI_01"],
//    ...
//    ["_IO_EM_DI_00", "BOOL", "_IO_EM_DI_00"],
//    ["_IO_EM_DI_01", "BOOL", "_IO_EM_DI_01"],
//    ...
//    ["TemperatureInput", "REAL", "TemperatureInput"]
// ]
GetDriverInterface_Parameter_Value

Read a parameter value of a given Driver Interface.

For a list of parameters see GetDriverInterfaceParameterStrings

Signatures:

public Object GetDriverInterface_Parameter_Value(string Parameter, string Name)
public Object GetDriverInterface_Parameter_Value(string Parameter, string Name, string NetworkNode)
public Object GetDriverInterface_Parameter_Value(string Parameter, string Name, string NetworkNode, ref string ErrorString)
public Object GetDriverInterface_Parameter_Value(string Parameter, string Name, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Parameter (string): Parameter name
  • Name (string): Driver Interface name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • Object: Driver Interface parameter value

Example:

var oasConfig = new Config();
var result = oasConfig.GetDriverInterface_Parameter_Value("example", "example");
GetDriverInterface_Parameter_Values

Read all parameter values of a given Driver Interface.

For a list of parameters see GetDriverInterfaceParameterStrings

Signatures:

public object[] GetDriverInterface_Parameter_Values(string Name)
public object[] GetDriverInterface_Parameter_Values(string Name, string NetworkNode)
public object[] GetDriverInterface_Parameter_Values(string Name, string NetworkNode, ref string ErrorString)
public object[] GetDriverInterface_Parameter_Values(string Name, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Name (string): Driver Interface name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • object[]: List of Driver Interface parameter values

Example:

var oasConfig = new Config();
var result = oasConfig.GetDriverInterface_Parameter_Values("MyDriverInterface");
// result = [
//   "MyDriverInterface",
//   "ABLogix",
//   "Ethernet",
//   "StaticReadWrite",
//   ...
// ]
GetDriverInterfaceNames

Get a list of Driver Interface names.

Signatures:

public string[] GetDriverInterfaceNames()
public string[] GetDriverInterfaceNames(string NetworkNode)
public string[] GetDriverInterfaceNames(string NetworkNode, ref string ErrorString)
public string[] GetDriverInterfaceNames(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of Driver Interface names

Example:

var oasConfig = new Config();
var result = oasConfig.GetDriverInterfaceNames();
// result = [
//    "ModbusDriver",
//    "ABDriver"
// ]
GetDriverInterfaceParameterStrings

Get a list of Driver Interface parameter names. These are useful when getting and setting configuration parameters.

Signatures:

public string[] GetDriverInterfaceParameterStrings()
public string[] GetDriverInterfaceParameterStrings(string NetworkNode)
public string[] GetDriverInterfaceParameterStrings(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of available Driver Interface parameter names

Example:

var oasConfig = new Config();
var result = oasConfig.GetDriverInterfaceParameterStrings();
// result = [
//   "Name",
//   "Driver",
//   "Connection",
//   "Simulation",
//   ...
// ]
RemoveDriverInterface

Remove Driver Interface with the given name.

Signatures:

public int RemoveDriverInterface(string Name)
public int RemoveDriverInterface(string Name, string NetworkNode)
public int RemoveDriverInterface(string Name, string NetworkNode, ref string ErrorString)
public int RemoveDriverInterface(string Name, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Name (string): Driver Interface name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if the Driver Interface does not exist or removing failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.RemoveDriverInterface("MyDriverInterface");
SetDriverInterface_Parameter_Value

Set a parameter value of a given Driver Interface.

For a list of parameters see GetDriverInterfaceParameterStrings

Signatures:

public int SetDriverInterface_Parameter_Value(string Parameter, Object Value, string Name)
public int SetDriverInterface_Parameter_Value(string Parameter, Object Value, string Name, string NetworkNode)
public int SetDriverInterface_Parameter_Value(string Parameter, Object Value, string Name, string NetworkNode, ref string ErrorString)
public int SetDriverInterface_Parameter_Value(string Parameter, Object Value, string Name, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Parameter (string): Parameter name
  • Value (Object): Parameter value
  • Name (string): Driver Interface name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.SetDriverInterface_Parameter_Value("example", value, "example");

Files and Folders

Info

For security reasons, reading files and folders is no longer supported.

GetListOfDirectories
GetListOfFiles

License

GetFullyLicensed

Returns the license status of the OAS instance.

Signatures:

public int GetFullyLicensed()
public int GetFullyLicensed(string NetworkNode)
public int GetFullyLicensed(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if OAS instance is licensed
    • 0 if OAS instance is not licensed, in demo mode or disabled
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.GetFullyLicensed();
GetLicenseString

Returns the license string for the OAS instance.

The license string details:

  • Number tags used
  • Number of tags available
  • OAS version
  • License status (with demo days remaining)
  • Products licensed
  • Connectors licensed

Signatures:

public string GetLicenseString()
public string GetLicenseString(string NetworkNode)
public string GetLicenseString(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: License string

Example:

var oasConfig = new Config();
var result = oasConfig.GetLicenseString();

// Demo example
// ------------
// result = "7 / Unlimited Tags - 21.0.0.11 - Demo 23 days remaining. Valid License for Full OAS Suite - Drivers: OPC | OPC UA | Modbus | ABLogix | ABClassic | Siemens | MQTT | Kafka | MTConnect | UDI"

// Production example
// ------------------
// result = "2 / 10 Tags - 20.0.0.146 - Valid License for Full OAS Suite - Drivers: OPC | OPC UA | Modbus | ABLogix | Siemens | UDI"
GetMaintenanceExpiration

Get the date of maintenance or demo expiration.

The date format is mm/dd/yyyy.

Signatures:

public string GetMaintenanceExpiration()
public string GetMaintenanceExpiration(string NetworkNode)
public string GetMaintenanceExpiration(string NetworkNode, ref string ErrorString)
public string GetMaintenanceExpiration(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: The expiration date

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
var result = oasConfig.GetMaintenanceExpiration("localhost", ref resultMessage);

// result = "05/24/2026"
// resultMessage = "Success"
GetNumberOfTagsAllowed

Return the number of tags allowed by the license.

A demo license will by default support 1,000,000 tags.

Signatures:

public int GetNumberOfTagsAllowed()
public int GetNumberOfTagsAllowed(string NetworkNode)
public int GetNumberOfTagsAllowed(string NetworkNode, ref string ErrorString)
public int GetNumberOfTagsAllowed(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int: The number of tags allowed

Example:

var oasConfig = new Config();
var result = oasConfig.GetNumberOfTagsAllowed();
GetNumberOfTagsUsed

Return the number of tags used in the OAS instance.

Signatures:

public int GetNumberOfTagsUsed()
public int GetNumberOfTagsUsed(string NetworkNode)
public int GetNumberOfTagsUsed(string NetworkNode, ref string ErrorString)
public int GetNumberOfTagsUsed(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int: The number of tags used

Example:

var oasConfig = new Config();
var result = oasConfig.GetNumberOfTagsUsed();

Live Data Cloud

GetLiveDataCloudNodesConnected

Returns a list of Live Data Cloud (Remote SCADA) Hosting Names connected to the OAS instance.

Signatures:

public string[] GetLiveDataCloudNodesConnected()
public string[] GetLiveDataCloudNodesConnected(string NetworkNode)
public string[] GetLiveDataCloudNodesConnected(string NetworkNode, ref string ErrorString)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result

Returns:

  • string[]: List of Live Data Cloud hosting names

Example:

var oasConfig = new Config();
var result = oasConfig.GetLiveDataCloudNodesConnected();

// result = [
//  "OAS"
// ]
LoadRemoteSCADAHostingConfiguration

Load the given Remote SCADA Hosting (Live Data Cloud) configuration file. The filename must end with the extension .RemoteSCADAHosting.

Warning

This will replace the existing runtime configuration

Signatures:

public void LoadRemoteSCADAHostingConfiguration(string ConfigurationFilePath)
public void LoadRemoteSCADAHostingConfiguration(string ConfigurationFilePath, string NetworkNode)
public void LoadRemoteSCADAHostingConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString)
public void LoadRemoteSCADAHostingConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ConfigurationFilePath (string): The file system path of the configuration file
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
oasConfig.LoadRemoteSCADAHostingConfiguration("C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles\\LDCConfiguration.RemoteSCADAHosting", "localhost", ref resultMessage);
// resultMessage = "Success"
RemoteSCADAHostingCSVExport

Export the Remote SCADA Hosting (Live Data Cloud) configurations to a list of CSV strings. The first row is the header row as returned by RemoteSCADAHostingCSVHeaderString followed by one row for each Remote SCADA Hosting configuration. The first column is the primary key.

Signatures:

public string[] RemoteSCADAHostingCSVExport()
public string[] RemoteSCADAHostingCSVExport(string NetworkNode)
public string[] RemoteSCADAHostingCSVExport(string NetworkNode, ref string ErrorString)
public string[] RemoteSCADAHostingCSVExport(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: Returns a list of CSV strings

Example:

var oasConfig = new Config();
var result = oasConfig.RemoteSCADAHostingCSVExport();
RemoteSCADAHostingCSVHeaderString

Returns all of the column heading names for the Remote SCADA Hosting (Live Data Cloud) configuration CSV export.

Signatures:

public string RemoteSCADAHostingCSVHeaderString()
public string RemoteSCADAHostingCSVHeaderString(string NetworkNode)
public string RemoteSCADAHostingCSVHeaderString(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: A list of all CSV headers for Remote SCADA Hosting (Live Data Cloud) configuration export

Example:

var oasConfig = new Config();
var result = oasConfig.RemoteSCADAHostingCSVHeaderString();

// result = "Server Node Name,Remote SCADA Hosting Name,Enable Hosting,Last Column"
RemoteSCADAHostingCSVImport

Import Remote SCADA Hosting (Live Data Cloud) configuration using CSV strings.

The first row should provide the headers you wish to update. You only have to provide the headers you want to update, but the first header must always be Server Node Name.

Use the RemoteSCADAHostingCSVHeaderString() call to get a listing of valid header names

Following the header row should be one or more rows containing remote SCADA hosting configurations.

If the Server Node Name does not match any existing remote SCADA hosting name then it will be added. Any properties not provided will use default values.

If an existing remote SCADA hosting name is found then the properties given by the headers will be updated. Any properties not provided will not be updated.

Signatures:

public string RemoteSCADAHostingCSVImport(string[] CSVStrings)
public string RemoteSCADAHostingCSVImport(string[] CSVStrings, string NetworkNode)
public string RemoteSCADAHostingCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString)
public string RemoteSCADAHostingCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • CSVStrings (string[]): List of CSV rows to import including header row
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: Returns number of remote SCADA hosting configurations added and updated

Example:

List<string[]> remoteHostingRows = [];

remoteHostingRows.Add(["Server Node Name", "Remote SCADA Hosting Name"]);
remoteHostingRows.Add(["MyLDCNode", "OAS"]);

var remoteHostingData = remoteHostingRows
    .Select(row => string.Join(',', row))
    .ToArray();

var oasConfig = new Config();
var resultMessage = string.Empty;
var result = oasConfig.RemoteSCADAHostingCSVImport(remoteHostingData, "localhost", ref resultMessage);


// New remote SCADA hosting example
// --------------------------------
// result = "1 Remote SCADA Host Servers Added 
//           0 Remote SCADA Host Servers Updated"
// resultMessage = "Success"

// Existing remote SCADA hosting example
// -------------------------------------
// result = "0 Remote SCADA Host Servers Added 
//           1 Remote SCADA Host Servers Updated"
// resultMessage = "Success"

// Failure example - missing first field
// -------------------------------------
// resultMessage = "No Remote SCADA Host Servers were imported.  Server Node Name column is required"

// Failure example - bad header
// ----------------------------
// resultMessage = "Errors in Rows:1
//                  0 Remote SCADA Host Servers Added 
//                  0 Remote SCADA Host Servers Updated"
SaveRemoteSCADAHostingConfiguration

Save the Remote SCADA Hosting (Live Data Cloud) configurations.

Requirements:

  • On Windows the path must start with: C:\ProgramData\OpenAutomationSoftware\ConfigFiles\
  • On Linux the path must start with: /oas/ConfigFiles/
  • The file extension must be set to: .RemoteSCADAHosting

Signatures:

public void SaveRemoteSCADAHostingConfiguration(string ConfigurationFilePath)
public void SaveRemoteSCADAHostingConfiguration(string ConfigurationFilePath, string NetworkNode)
public void SaveRemoteSCADAHostingConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString)
public void SaveRemoteSCADAHostingConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ConfigurationFilePath (string): The file system path of the configuration file
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;

// Windows
oasConfig.SaveRemoteSCADAHostingConfiguration("C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles\\RemoteSCADAConfig.RemoteSCADAHosting", "localhost", ref resultMessage);

// Linux
oasConfig.SaveRemoteSCADAHostingConfiguration("/oas/ConfigFiles/RemoteSCADAConfig.RemoteSCADAHosting", "localhost", ref resultMessage);

// resultMessage = "Success"

// Windows incorrect file path or extension example
// ------------------------------------------------
// resultMessage = "File must be saved to C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles directory with file extension .RemoteSCADAHosting"

// Linux incorrect file path or extension example
// ----------------------------------------------
// resultMessage = "File must be saved to /oas/ConfigFiles directory with file extension .RemoteSCADAHosting"

OPC Browsing

GetListOfOPCServers

Get a list of OPC servers local to the OAS instance being queried (default is localhost).

Signatures:

public string[] GetListOfOPCServers()
public string[] GetListOfOPCServers(string NetworkNode)
public string[] GetListOfOPCServers(string NetworkNode, ref string ErrorString)
public string[] GetListOfOPCServers(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of OPC server names

Example:

var oasConfig = new Config();
var result = oasConfig.GetListOfOPCServers();
// result = [
//    "EEI.OPCSimulator",
//    "OPCSystems.NET",
//    "Rockwell.IXLCIP.Gateway.OPC.DA30.2",
//    "RSLinx OPC Server",
//    "RSLinx Remote OPC Server"
// ]
GetOPCBranches

Get a list of branches in a given OPC server at the given ReferencePath level. Each branch name is returned as a full path.

To get all root branches pass an empty string as the ReferencePath.

Signatures:

public string[] GetOPCBranches(string OPCServer, string ReferencePath)
public string[] GetOPCBranches(string OPCServer, string ReferencePath, string NetworkNode)
public string[] GetOPCBranches(string OPCServer, string ReferencePath, string NetworkNode, ref string ErrorString)
public string[] GetOPCBranches(string OPCServer, string ReferencePath, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • OPCServer (string): The OPC server name
  • ReferencePath (string): The OPC branch path (use empty string for root)
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of branches

Example:

var oasConfig = new Config();
var result = oasConfig.GetOPCBranches("OPCSystems.NET", "");
// result = [ 
//    "Local", 
//    "Network" 
// ]

var result = oasConfig.GetOPCBranches("OPCSystems.NET", "Local");
// result = [ 
//    "Local.DirectOPC:", 
//    "Local.MyTagGroup" 
// ]
GetOPCBranchesWithDisplayNames

Get a list of branches in a given OPC server at the given ReferencePath level. This returns both the name only and the full path of each branch as separate elements of the resulting array (see example).

To get all root branches pass an empty string as the ReferencePath.

Signatures:

public string[] GetOPCBranchesWithDisplayNames(string OPCServer, string ReferencePath)
public string[] GetOPCBranchesWithDisplayNames(string OPCServer, string ReferencePath, string NetworkNode)
public string[] GetOPCBranchesWithDisplayNames(string OPCServer, string ReferencePath, string NetworkNode, ref string ErrorString)
public string[] GetOPCBranchesWithDisplayNames(string OPCServer, string ReferencePath, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • OPCServer (string): The OPC server name
  • ReferencePath (string): The OPC branch path (use empty string for root)
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: Returns pairs of branch name and branch path

Example:

var oasConfig = new Config();
var result = oasConfig.GetOPCBranchesWithDisplayNames("OPCSystems.NET", "Local");
// result = [
//    "DirectOPC:",
//    "Local.DirectOPC:",
//    "TestGroup",
//    "Local.TestGroup"
// ]

GetOPCItemProperties

Get the properties of an OPC item.

The return array always returns 6 elements, but each element will only be queried if the corresponding parameter is set to true.

Signatures:

public object[] GetOPCItemProperties(string OPCItem, bool ReturnDataType, bool ReturnScanRate, bool ReturnDescription, bool ReturnUnits, bool ReturnEnumeratedValue)
public object[] GetOPCItemProperties(string OPCItem, bool ReturnDataType, bool ReturnScanRate, bool ReturnDescription, bool ReturnUnits, bool ReturnEnumeratedValue, string NetworkNode)
public object[] GetOPCItemProperties(string OPCItem, bool ReturnDataType, bool ReturnScanRate, bool ReturnDescription, bool ReturnUnits, bool ReturnEnumeratedValue, string NetworkNode, ref string ErrorString)
public object[] GetOPCItemProperties(string OPCItem, bool ReturnDataType, bool ReturnScanRate, bool ReturnDescription, bool ReturnUnits, bool ReturnEnumeratedValue, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • OPCItem (string): OPC Item name
  • ReturnDataType (bool): Set true to return data type
  • ReturnScanRate (bool): Set true to return scan rate
  • ReturnDescription (bool): Set true to return description
  • ReturnUnits (bool): Set true to return units
  • ReturnEnumeratedValue (bool): Set true to return enumerated value
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • object[]:

    • 0: Data Type
    • 1: Scan Rate (ms)
    • 2: Description
    • 3: Units
    • 4: Enumerated value
    • 5: Enumerated string
    Data Types
    ----------
    0 = Double Float
    1 = Single Float
    2 = Signed Byte
    3 = Unsigned Byte
    4 = Short Integer
    5 = Unsigned Short Integer
    6 = Integer
    7 = Unsigned Integer
    8 = Long Integer
    9 = Unsigned Long Integer
    10 = Boolean
    11 = String
    12 = Array Double
    13 = Array Integer
    14 = Array String
    15 = Array Single
    16 = Array Byte
    17 = Array Bool
    18 = Object Type
    

Example:

var oasConfig = new Config();
var result = oasConfig.GetOPCItemProperties("OPCSystems.NET\\Local.MyTag.Value", true, true, true, true, true);
// result = [ 0, 10, null, null, null, null ]
GetOPCItems

Returns a list of OPC Items (Tags) in the given parent path and OPC Server name. This method does not recursively query child reference paths.

Each Tag results in two rows in the returned array. It returns the item name and then the full OPC path.

Signatures:

public string[] GetOPCItems(string OPCServer, string ReferencePath)
public string[] GetOPCItems(string OPCServer, string ReferencePath, string NetworkNode)
public string[] GetOPCItems(string OPCServer, string ReferencePath, string NetworkNode, ref string ErrorString)
public string[] GetOPCItems(string OPCServer, string ReferencePath, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • OPCServer (string): The OPC server name
  • ReferencePath (string): The OPC branch path (use empty string for root)
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: A list of OPC items where each item consists of two rows

Example:

var oasConfig = new Config();
var result = oasConfig.GetOPCItems("OPCSystems.NET", "Local");
// result = [
//   "MyTag.Value",
//   "OPCSystems.NET\Local.MyTag.Value",
//   "AnotherTag.Value",
//   "OPCSystems.NET\Local.AnotherTag.Value"
// ]
GetOPCItemsAll
OPCUABrowse

Browse an OPC UA server.

For this method you will need to provide all of the relevant parameters for the server that you are connecting to.

Signatures:

public object[] OPCUABrowse(string ServerURL, string SecurityProfile, string NodeID, bool GetOnlyVariables, bool GetAllNodes, bool UseSecurity, bool UseUserSecurity, string UserName, string Password, string DomainNameOverride, bool AllowInvalidCertificate)
public object[] OPCUABrowse(string ServerURL, string SecurityProfile, string NodeID, bool GetOnlyVariables, bool GetAllNodes, bool UseSecurity, bool UseUserSecurity, string UserName, string Password, string DomainNameOverride, bool AllowInvalidCertificate, string NetworkNode)
public object[] OPCUABrowse(string ServerURL, string SecurityProfile, string NodeID, bool GetOnlyVariables, bool GetAllNodes, bool UseSecurity, bool UseUserSecurity, string UserName, string Password, string DomainNameOverride, bool AllowInvalidCertificate, string NetworkNode, ref string ErrorString)
public object[] OPCUABrowse(string ServerURL, string SecurityProfile, string NodeID, bool GetOnlyVariables, bool GetAllNodes, bool UseSecurity, bool UseUserSecurity, string UserName, string Password, string DomainNameOverride, bool AllowInvalidCertificate, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ServerURL (string): The OPC UA server URL
  • SecurityProfile (string): The OPC UA server security profile
  • NodeID (string): The Node ID to browse
  • GetOnlyVariables (bool): Set true if you only want to return variable names (first array in response will be null values)
  • GetAllNodes (bool): Set true if you want to get all node details (second array in the response will be set)
  • UseSecurity (bool): Set true if you require authentication
  • UseUserSecurity (bool): Set true if you are using username/password authentication
  • UserName (string): Set the username
  • Password (string): Set the password
  • DomainNameOverride (string): Override the domain name
  • AllowInvalidCertificate (bool): Set true to skip certificate validation
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • object[]:
    • 0: object[]:
      • 0: string[]: Folder names
      • 1: string[]: Folder Node IDs
    • 1: object[]:
      • 0: string[]: Variable names
      • 1: string[]: Variable Node IDs
      • 2: string[]: Variable namespaces
      • 3: string[]: Variable descriptions
      • 4: string[]: Variable data types
      • 5: string[]: Variable ID types

Example:

var oasConfig = new Config();

// Example: get all folder names and variables names from the "Local" node ID without security
var result = oasConfig.OPCUABrowse("opc.tcp://localhost:58728", "opc.tcp://MyMachineName:58728/ [None:None:Binary]", "ns=2;s=Local", false, true, false, false, "", "", "", true);

// Example: get only folder details (first array)
var result = oasConfig.OPCUABrowse("opc.tcp://localhost:58728", "opc.tcp://MyMachineName:58728/ [None:None:Binary]", "ns=2;s=Local", true, false, false, false, "", "", "", true);

// Example: get only variable details (second array)
var result = oasConfig.OPCUABrowse("opc.tcp://localhost:58728", "opc.tcp://MyMachineName:58728/ [None:None:Binary]", "ns=2;s=Local", true, true, false, false, "", "", "", true);

Options

GetOption

Reads an Option parameter based on parameter name.

Signatures:

public Object GetOption(string OptionName)
public Object GetOption(string OptionName, string NetworkNode)
public Object GetOption(string OptionName, string NetworkNode, ref string ErrorString)
public Object GetOption(string OptionName, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • OptionName (string): Name of the Option to get
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • Object: Returns the value of the given Option parameter

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;

// Success example
var result = oasConfig.GetOption("LoadDefaultTagConfiguration", "localhost", ref resultMessage);
// result = true
// resultMessage = "Success"

// Invalid parameter example
var result = oasConfig.GetOption("InvalidParameter", "localhost", ref resultMessage);
// result = null
// resultMessage = "Option InvalidParameter was not found in the service."
GetOptions

Returns all options either as an array of parameters or as a CSV string.

When ReturnValueAsCSVStrings is passed as false the return value will contain an array where the first value is a string array containing all of the Option property names and the second value is an object array containing all of the property values.

When ReturnValueAsCSVStrings is passed as true the return value will be an array with two comma delimited string values. The first string value represents all of the Option property names and the second value contains all of the property values.

Signatures:

public object[] GetOptions(bool ReturnValuesAsCSVStrings)
public object[] GetOptions(bool ReturnValuesAsCSVStrings, string NetworkNode)
public object[] GetOptions(bool ReturnValuesAsCSVStrings, string NetworkNode, ref string ErrorString)
public object[] GetOptions(bool ReturnValuesAsCSVStrings, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ReturnValuesAsCSVStrings (bool): Select return format: false means arrays, true means comma delimited strings
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • object[]: Returns an array of property names and values either in array or string format depending on the ReturnValueAsCSVString parameter

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;

// Example with ReturnValuesAsCSVStrings=false
var result = oasConfig.GetOptions(false);
// result = [
//  [LoadDefaultTagConfiguration, TagConfigurationFilePath, LoadDefaultDBConfiguration, ...],
//  [true, "C:\ProgramData\OpenAutomationSoftware\ConfigFiles\MyTagConfig.Tags", true, ...]
//]
// resultMessage = "Success"

// Example with ReturnValuesAsCSVStrings=true
var result = oasConfig.GetOptions(true);
// result = [
//  "LoadDefaultTagConfiguration, TagConfigurationFilePath, LoadDefaultDBConfiguration, ...",
//  "1, C:\ProgramData\OpenAutomationSoftware\ConfigFiles\MyTagConfig.Tags, 1, ..."
//]
// resultMessage = "Success"
LoadOptions

Loads options from the OAS Options file OAS.Options.

This file is stored in the following locations:

  • Windows: C:\ProgramData\OpenAutomationSoftware\ConfigFiles\
  • Linux: /oas/ConfigFiles/

You can use this call to force reloading of the OAS.Options file without having to restart the OAS Engine.

Signatures:

public void LoadOptions()
public void LoadOptions(string NetworkNode)
public void LoadOptions(string NetworkNode, ref string ErrorString)
public void LoadOptions(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
oasConfig.LoadOptions();
OptionsCSVImport

Import Options using CSV strings.

The first row should provide the headers you wish to update. You only have to provide the headers you want to update.

Use the GetOptions(true) call to get a listing of valid CSV header names

Following the header row should be one row containing the values for the corresponding option name in the first row.

Info

This API call requires valid credentials and cannot be used with the Default user account. To update options using CSV the Set Options permission must be given to the user.

See Authentication for more details on how to Log In.

Signatures:

public string OptionsCSVImport(string[] CSVStrings)
public string OptionsCSVImport(string[] CSVStrings, string NetworkNode)
public string OptionsCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString)
public string OptionsCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • CSVStrings (string[]): List of CSV rows to import including header row
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: Success on success, error message on failure

Example:

List<string[]> optionsRows = [];

optionsRows.Add(["Load Default Tag", "OPC UA Server Port Number"]);
optionsRows.Add(["true", "58728"]);

var optionsData = optionsRows
    .Select(row => string.Join(',', row))
    .ToArray();

var oasConfig = new Config();
oasConfig.LogIn("<username>", "<password>");
var resultMessage = string.Empty;
var result = oasConfig.OptionsCSVImport(optionsData, "localhost", ref resultMessage);

// Success example
// ---------------
// result = "Success"
// resultMessage = "Success"

// Failure example - bad header
// ----------------------------
// result = "CSV file did not contain any matching option names.
//           Use CSV Export to review correct header fields."
// resultMessage = "CSV file did not contain any matching option names.
//                  Use CSV Export to review correct header fields."

// Failure example - missing username
// ----------------------------------
// resultMessage = "Invalid Security Access for Setting Options
//
//					User name is blank."

// Failure example - incorrect username or password
// ------------------------------------------------
// resultMessage = "Network Error"
SetOption

Set an OAS Option parameter.

To get a list of all available parameter names and values use the GetOptions(false) call to get an array and GetOptions(true) to get a CSV string.

You can set multiple options using SetOptions.

Info

This API call requires valid credentials and cannot be used with the Default user account. To update options using CSV the Set Options permission must be given to the user.

See Authentication for more details on how to Log In.

Signatures:

public string SetOption(string OptionName, Object OptionValue)
public string SetOption(string OptionName, Object OptionValue, string NetworkNode)
public string SetOption(string OptionName, Object OptionValue, string NetworkNode, ref string ErrorString)
public string SetOption(string OptionName, Object OptionValue, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • OptionName (string): Name of the Option to set
  • OptionValue (Object): The Option value to set
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: Result of the operation

Example:

var oasConfig = new Config();
var result = oasConfig.SetOption("LoadDefaultTagConfiguration", true);

// Success example
// ---------------
// result = "Success"

// Failure example - bad type
// --------------------------
// result = "Parameter: LoadDefaultTagConfiguration Exception: Conversion from string "test" to type 'Boolean' is not valid."

// Failure example - missing username
// ----------------------------------
// result = "Invalid Security Access for Setting Options
//
//					User name is blank."

// Failure example - incorrect username or password
// ------------------------------------------------
// result = "null"
SetOptions

Set multiple OAS Option parameters

To get a list of all available parameter names and values use the GetOptions(false) call to get an array and GetOptions(true) to get a CSV string.

You can set a single option using SetOption.

Info

This API call requires valid credentials and cannot be used with the Default user account. To update options using CSV the Set Options permission must be given to the user.

See Authentication for more details on how to Log In.

Signatures:

public string SetOptions(string[] OptionNames, object[] OptionValues)
public string SetOptions(string[] OptionNames, object[] OptionValues, string NetworkNode)
public string SetOptions(string[] OptionNames, object[] OptionValues, string NetworkNode, ref string ErrorString)
public string SetOptions(string[] OptionNames, object[] OptionValues, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • OptionNames (string[]): List of Option names to set
  • OptionValues (object[]): List of Option values to set
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: Result of the operation

Example:

var oasConfig = new Config();
var result = oasConfig.SetOptions(["LoadDefaultTagConfiguration", "LoadDefaultDataLoggingConfiguration"], [true, true]);

// Success example
// ---------------
// result = "Success"

// Failure example - bad type
// --------------------------
// result = "Parameter: LoadDefaultTagConfiguration Exception: Conversion from string "test" to type 'Boolean' is not valid."

// Failure example - missing username
// ----------------------------------
// result = "Invalid Security Access for Setting Options
//
//					User name is blank."

// Failure example - incorrect username or password
// ------------------------------------------------
// result = "null"

Recipe

AddRecipeGroup

Add a new Recipe with the given recipe group name.

Signatures:

public int AddRecipeGroup(string Group)
public int AddRecipeGroup(string Group, string NetworkNode)
public int AddRecipeGroup(string Group, string NetworkNode, ref string ErrorString)
public int AddRecipeGroup(string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Group (string): Recipe group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.AddRecipeGroup("MyRecipeGroup");
GetRecipe_Parameter_Value

Read a parameter value of a given Recipe group.

For a list of parameters see GetRecipeParameterStrings

Signatures:

public Object GetRecipe_Parameter_Value(string Parameter, string Group)
public Object GetRecipe_Parameter_Value(string Parameter, string Group, string NetworkNode)
public Object GetRecipe_Parameter_Value(string Parameter, string Group, string NetworkNode, ref string ErrorString)
public Object GetRecipe_Parameter_Value(string Parameter, string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Parameter (string): The parameter name
  • Group (string): Recipe group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • Object: Recipe group parameter value

Example:

var oasConfig = new Config();
var result = oasConfig.GetRecipe_Parameter_Value("example", "example");
GetRecipe_Parameter_Values

Read all parameter values of a given Recipe group.

For a list of parameters see GetRecipeParameterStrings

Signatures:

public object[] GetRecipe_Parameter_Values(string Group)
public object[] GetRecipe_Parameter_Values(string Group, string NetworkNode)
public object[] GetRecipe_Parameter_Values(string Group, string NetworkNode, ref string ErrorString)
public object[] GetRecipe_Parameter_Values(string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Group (string): Recipe group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • object[]: List of Recipe group parameter values

Example:

var oasConfig = new Config();
var result = oasConfig.GetRecipe_Parameter_Values("example");
GetRecipeNames

Get a list of Recipe group names.

Signatures:

public string[] GetRecipeNames()
public string[] GetRecipeNames(string NetworkNode)
public string[] GetRecipeNames(string NetworkNode, ref string ErrorString)
public string[] GetRecipeNames(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of Recipe group names

Example:

var oasConfig = new Config();
var result = oasConfig.GetRecipeNames();
// result = [
//    "MyRecipeGroup",
//    "AnotherRecipeGroup"
// ]
GetRecipeParameterStrings

Get a list of Recipe parameter names. These are useful when getting and setting configuration parameters.

Signatures:

public string[] GetRecipeParameterStrings()
public string[] GetRecipeParameterStrings(string NetworkNode)
public string[] GetRecipeParameterStrings(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of Recipe parameter names

Example:

var oasConfig = new Config();
var result = oasConfig.GetRecipeParameterStrings();
// result = [
//   "ReturnSuccess",
//   "Name",
//   "DBFields",
//   "RecipeType",
//   ...
// ]
LoadRecipeConfiguration

Load the given Recipe configuration file. The filename must end with the extension .Recipes.

Warning

This will replace the existing runtime configuration

Signatures:

public void LoadRecipeConfiguration(string ConfigurationFilePath)
public void LoadRecipeConfiguration(string ConfigurationFilePath, string NetworkNode)
public void LoadRecipeConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString)
public void LoadRecipeConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ConfigurationFilePath (string): The file system path of the configuration file
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
oasConfig.LoadRecipeConfiguration("C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles\\RecipeConfiguration.Recipes", "localhost", ref resultMessage);
// resultMessage = "Success"
RecipeCSVExport

Export the Recipe configurations to a list of CSV strings. The first row is the header row as returned by RecipeCSVHeaderString followed by one row for each Recipe configuration. The first column is the primary key.

Signatures:

public string[] RecipeCSVExport()
public string[] RecipeCSVExport(string NetworkNode)
public string[] RecipeCSVExport(string NetworkNode, ref string ErrorString)
public string[] RecipeCSVExport(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: Returns a list of CSV strings

Example:

var oasConfig = new Config();
var result = oasConfig.RecipeCSVExport();
RecipeCSVHeaderString

Returns all of the column heading names for the Recipe configuration CSV export.

Signatures:

public string RecipeCSVHeaderString()
public string RecipeCSVHeaderString(string NetworkNode)
public string RecipeCSVHeaderString(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: A list of all CSV headers for Recipe configuration export

Example:

var oasConfig = new Config();
var result = oasConfig.RecipeCSVHeaderString();

// result = "Recipe Name,Recipe Active,Use Tag Value To Activate Recipe,Tag For Activate Recipe,Recipe Type,Tag For Execute,Execution Type,Execution Rate,Time Of Day To Execute,Use Tag Value For Confirmation,Tag For Confirmation,Use Tag Value For Errors,Tag For Errors,Timeout,Deadband,Write Always With No Check,Skip Null DB Values,Keep DB Connection Open,Use Stored Procedure,Tag Name Field,Tag Value Field,DB Provider,DB Server Name,Use Tag Value For DB Server Name,Tag For For DB Server Name,Url,MongoDB Srv,Amazon Region,Cluster,Access Key,Secret Key,Enable SSL,SSL Certificate,SSL Key,MySQL SSL Mode,MongoDB Port,Cassandra Port,PostgreSQL Port,SQL Server Port,Oracle Port,mySQL Port,MariaDB Port,InfluxDB Port,Redshift Port,Oracle Use TNS Names File,Oracle TNS Names Folder,Database Name,Use Tag Value For Database Name,Tag For Database Name,Table Name,Use Tag Value For Table Name,Tag For Table Name,Use WinNT Authentication,DB User Name,DB Password,Trust Server Certificate,Connect Timeout,Command Timeout,Query String,Use Tag Value For Query String,Tag For Query String,Allow Delete Without Order By,OEM Code,Last Column"
RecipeCSVImport

Import Recipe configuration using CSV strings.

The first row should provide the headers you wish to update. You only have to provide the headers you want to update, but the first header must always be Recipe Name.

Use the RecipeCSVHeaderString() call to get a listing of valid header names

Following the header row should be one or more rows containing recipe configurations.

If the Recipe Name does not match any existing recipe name then it will be added. Any properties not provided will use default values.

If an existing recipe name is found then the properties given by the headers will be updated. Any properties not provided will not be updated.

Signatures:

public string RecipeCSVImport(string[] CSVStrings)
public string RecipeCSVImport(string[] CSVStrings, string NetworkNode)
public string RecipeCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString)
public string RecipeCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • CSVStrings (string[]): List of CSV rows to import including header row
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: Returns number of recipe configurations added and updated

Example:

List<string[]> recipeRows = [];

recipeRows.Add(["Recipe Name", "Recipe Active"]);
recipeRows.Add(["MyRecipe", "true"]);

var recipeData = recipeRows
    .Select(row => string.Join(',', row))
    .ToArray();

var oasConfig = new Config();
var resultMessage = string.Empty;
var result = oasConfig.RecipeCSVImport(recipeData, "localhost", ref resultMessage);

// New recipe example
// ------------------
// result = "1 Recipes Added 
//           0 Recipes Updated"
// resultMessage = "Success"

// Existing recipe example
// -----------------------
// result = "0 Recipes Added 
//           1 Recipes Updated"
// resultMessage = "Success"

// Failure example - missing first field
// -------------------------------------
// resultMessage = "No Recipes were imported.  Recipe Name column is required"

// Failure example - bad header
// ----------------------------
// resultMessage = "Errors in Rows:1
//                  0 Recipes Added 
//                  0 Recipes Updated"
RemoveRecipeGroup

Remove Recipe group with the given name.

Signatures:

public int RemoveRecipeGroup(string Group)
public int RemoveRecipeGroup(string Group, string NetworkNode)
public int RemoveRecipeGroup(string Group, string NetworkNode, ref string ErrorString)
public int RemoveRecipeGroup(string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Group (string): Recipe group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if the Recipe group does not exist or removing failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.RemoveRecipeGroup("MyRecipe");
SaveRecipeConfiguration

Save the Recipe configurations.

Requirements:

  • On Windows the path must start with: C:\ProgramData\OpenAutomationSoftware\ConfigFiles\
  • On Linux the path must start with: /oas/ConfigFiles/
  • The file extension must be set to: .Recipes

Signatures:

public void SaveRecipeConfiguration(string ConfigurationFilePath)
public void SaveRecipeConfiguration(string ConfigurationFilePath, string NetworkNode)
public void SaveRecipeConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString)
public void SaveRecipeConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ConfigurationFilePath (string): The file system path of the configuration file
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;

// Windows
oasConfig.SaveRecipeConfiguration("C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles\\RecipeConfig.Recipes", "localhost", ref resultMessage);

// Linux
oasConfig.SaveRecipeConfiguration("/oas/ConfigFiles/RecipeConfig.Recipes", "localhost", ref resultMessage);

// resultMessage = "Success"

// Windows incorrect file path or extension example
// ------------------------------------------------
// resultMessage = "File must be saved to C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles directory with file extension .Recipes"

// Linux incorrect file path or extension example
// ----------------------------------------------
// resultMessage = "File must be saved to /oas/ConfigFiles directory with file extension .Recipes"
SetRecipe_Parameter_Value

Set a parameter value of a given Recipe group.

For a list of parameters see GetRecipeParameterStrings

Signatures:

public int SetRecipe_Parameter_Value(string Parameter, Object Value, string Group)
public int SetRecipe_Parameter_Value(string Parameter, Object Value, string Group, string NetworkNode)
public int SetRecipe_Parameter_Value(string Parameter, Object Value, string Group, string NetworkNode, ref string ErrorString)
public int SetRecipe_Parameter_Value(string Parameter, Object Value, string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Parameter (string): The parameter name
  • Value (Object): The parameter value
  • Group (string): Recipe group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.SetRecipe_Parameter_Value("example", value, "example");
SetRecipe_Parameter_Values

Set multiple parameter values of a given Recipe group.

For a list of parameters see GetRecipeParameterStrings

Signatures:

public int SetRecipe_Parameter_Values(string[] Parameters, object[] Values, string Group)
public int SetRecipe_Parameter_Values(string[] Parameters, object[] Values, string Group, string NetworkNode)
public int SetRecipe_Parameter_Values(string[] Parameters, object[] Values, string Group, string NetworkNode, ref string ErrorString)
public int SetRecipe_Parameter_Values(string[] Parameters, object[] Values, string Group, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Parameters (string[]): Parameter names
  • Values (object[]): Parameter values
  • Group (string): Recipe group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.SetRecipe_Parameter_Values(new string[]{}, new object[]{}, "example");

Report

Info

Report configuration is no longer available in the Dotnet SDK.

AddReportGroup
GetReport_Parameter_Value
GetReport_Parameter_Values

Returns an array of all configured report parameters for a given report group name.

The first value in the array returns a status string.

The remaining values will match the parameters names provided by CSV header string output by the ReportCSVHeaderString method.

Signatures:

public object[] GetReport_Parameter_Values(string Group)
public object[] GetReport_Parameter_Values(string Group, string NetworkNode)
public object[] GetReport_Parameter_Values(string Group, string NetworkNode, ref string ErrorString)

Parameters:

  • Group (string): Report group name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result

Returns:

  • object[]: Report group parameter values

Example:

var oasConfig = new Config();
var result = oasConfig.GetReport_Parameter_Values("MyReportGroup");

// result = [
//  "Success",
//  "MyReportGroup",
//  "",
//  "",
//  11,
//  ...
// ]
RemoveReportGroup
ReportCSVHeaderString

Returns all of the column heading names for the Report configuration CSV export.

Signatures:

public string ReportCSVHeaderString()
public string ReportCSVHeaderString(string NetworkNode)
public string ReportCSVHeaderString(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: A list of all CSV headers for Report configuration export

Example:

var oasConfig = new Config();
var result = oasConfig.ReportCSVHeaderString();

// result = "Report Name,XML File,XML Report,Output Type,Image Type,Excel Type,Output Path,Use Tag Value For Output Path,Tag For Output Path,Append Date To File Name,Append Hour To File Name,Append Minute To File Name,Printer Name To Use,Printer Use Custom Size,Printer Custom Height,Printer Custom Width,Execution Type,Execution Rate,Offset Time,Time Of Day,Day Of Week,Day Of Month,Tag For Execution,Filter Type,Filter Field,Filter Char,Custom Time,Query String,Use Tag Value For Query String,Tag For Query String,Override Entire DataSource With QueryString,Use Tag Value For Confirmation,Tag For Confirmation,Use Tag Value For Errors,Tag For Errors,Email Enable,Alternate Mail Connection,Email Without Generating Report,Email From,Email To,Use Tag Value For EMail To Address,Tag For EMail To Address,EMail CC Address,Email Subject,Email Subject Append File Name,Email Subject Append Date Time,Email Subject Append Date Time Format,Email Body,Email Body Append File Name,Email Body Append Date Time,Email Body Append Date Time Format,Email Smtp Server,EMail Outgoing Port Number,EMail SSL,EMail SSL3,EMail TLS,EMail TLS11,EMail TLS12,EMail Use Credentials,EMail Username,EMail Password,Last Column"
ReportCSVImport
SetReport_Parameter_Value
SetReport_Parameter_Values

Security

Info

Security configuration is limited to CSV Import and Export operations.

CurrentUser
GetClientUsers
GetToken
LoadSecurityConfiguration
SecurityCSVExport

Export the Security Group configurations to a list of CSV strings. The first row is the header row as returned by SecurityCSVHeaderString followed by one row for each Security Group configuration. The first column is the primary key.

Info

This API call requires valid credentials and cannot be used with the Default user account. To export security groups the Get Security Group Names and Get Security Parameter permission must be given.

See Authentication for more details on how to Log In.

Signatures:

public string[] SecurityCSVExport()
public string[] SecurityCSVExport(string NetworkNode)
public string[] SecurityCSVExport(string NetworkNode, ref string ErrorString)
public string[] SecurityCSVExport(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: Returns a list of CSV strings

Example:

var oasConfig = new Config();
oasConfig.LogIn("<username>", "<password>");
var result = oasConfig.SecurityCSVExport();
SecurityCSVHeaderString

Returns all of the column heading names for the Security configuration CSV export.

Signatures:

public string SecurityCSVHeaderString()
public string SecurityCSVHeaderString(string NetworkNode)
public string SecurityCSVHeaderString(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: A list of all CSV headers for Security configuration export

Example:

var oasConfig = new Config();
var result = oasConfig.SecurityCSVHeaderString();

// result = "Group Name,Enable All,Start Runtime,Stop Runtime,Get System Status,Browse OPC Servers,Get Network Node Names,Kill License,Update OAS Version,Get Custom Object Names,Set Custom Object,Get Custom Object,Delete Custom Object,Clear Custom Objects,Browse Files,Add Tag Group,Delete Tag Group,Rename Tag Group,Add Tag,Delete Tag,Delete All Tags,Get Tag Group Names,Get Tag Names,Set Tag Parameter,Get Tag Parameter,Save Tag Configuration,Load Tag Configuration,Browse Tags Disable All,Add Driver,Delete Driver,Get Driver Names,Set Driver Parameter,Get Driver Parameter,Drivers Disable All,Read Tags Disable All,Write Tags Disable All,Get Trend Point Tag Names,Get History Tag Names,Trend RealTime Disable All,Trend History Disable All,Get Data Logging Group Names,Add Data Logging Group,Delete Data Logging Group,Set Data Logging Parameter,Get Data Logging Parameter,Save Data Logging Configuration,Load Data Logging Configuration,Get Alarm Group Names,Add Alarms Programmatically,Delete Alarms,Add Alarm Comments,Edit Alarm Comments,Alarm Ack Min Priority,Alarm Ack Max Priority,Alarm Ack Groups Disable All,Alarm RealTime Min Priority,Alarm RealTime Max Priority,Alarm RealTime Groups Disable All,Alarm History Min Priority,Alarm History Max Priority,Alarm History Groups Disable All,Get Alarm Logging Group Names,Add Alarm Logging Group,Delete Alarm Logging Group,Set Alarm Logging Parameter,Get Alarm Logging Parameter,Save Alarm Logging Configuration,Load Alarm Logging Configuration,Get Alarm Notification Group Names,Add Alarm Notification Group,Delete Alarm Notification Group,Set Alarm Notification Parameter,Get Alarm Notification Parameter,Save Alarm Notification Configuration,Load Alarm Notification Configuration,Dashboard Access Level,Get Report Names,Add Report,Delete Report,Set Report Parameter,Get Report Parameter,Save Report Configuration,Load Report Configuration,Get Recipe Names,Add Recipe,Delete Recipe,Set Recipe Parameter,Get Recipe Parameter,Save Recipe Configuration,Load Recipe Configuration,Get Data Route Group Names,Add Data Route Group,Delete Data Route Group,Set Data Route Parameter,Get Data Route Parameter,Save Data Route Configuration,Load Data Route Configuration,Get UDP Broadcast IP Addresses,Add UDP Broadcast IP Address,Delete UDP Broadcast IP Address,Set UDP Broadcast Parameters,Get UDP Broadcast Parameters,Save UDP Broadcast,Load UDP Broadcast,Add Remote SCADA Host Servers,Delete Remote SCADA Host Servers,Set Remote SCADA Host Servers,Get Remote SCADA Host Servers,Save Remote SCADA Host Servers,Load Remote SCADA Host Servers,Get Security Group Names,Add Security Group,Remove Security Group,Set Security Parameter,Get Security Parameter,Get Security User Names,Add User,Remove User,Set User Parameter,Get User Parameter,Save Security,Load Security,Set Options,Get Options,Save Options,Load Options,Last Column"
SecurityCSVImport

Import Security Group configuration using CSV strings.

The first row should provide the headers you wish to update. You only have to provide the headers you want to update, but the first header must always be Security Group Name.

Use the Security GroupCSVHeaderString() call to get a listing of valid header names

Following the header row should be one or more rows containing security group configurations.

If the Security Group Name does not match any existing security group name then it will be added. Any properties not provided will use default values.

If an existing security group name is found then the properties given by the headers will be updated. Any properties not provided will not be updated.

Info

This API call requires valid credentials and cannot be used with the Default user account. To create security groups the Add Security Group permission must be given. To update users the Set Security Parameter permission must be given.

See Authentication for more details on how to Log In.

Signatures:

public string SecurityCSVImport(string[] CSVStrings)
public string SecurityCSVImport(string[] CSVStrings, string NetworkNode)
public string SecurityCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString)
public string SecurityCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • CSVStrings (string[]): List of CSV rows to import including header row
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: Returns number of security group configurations added and updated

Example:

List<string[]> securityGroupRows = [];

securityGroupRows.Add(["Group Name", "Read Tags Disable All"]);
securityGroupRows.Add(["MySecurityGroup", "false"]);

var securityData = securityGroupRows
    .Select(row => string.Join(',', row))
    .ToArray();

var oasConfig = new Config();
oasConfig.LogIn("<username>", "<password>");
var resultMessage = string.Empty;
var result = oasConfig.SecurityCSVImport(securityData, "localhost", ref resultMessage);

// New security group example
// ------------------
// result = "1 Security Groups Added 
//           0 Security Groups Updated"
// resultMessage = "Success"

// Existing security group example
// -----------------------
// result = "0 Security Groups Added 
//           1 Security Groups Updated"
// resultMessage = "Success"

// Failure example - missing first field
// -------------------------------------
// resultMessage = "No Security Groups were imported.  Security Group Name column is required"

// Failure example - bad header
// ----------------------------
// resultMessage = "Errors in Rows:1
//                  0 Security Groups Added 
//                  0 Security Groups Updated"

// Failure example - missing username
// ----------------------------------
// resultMessage = "Invalid Security Access for Adding Security Group
//
//					User name is blank."

// Failure example - incorrect username or password
// ------------------------------------------------
// resultMessage = "Network Error"
SecurityUsersCSVExport

Export the Security User configurations to a list of CSV strings. The first row is the header row as returned by SecurityUsersCSVHeaderString followed by one row for each Security User configuration. The first column is the primary key.

Info

This API call requires valid credentials and cannot be used with the Default user account. To export security users the Get Security User Names and Get Security User Parameter permission must be given.

See Authentication for more details on how to Log In.

Signatures:

public string[] SecurityUsersCSVExport()
public string[] SecurityUsersCSVExport(string NetworkNode)
public string[] SecurityUsersCSVExport(string NetworkNode, ref string ErrorString)
public string[] SecurityUsersCSVExport(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: Returns a list of CSV strings

Example:

var oasConfig = new Config();
oasConfig.LogIn("<username>", "<password>");
var result = oasConfig.SecurityUsersCSVExport();
SecurityUsersCSVHeaderString

Returns all of the column heading names for the Users configuration CSV export.

Signatures:

public string SecurityUsersCSVHeaderString()
public string SecurityUsersCSVHeaderString(string NetworkNode)
public string SecurityUsersCSVHeaderString(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: A list of all CSV headers for Users configuration export

Example:

var oasConfig = new Config();
var result = oasConfig.SecurityUsersCSVHeaderString();

// result = "UserName,Password,Security Group,Field 1,Field 2,Field 3,Field 4,Last Column"
SecurityUsersCSVImport

Import Security Users configuration using CSV strings.

The first row should provide the headers you wish to update. You only have to provide the headers you want to update, but the first header must always be UserName.

Use the SecurityUsersCSVHeaderString() call to get a listing of valid header names

Following the header row should be one or more rows containing security user configurations.

If the Security Users Name does not match any existing username then it will be added. Any properties not provided will use default values.

If an existing username is found then the properties given by the headers will be updated. Any properties not provided will not be updated.

Info

This API call requires valid credentials and cannot be used with the Default user account. To create users the Add Security User permission must be given. To update users the Set Security User Parameter permission must be given.

See Authentication for more details on how to Log In.

Signatures:

public string SecurityUsersCSVImport(string[] CSVStrings)
public string SecurityUsersCSVImport(string[] CSVStrings, string NetworkNode)
public string SecurityUsersCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString)
public string SecurityUsersCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • CSVStrings (string[]): List of CSV rows to import including header row
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: Returns number of security user configurations added and updated

Example:

List<string[]> securityUserRows = [];

securityUserRows.Add(["UserName", "Password"]);
securityUserRows.Add(["MyUser", "<new_password>"]);

var usersData = securityUserRows
    .Select(row => string.Join(',', row))
    .ToArray();

var oasConfig = new Config();
oasConfig.LogIn("<username>", "<password>");
var resultMessage = string.Empty;
var result = oasConfig.SecurityUsersCSVImport(usersData, "localhost", ref resultMessage);

// New security user example
// ------------------
// result = "1 Security Users Added 
//           0 Security Users Updated"
// resultMessage = "Success"

// Existing security user example
// -----------------------
// result = "0 Security Users Added 
//           1 Security Users Updated"
// resultMessage = "Success"

// Failure example - missing first field
// -------------------------------------
// resultMessage = "No Security Users were imported.  UserName column is required"

// Failure example - bad header
// ----------------------------
// resultMessage = "Errors in Rows:1
//                  0 Security Users Added 
//                  0 Security Users Updated"

// Failure example - missing username
// ----------------------------------
// resultMessage = "Invalid Security Access for Adding Security Users
//
//					User name is blank."

// Failure example - incorrect username or password
// ------------------------------------------------
// resultMessage = "Network Error"
SaveSecurityConfiguration

Tag Groups

AddGroup

Add a new Tag Group with the given group name and an optional reference group (parent).

Use tag path notation when specifying the reference group (for example: MyTagGroup or MyTagGroup.MyChildGroup). The new tag group will be added as a child tag group to the specified reference group path.

If you do not provide the ReferenceGroup then the Tag Group will be added to the root tag group.

Signatures:

public int AddGroup(string Group)
public int AddGroup(string Group, string ReferenceGroup)
public int AddGroup(string Group, string ReferenceGroup, string NetworkNode)
public int AddGroup(string Group, string ReferenceGroup, string NetworkNode, ref string ErrorString)
public int AddGroup(string Group, string ReferenceGroup, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Group (string): Tag group name
  • ReferenceGroup (string): The tag path of the parent tag group
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if the Tag Group already exists or adding failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;

// Example: add to root Tag Group
var result = oasConfig.AddGroup("GroupName");
// result = 1

// Example: add to root Tag Group with extra parameters
var result = oasConfig.AddGroup("GroupName", "", "localhost", ref resultMessage);
// result = 1

// Example: add to specific parent Tag Group
var result = oasConfig.AddGroup("GroupName", "ParentTagGroup", "localhost", ref resultMessage);
// result = 1

// Example: add to specific nested parent Tag Group
var result = oasConfig.AddGroup("GroupName", "ParentTagGroup.NestedTagGroup", "localhost", ref resultMessage);
// result = 1

// Example: Tag Group already exists
var result = oasConfig.AddGroup("ExistingTagGroup", "", "localhost", ref resultMessage);
// result = 0
// resultMessage = "Group was not added"
GetGroupNames

Return a list of Tag Group names in the given parent Tag Group.

To set the parent Tag Group as the root, omit the ReferenceGroup parameter or pass an empty string.

Signatures:

public string[] GetGroupNames()
public string[] GetGroupNames(string ReferenceGroup)
public string[] GetGroupNames(string ReferenceGroup, string NetworkNode)
public string[] GetGroupNames(string ReferenceGroup, string NetworkNode, ref string ErrorString)
public string[] GetGroupNames(string ReferenceGroup, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ReferenceGroup (string): The tag path of the parent tag group
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: Return a list of Tag Group names in the given parent Tag Group

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;

// Example: Get Tag Group names in root tag group
var result = oasConfig.GetGroupNames();
// result = [
//   "TagGroupA",
//   "TagGroupB",
//   ...
//]

// Example: Get Tag Group names in root tag group with extra parameters
var result = oasConfig.GetGroupNames("", "localhost", ref resultMessage);
// result = [
//   "TagGroupA",
//   "TagGroupB",
//   ...
//]
// resultMessage = "Success"

// Example: Get Tag Group names in given parent tag group
var result = oasConfig.GetGroupNames("TagGroupA", "localhost", ref resultMessage);
// result = [
//   "NestedTagGroup",
//   ...
//]
// resultMessage = "Success"

// Example: Get Tag Group names in given nested parent tag group
var result = oasConfig.GetGroupNames("TagGroupA.NestedTagGroup", "localhost", ref resultMessage);
// result = [
//   "DeeperNestedTagGroup",
//   ...
//]
// resultMessage = "Success"

// Example: Invalid reference Tag Group
var result = oasConfig.GetGroupNames("InvalidTagGroup", "localhost", ref resultMessage);
// resultMessage = "Cannot retrieve Group Names, Group does not exist"

RemoveGroup

Remove a given Tag Group by name from the given parent Tag Group.

To set the parent Tag Group as the root, omit the ReferenceGroup parameter or pass an empty string.

Signatures:

public int RemoveGroup(string Group)
public int RemoveGroup(string Group, string ReferenceGroup)
public int RemoveGroup(string Group, string ReferenceGroup, string NetworkNode)
public int RemoveGroup(string Group, string ReferenceGroup, string NetworkNode, ref string ErrorString)
public int RemoveGroup(string Group, string ReferenceGroup, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Group (string): Tag group name
  • ReferenceGroup (string): The tag path of the parent tag group
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if the Tag Group does not exists or removing failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;

// Example: remove from root Tag Group
var result = oasConfig.RemoveGroup("GroupName");
// result = 1

// Example: remove from root Tag Group with extra parameters
var result = oasConfig.RemoveGroup("GroupName", "", "localhost", ref resultMessage);
// result = 1

// Example: remove from specific parent Tag Group
var result = oasConfig.RemoveGroup("GroupName", "ParentTagGroup", "localhost", ref resultMessage);
// result = 1

// Example: remove from specific nested parent Tag Group
var result = oasConfig.RemoveGroup("GroupName", "ParentTagGroup.NestedTagGroup", "localhost", ref resultMessage);
// result = 1

// Example: Tag Group does not exist
var result = oasConfig.RemoveGroup("InvalidTagGroup", "", "localhost", ref resultMessage);
// result = 0
// resultMessage = "Cannot Delete Group, Group does not exist"
RenameGroup

Rename a given Tag Group in a given parent Tag Group by providing the current Tag Group name and the new Tag Group name.

To set the parent Tag Group as the root, omit the ReferenceGroup parameter or pass an empty string.

Signatures:

public int RenameGroup(string OldGroupName, string NewGroupName)
public int RenameGroup(string OldGroupName, string NewGroupName, string ReferenceGroup)
public int RenameGroup(string OldGroupName, string NewGroupName, string ReferenceGroup, string NetworkNode)
public int RenameGroup(string OldGroupName, string NewGroupName, string ReferenceGroup, string NetworkNode, ref string ErrorString)
public int RenameGroup(string OldGroupName, string NewGroupName, string ReferenceGroup, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • OldGroupName (string): The current name of the Tag Group
  • NewGroupName (string): The new name of the Tag Group
  • ReferenceGroup (string): The tag path of the parent tag group
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if the Tag Group does not exists or rename failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;

// Example: Rename a Tag Group in the root Tag Group
var result = oasConfig.RenameGroup("GroupName", "NewGroupName");
// result = 1

// Example: Rename a Tag Group in the root Tag Group with extra parameters
var result = oasConfig.RenameGroup("GroupName", "NewGroupName", "", "localhost", ref resultMessage);
// result = 1
// resultMessage = "Success"

// Example: Rename a Tag Group in a given Tag Group
var result = oasConfig.RenameGroup("GroupName", "NewGroupName", "ParentTagGroup", "localhost", ref resultMessage);
// result = 1

// Example: Rename a Tag Group in a given nested Tag Group
var result = oasConfig.RenameGroup("GroupName", "NewGroupName", "ParentTagGroup.NestedTagGroup", "localhost", ref resultMessage);
// result = 1

// Example: Parent tag group is invalid
var result = oasConfig.RenameGroup("GroupName", "NewGroupName", "InvalidParentTagGroup", "localhost", ref resultMessage);
// result = 0
// resultMessage = "Cannot Rename Group, Group does not exist"

// Example: Old Tag Group name is empty
var result = oasConfig.RenameGroup("", "NewGroupName", "", "localhost", ref resultMessage);
// result = 0
// resultMessage = "Cannot Rename Group, Group Name is blank"

// Example: New Tag Group name is empty
var result = oasConfig.RenameGroup("GroupName", "", "", "localhost", ref resultMessage);
// result = 0
// resultMessage = "Cannot Rename Group, Group Name is blank"

Tags

AddTag

Add a new Tag with the given name and an optional parent Tag Group path.

Use tag path notation when specifying the Tag Group (for example: MyTagGroup or MyTagGroup.MyChildGroup). The new tag will be added as a child tag to the specified Tag Group path.

If you do not provide the ReferenceGroup then the Tag will be added to the root tag group.

Signatures:

public int AddTag(string Tag)
public int AddTag(string Tag, string ReferenceGroup)
public int AddTag(string Tag, string ReferenceGroup, string NetworkNode)
public int AddTag(string Tag, string ReferenceGroup, string NetworkNode, ref string ErrorString)
public int AddTag(string Tag, string ReferenceGroup, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Tag (string): The tag name
  • ReferenceGroup (string): The tag path of the parent tag group
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if the Tag already exists or adding the Tag failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;

// Example: add Tag to root Tag Group
var result = oasConfig.AddTag("MyTag");
// result = 1

// Example: add Tag to root Tag Group with extra parameters
var result = oasConfig.AddTag("MyTag", "", "localhost", ref resultMessage);
// result = 1
// resultMessage = "Success"

// Example: add Tag to specific parent Tag Group
var result = oasConfig.AddTag("MyTag", "ParentTagGroup", "localhost", ref resultMessage);
// result = 1

// Example: Tag already exists
var result = oasConfig.AddTag("MyTag", "", "localhost", ref resultMessage);
// result = 0
// resultMessage = "Could not Add Tag"

// Example: add blank Tag
var result = oasConfig.AddTag("", "", "localhost", ref resultMessage);
// result = 0
// resultMessage = "Could not Add Tag, Tag Name is Blank"
CheckTagAccessRead

Verify if a given user has Tag Value read access to one or more given Tag paths.

Tags should be specified using their full Tag path (for example: MyTag or MyParentGroup.MyTag).

Info

Reading Tag Value permission is configured in the Security group configuration under the *Read Tags tab. If the Disable All Tags from Reading check box is ticked and you have not specified any Tags in the list of Tags to be allowed, then no Tags will have read permission.

If the check box is not ticked, all Tags will be allowed, unless they are added to the list of Tags that should NOT be allowed.

Signatures:

public string[] CheckTagAccessRead(string UserName, string Password, string[] Tags)
public string[] CheckTagAccessRead(string UserName, string Password, string[] Tags, string NetworkNode)
public string[] CheckTagAccessRead(string UserName, string Password, string[] Tags, string NetworkNode, ref string ErrorString)
public string[] CheckTagAccessRead(string UserName, string Password, string[] Tags, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • UserName (string): Username of user to check
  • Password (string): Password of user to check
  • Tags (string[]): List of Tags to check
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of Tag paths that have read access

Example:

var oasConfig = new Config();

// Example: no read permission for any tag
var result = oasConfig.CheckTagAccessRead("api", "test", ["MyTag", "TestGroup.Test"]);
// result = []

// Example: read permission only for MyTag
var result = oasConfig.CheckTagAccessRead("api", "test", ["MyTag", "TestGroup.Test"]);
// result = ["MyTag"]

// Example: read permission for all or both tags
var result = oasConfig.CheckTagAccessRead("api", "test", ["MyTag", "TestGroup.Test"]);
// result = ["MyTag", "TestGroup.Test"]
CheckTagAccessWrite

Verify if a given user has Tag Value write access to one or more given Tag paths.

Tags should be specified using their full Tag path (for example: MyTag or MyParentGroup.MyTag).

Info

Writing Tag Value permission is configured in the Security group configuration under the *Write Tags tab. If the Disable All Tags from Writing check box is ticked and you have not specified any Tags in the list of Tags to be allowed, then no Tags will have write permission.

If the check box is not ticked, all Tags will be allowed, unless they are added to the list of Tags that should NOT be allowed.

Signatures:

public string[] CheckTagAccessWrite(string UserName, string Password, string[] Tags)
public string[] CheckTagAccessWrite(string UserName, string Password, string[] Tags, string NetworkNode)
public string[] CheckTagAccessWrite(string UserName, string Password, string[] Tags, string NetworkNode, ref string ErrorString)
public string[] CheckTagAccessWrite(string UserName, string Password, string[] Tags, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • UserName (string): Username of user to check
  • Password (string): Password of user to check
  • Tags (string[]): List of Tags to check
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of Tag paths that have write access

Example:

var oasConfig = new Config();

// Example: no write permission for any tag
var result = oasConfig.CheckTagAccessWrite("api", "test", ["MyTag", "TestGroup.Test"]);
// result = []

// Example: write permission only for MyTag
var result = oasConfig.CheckTagAccessWrite("api", "test", ["MyTag", "TestGroup.Test"]);
// result = ["MyTag"]

// Example: write permission for all or both tags
var result = oasConfig.CheckTagAccessWrite("api", "test", ["MyTag", "TestGroup.Test"]);
// result = ["MyTag", "TestGroup.Test"]
GetAllTagNames

Get a list of all descendant Tags in the given parent Tag Group. Tags will be returned by their full Tag Path.

To set the parent Tag Group as the root, omit the ReferenceGroup parameter or pass an empty string.

Signatures:

public string[] GetAllTagNames()
public string[] GetAllTagNames(string ReferenceGroup)
public string[] GetAllTagNames(string ReferenceGroup, string NetworkNode)
public string[] GetAllTagNames(string ReferenceGroup, string NetworkNode, ref string ErrorString)
public string[] GetAllTagNames(string ReferenceGroup, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ReferenceGroup (string): The tag path of the parent tag group
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of tag paths

Example:

var oasConfig = new Config();
var result = oasConfig.GetAllTagNames();
// result = [
//    "MyTag",
//    "TagGroup.ChildTag"
// ]
GetAllTrendPointTagNames

Get a list of all descendant Tags in the given parent Tag Group where the Trend Point option is enabled. This includes the trend point option in the Value tab and any of the alarm tabs (for example: Digital). Tags will be returned by their full Tag Path.

To set the parent Tag Group as the root, omit the ReferenceGroup parameter or pass an empty string.

Signatures:

public string[] GetAllTrendPointTagNames()
public string[] GetAllTrendPointTagNames(string ReferenceGroup)
public string[] GetAllTrendPointTagNames(string ReferenceGroup, string NetworkNode)
public string[] GetAllTrendPointTagNames(string ReferenceGroup, string NetworkNode, ref string ErrorString)
public string[] GetAllTrendPointTagNames(string ReferenceGroup, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ReferenceGroup (string): The tag path of the parent tag group
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of tag paths

Example:

var oasConfig = new Config();
var result = oasConfig.GetAllTrendPointTagNames();
// result = [
//    "MyTag",
//    "TagGroup.ChildTag"
// ]
GetParameter_Property_Strings

Get a list of available Tag parameter names.

Info

This method is no longer recommended. For reading Tag parameters use the GetTagProperties method.

GetTag_Parameter_Names

Get a list of available Tag parameter names.

Info

This method is no longer recommended. For reading Tag parameters use the GetTagProperties method.

GetTag_Parameter_Strings

Get a list of available Tag parameter strings.

Info

This method is no longer recommended. For reading Tag parameters use the GetTagProperties method.

GetTag_Parameter_Value

Get a Tag parameter value based on parameter and property type.

Info

This method is no longer recommended. For reading Tag parameters use the GetTagProperties method.

GetTag_Parameter_Values

Get a Tag parameter values based on parameter and property types.

Info

This method is no longer recommended. For reading Tag parameters use the GetTagProperties method.

GetTagNames

Returns an array of tag names (not the full tag path) for the tags in the given parent tag path (ReferenceGroup). This method does not return tag names in any descendant tag groups.

If no reference group is provided, only the tags in the root tag path will be returned.

Signatures:

public string[] GetTagNames()
public string[] GetTagNames(string ReferenceGroup)
public string[] GetTagNames(string ReferenceGroup, string NetworkNode)
public string[] GetTagNames(string ReferenceGroup, string NetworkNode, ref string ErrorString)
public string[] GetTagNames(string ReferenceGroup, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ReferenceGroup (string): The tag path of the parent tag group
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: An array of tag names in the given tag group

Example:

var oasConfig = new Config();

// Example root tag group
var result = oasConfig.GetTagNames();
// result = [
//    "MyTag1",
//    "MyTag2",
//    ...
// ]

// Example tag group path
var result = oasConfig.GetTagNames("MyGroup");
// result = [
//    "MyChildTag1",
//    "MyChildTag2",
//    ...
// ]
GetTagNamesFromTagID

Get a Tag name based on the given TagID.

Info

A Tag's TagID can only be set programmatically or using CSV Import by using the TagID property.

Signatures:

public string[] GetTagNamesFromTagID(string TagID)
public string[] GetTagNamesFromTagID(string TagID, string NetworkNode)
public string[] GetTagNamesFromTagID(string TagID, string NetworkNode, ref string ErrorString)
public string[] GetTagNamesFromTagID(string TagID, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • TagID (string): The Tag ID
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of Tag names

Example:

var oasConfig = new Config();
var result = oasConfig.GetTagNamesFromTagID("example");
GetTagNamesFromTagIDs

Get multiple Tag names based on the given TagIDs.

Info

A Tag's TagID can only be set programmatically or using CSV Import by using the TagID property.

Signatures:

public object[] GetTagNamesFromTagIDs(string[] TagIDs)
public object[] GetTagNamesFromTagIDs(string[] TagIDs, string NetworkNode)
public object[] GetTagNamesFromTagIDs(string[] TagIDs, string NetworkNode, ref string ErrorString)
public object[] GetTagNamesFromTagIDs(string[] TagIDs, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • TagIDs (string[]): List of Tag IDs
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • object[]: List of Tag names

Example:

var oasConfig = new Config();
var result = oasConfig.GetTagNamesFromTagIDs(new string[]{});
GetTagProperties

Returns Tag configuration properties based on the following filtering criteria:

  • DesiredColumns - if an empty array is given then all properties will be returned, otherwise only the tag properties specified will be returned
  • TagNames - if an empty array is given then all tags will be returned, otherwise only the tags specified by their tag path will be returned
  • GroupNames - the result will include all tags and descendant tags specified by the given group paths
  • ReturnValuesAsCSVStrings - if false the result will be an array of arrays, if true the result will be an array of strings

If you specify TagNames and do not provide any GroupNames then the result will only include the TagNames.

You should pass in empty arrays [] or null if you do not want to use a parameter rather than specifying empty strings [""]. If you pass an empty string array for the GroupNames parameter it will include *all tags. If you pass an empty string array for the DesiredColumns no data will be returned, because no tag properties will be matched.

The first row of the array always includes the property names based on what was given in the DesiredColumns parameter.

Each subsequent row in the resulting array represents a tag.

Info

To use this feature, the user must have the following security configuration in the Tags tab:

  • Get Tag Group Names
  • Get Tag Names
  • Get Tag Parameter

See the Knowledge Base for a list of Tag Configuration Properties

Signatures:

public object[] GetTagProperties(string[] DesiredColumns, string[] TagNames, string[] GroupNames, bool ReturnValuesAsCSVStrings)
public object[] GetTagProperties(string[] DesiredColumns, string[] TagNames, string[] GroupNames, bool ReturnValuesAsCSVStrings, string NetworkNode)
public object[] GetTagProperties(string[] DesiredColumns, string[] TagNames, string[] GroupNames, bool ReturnValuesAsCSVStrings, string NetworkNode, ref string ErrorString)
public object[] GetTagProperties(string[] DesiredColumns, string[] TagNames, string[] GroupNames, bool ReturnValuesAsCSVStrings, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • DesiredColumns (string[]): The tag parameters to include in the result. Use an empty array to return all.
  • TagNames (string[]): Tag names to include. Use an empty array to include all.
  • GroupNames (string[]): Tag group paths to include. Use an empty array to only use tag names filter.
  • ReturnValuesAsCSVStrings (bool): Select return format: false means arrays, true means comma delimited strings
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • object[]: Return array of tag properties

Example:

var oasConfig = new Config();

// Example - all tag properties for all tags (return as arrays)
var result = oasConfig.GetTagProperties([], [], [], false);
// result = [
//   [Tag, Value - Data Type, Value - Value, Value - Quality, Value - Trim At First Null, Value - Enable Bitmask, ...],
//   [MyTag, Float, 0, True, False, False, ...],
//   [MyGroup.MyChildTag, Float, False, True, False, False, ...],
//   [MyGroup.MyChildGroup.MyGrandChildTag, Float, False, True, False, False, ...],
//   ...
// ]

// Example - all tag properties for all tags (return as strings)
var result = oasConfig.GetTagProperties([], [], [], true);
// result = [
//   "Tag,Value - Data Type,Value - Value,Value - Quality,Value - Trim At First Null,Value - Enable Bitmask,...",
//   "MyTag,Float,0,1,0,0,...",
//   "MyGroup.MyChildTag,Float,0,1,0,0,...",
//   "MyGroup.MyChildGroup.MyGrandChildTag,Float,0,1,0,0,...",
//   ...
// ]

// Example - all tag properties for all descendant tags in a given tag group
var result = oasConfig.GetTagProperties([], [], ["MyGroup"], true);
// result = [
//   "Tag,Value - Data Type,Value - Value,Value - Quality,Value - Trim At First Null,Value - Enable Bitmask,...",
//   "MyGroup.MyChildTag,Float,0,1,0,0,...",
//   "MyGroup.MyChildGroup.MyGrandChildTag,Float,0,1,0,0,...",
//   ...
// ]

// Example - all tag properties for a specific tag
var result = oasConfig.GetTagProperties([], ["MyGroup.MyChildTag"], [], true);
// result = [
//   "Tag,Value - Data Type,Value - Value,Value - Quality,Value - Trim At First Null,Value - Enable Bitmask,...",
//   "MyGroup.MyChildTag,Float,0,1,0,0,..."
// ]

// Example - only the Tag Name, Value and Data Type for a specific tag
var result = oasConfig.GetTagProperties(["Tag", "Value - Value", "Value - Data Type"], ["MyGroup.MyChildTag"], [], true);
// result = [
//   "Tag,Value - Data Type,Value - Value",
//   "MyGroup.MyChildTag,Float,0"
// ]
GetTagsAndParameters

Get list of Tag and select parameters by Tag Group.

Info

This method is no longer recommended. For reading Tag parameters use the GetTagProperties method.

GetTagsAndProperties

Get a list of Tag properties.

Info

This method is no longer recommended. For reading Tag parameters use the GetTagProperties method.

GetTagValuesByGroup

Returns an array of tag paths and the current tag value for all tags that are a descendant of the given GroupName.

To return all tags specify the GroupName as an empty string.

The return value format is a flat array of tag name and tag value pairs. See the example below.

Signatures:

public object[] GetTagValuesByGroup(string GroupName)
public object[] GetTagValuesByGroup(string GroupName, string NetworkNode)
public object[] GetTagValuesByGroup(string GroupName, string NetworkNode, ref string ErrorString)
public object[] GetTagValuesByGroup(string GroupName, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • GroupName (string): The tag path of the tag group
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • object[]: Returns a flat array of tag names and tag values

Example:

var oasConfig = new Config();
var result = oasConfig.GetTagValuesByGroup("");

// result = [
//    "MyTag1",
//    12.4,
//    "MyTag2",
//    42.3,
//    ...
// ]

DeleteAllTags

Delete all Tags and Tag Groups.

Signatures:

public int DeleteAllTags()
public int DeleteAllTags(string NetworkNode)
public int DeleteAllTags(string NetworkNode, ref string ErrorString)
public int DeleteAllTags(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if the operation failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var result = oasConfig.DeleteAllTags();
// result = 1
ImportABTags

Provides a custom import method for Allen Bradley Tags.

This functionality is available on the Tags screen of the Configure OAS application.

Signatures:

public void ImportABTags(string FilePath, string TagGroup, double PollRate, LogixType RSLogixType, string DriverInterface, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • FilePath (string): The file path of the file to import
  • TagGroup (string): The Tag Group where to import the Tags
  • PollRate (double): The polling rate
  • RSLogixType (LogixType): The RSLogix type
  • DriverInterface (string): The Driver Interface name
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var result = oasConfig.ImportABTags("example", "example", 3.14, value, "example", "example", value, "example");
LoadTagConfiguration

Load the given Tag configuration file. The filename must end with the extension .Tags.

Warning

This will replace the existing runtime configuration

Signatures:

public void LoadTagConfiguration(string ConfigurationFilePath)
public void LoadTagConfiguration(string ConfigurationFilePath, string NetworkNode)
public void LoadTagConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString)
public void LoadTagConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ConfigurationFilePath (string): The file system path of the configuration file
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
oasConfig.LoadTagConfiguration("C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles\\TagConfiguration.Tags", "localhost", ref resultMessage);
// resultMessage = "Success"
RemoveTag

Remove a Tag with the given name in the given Tag Group.

To set the parent Tag Group as the root, omit the ReferenceGroup parameter or pass an empty string.

Signatures:

public int RemoveTag(string Tag)
public int RemoveTag(string Tag, string ReferenceGroup)
public int RemoveTag(string Tag, string ReferenceGroup, string NetworkNode)
public int RemoveTag(string Tag, string ReferenceGroup, string NetworkNode, ref string ErrorString)
public int RemoveTag(string Tag, string ReferenceGroup, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Tag (string): The name of the tag
  • ReferenceGroup (string): The tag path of the parent tag group
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if the Tag does not exists or removing the Tag failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;

// Example: remove Tag by name from root Tag Group
var result = oasConfig.RemoveTag("MyTag");
// result = 1

// Example: remove Tag by name from root Tag Group with extra parameters
var result = oasConfig.RemoveTag("MyTag", "", "localhost", ref resultMessage);
// result = 1
// resultMessage = "Success"

// Example: remove Tag from specific parent Tag Group
var result = oasConfig.RemoveTag("MyTag", "ParentTagGroup", "localhost", ref resultMessage);
// result = 1

// Example: remove Tag from specific nested parent Tag Group
var result = oasConfig.RemoveTag("MyTag", "ParentTagGroup.NestedTagGroup", "localhost", ref resultMessage);
// result = 1

// Example: invalid Tag name / does not exist
var result = oasConfig.RemoveTag("InvalidTag", "", "localhost", ref resultMessage);
// result = 0
// resultMessage = "Could not Remove Tag"
RemoveTags

Remove multiple Tags in one operation based on the full Tag path.

Any Tag paths that cannot be found will be ignored.

Signatures:

public int RemoveTags(string[] Tags)
public int RemoveTags(string[] Tags, string NetworkNode)
public int RemoveTags(string[] Tags, string NetworkNode, ref string ErrorString)
public int RemoveTags(string[] Tags, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • Tags (string[]): List of Tag paths
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • int:
    • 1 if successful
    • 0 if the operation failed
    • -1 if OAS instance is not reachable

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;

// Example: remove Tags
var result = oasConfig.RemoveTags(["MyTag", "AnotherTag"]);
// result = 1

// Example: remove Tags with extra parameters
var result = oasConfig.RemoveTags(["MyTag", "AnotherTag"], "localhost", ref resultMessage);
// result = 1
// resultMessage = "Success"

// Example: remove Tag from specific parent Tag Group
var result = oasConfig.RemoveTags("MyTag", "ParentTagGroup.AnotherTag", "localhost", ref resultMessage);
// result = 1
SaveTagConfiguration

Save the Tag configurations.

Requirements:

  • On Windows the path must start with: C:\ProgramData\OpenAutomationSoftware\ConfigFiles\
  • On Linux the path must start with: /oas/ConfigFiles/
  • The file extension must be set to: .Tags

Signatures:

public void SaveTagConfiguration(string ConfigurationFilePath)
public void SaveTagConfiguration(string ConfigurationFilePath, string NetworkNode)
public void SaveTagConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString)
public void SaveTagConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ConfigurationFilePath (string): The file system path of the configuration file
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;

// Windows
oasConfig.SaveTagConfiguration("C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles\\TagsConfig.Tags", "localhost", ref resultMessage);

// Linux
oasConfig.SaveTagConfiguration("/oas/ConfigFiles/TagsConfig.Tags", "localhost", ref resultMessage);

// resultMessage = "Success"

// Windows incorrect file path or extension example
// ------------------------------------------------
// resultMessage = "File must be saved to C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles directory with file extension .Tags"

// Linux incorrect file path or extension example
// ----------------------------------------------
// resultMessage = "File must be saved to /oas/ConfigFiles directory with file extension .Tags"
SetTag_Parameter_Value

Set a Tag parameter value.

Info

This method is no longer recommended. For writing Tag parameters use the SetTagProperties method.

SetTag_Parameter_Values

Set multiple Tag parameter values.

Info

This method is no longer recommended. For writing Tag parameters use the SetTagProperties method.

SetTagProperties

Set Tag properties based on an array of Tag paths, property names and values. The PropertyValue array must have a specific format to pass in Tag property values.

The first row must be an array of column names. The first column name of this array must be Tag. This represents the Tag path.

Following the first row, you can add as many rows representing a Tag each. Each of these rows needs to have the same number of items in the array as there are in the first row. The first item must always be the Tag path.

See the Knowledge Base for a list of Tag Configuration Properties

Signatures:

public string SetTagProperties(object[] PropertyValues)
public string SetTagProperties(object[] PropertyValues, string NetworkNode)
public string SetTagProperties(object[] PropertyValues, string NetworkNode, ref string ErrorString)
public string SetTagProperties(object[] PropertyValues, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • PropertyValues (object[]): An array with a header row and the Tags to update
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: Result status string

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;

List<object> PropertyValues = [];

List<object> DesiredColumns = [];
DesiredColumns.Add("Tag");   // Required
DesiredColumns.Add("Value - Data Type");
DesiredColumns.Add("Value - Gain");

PropertyValues.Add(DesiredColumns.ToArray());  // First record is the header

// All other records contain values for each tag to set.
List<object> TagValues1 = [];
TagValues1.Add("Ramp");
TagValues1.Add("Double");
TagValues1.Add(1.0);

PropertyValues.Add(TagValues1.ToArray());

List<object> TagValues2 = [];
TagValues2.Add("Random");
TagValues2.Add("Double");
TagValues2.Add(1.0);

PropertyValues.Add(TagValues2.ToArray());

List<object> TagValues3 = [];
TagValues3.Add("Sine");
TagValues3.Add("Double");
TagValues3.Add(1.0);

PropertyValues.Add(TagValues3.ToArray());

var result = oasConfig.SetTagProperties(PropertyValues.ToArray(), "localhost", ref resultMessage);
// result = "3 Tags Added 0 Tags Updated"
// resultMessage = "Success"
TagCSVExport

Export all Tag configurations for all Tags to a list of CSV strings.

You can obtain the name of each column by using the TagCSVHeaderString method call.

Signatures:

public string[] TagCSVExport()
public string[] TagCSVExport(string NetworkNode)
public string[] TagCSVExport(string NetworkNode, ref string ErrorString)
public string[] TagCSVExport(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: Returns a list of CSV strings

Example:

var oasConfig = new Config();
var result = oasConfig.TagCSVExport();
TagCSVExportByGroup

Export all Tag configurations for all descendant Tags of the given parent Tag Group to a list of CSV strings.

If you pass an empty string as the GroupName it will return all tags.

You can obtain the name of each column by using the TagCSVHeaderString method call.

Signatures:

public string[] TagCSVExportByGroup(string GroupName)
public string[] TagCSVExportByGroup(string GroupName, string NetworkNode)
public string[] TagCSVExportByGroup(string GroupName, string NetworkNode, ref string ErrorString)
public string[] TagCSVExportByGroup(string GroupName, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • GroupName (string): The tag path of the tag group
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: Returns a list of CSV strings

Example:

var oasConfig = new Config();
var result = oasConfig.TagCSVExportByGroup("TagGroup");
TagCSVExportWithDesiredColumns

Export the given Tag configurations parameters (columns) for all Tags to a list of CSV strings.

You can obtain the name of each column by using the TagCSVHeaderString method call.

Signatures:

public string[] TagCSVExportWithDesiredColumns(string[] DesiredColumns)
public string[] TagCSVExportWithDesiredColumns(string[] DesiredColumns, string NetworkNode)
public string[] TagCSVExportWithDesiredColumns(string[] DesiredColumns, string NetworkNode, ref string ErrorString)
public string[] TagCSVExportWithDesiredColumns(string[] DesiredColumns, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • DesiredColumns (string[]): The parameters to include in the result
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of CSV strings

Example:

var oasConfig = new Config();
var result = oasConfig.TagCSVExportWithDesiredColumns(["Tag", "Value - Data Type"]);
// result = [
//    "MyTag,Float"
//    "TagGroup.ChildTag,Float"
// ]
TagCSVHeaderString

Returns all of the column heading names for the Tag configuration CSV export.

You will find a listing of Tag properties on the Tag Configuration Properties page.

Signatures:

public string TagCSVHeaderString()
public string TagCSVHeaderString(string NetworkNode)
public string TagCSVHeaderString(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: A list of all CSV headers for Tag configuration export

Example:

var oasConfig = new Config();
var result = oasConfig.TagCSVHeaderString();
// result = "Tag,Tag,Value - Data Type,Value - Value,Value - Quality,Value - Trim At First Null,Value - Enable Bitmask,Value - Bitmask,..."
TagCSVImport

Import Tag configuration using CSV strings.

The first row should provide the headers you wish to update. You only have to provide the headers you want to update, but the first header must always be Tag.

Use the TagCSVHeaderString() call to get a listing of valid header names

Following the header row should be one or more rows containing tag configurations.

If the Tag does not match any existing tag names then it will be added. Any properties not provided will use default values.

If an existing tag name is found then the properties given by the headers will be updated. Any properties not provided will not be updated.

Signatures:

public string TagCSVImport(string[] CSVStrings)
public string TagCSVImport(string[] CSVStrings, string NetworkNode)
public string TagCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString)
public string TagCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • CSVStrings (string[]): List of CSV rows to import including header row
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: Returns number of tag configurations added and updated

Example:

List<string[]> tagRows = [];

tagRows.Add(["Tag", "Value - Data Type"]);
tagRows.Add(["MyTag", "Float"]);

var tagData = tagRows
    .Select(row => string.Join(',', row))
    .ToArray();

var oasConfig = new Config();
var resultMessage = string.Empty;
var result = oasConfig.TagCSVImport(tagData, "localhost", ref resultMessage);

// New security user example
// ------------------
// result = "1 Tags Added 
//           0 Tags Updated"
// resultMessage = "Success"

// Existing security user example
// -----------------------
// result = "0 Tags Added 
//           1 Tags Updated"
// resultMessage = "Success"

// Failure example - missing first field
// -------------------------------------
// resultMessage = "No Tags were imported.  Tag column is required"

// Failure example - bad header
// ----------------------------
// resultMessage = "Errors in Rows:1
//                  0 Tags Added 
//                  0 Tags Updated"

Trend

GetTrendPointGroupNames

Gets a list of Tag Group paths that contain Tags with the Trend Point option enabled and are direct descendants of the given parent Tag Group.

To set the parent Tag Group as the root, omit the ReferenceGroup parameter or pass an empty string.

Signatures:

public string[] GetTrendPointGroupNames()
public string[] GetTrendPointGroupNames(string ReferenceGroup)
public string[] GetTrendPointGroupNames(string ReferenceGroup, string NetworkNode)
public string[] GetTrendPointGroupNames(string ReferenceGroup, string NetworkNode, ref string ErrorString)
public string[] GetTrendPointGroupNames(string ReferenceGroup, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ReferenceGroup (string): The tag path of the parent tag group
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: List of Tag Group paths

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;

// Example: root path
var result = oasConfig.GetTrendPointGroupNames();
// result = [ 
//   "TagGroupA",
//   ...
// ]

// Example: root path with empty string
var result = oasConfig.GetTrendPointGroupNames("", "localhost", ref resultMessage);
// result = [ 
//   "TagGroupA",
//   ...
// ]
// resultMessage = "Success"

// Example: with parent group path
var result = oasConfig.GetTrendPointGroupNames("TagGroupA", "localhost", ref resultMessage);
// result = [ 
//   "NestedTagGroup",
//   ...
// ]
// resultMessage = "Success"

// Example: with invalid group name
var result = oasConfig.GetTrendPointGroupNames("InvalidGroup", "localhost", ref resultMessage);
// resultMessage = "Cannot retrieve Trend Group Names, Group does not exist"

GetTrendPointParameterNames

Gets a list of enabled Trend Point parameters for the given Tag name in the given parent Tag Group.

To set the parent Tag Group as the root, omit the ReferenceGroup parameter or pass an empty string.

This list will include any Tag Parameter name where the Trend Point setting is enabled. This is referring to the tabs you can see in the Tag configuration screen such as:

  • Value
  • HighHighAlarmLimit
  • AlarmStatusHighHigh
  • HighAlarmLimit
  • AlarmStatusHigh
  • LowAlarmLimit
  • AlarmStatusLow
  • LowLowAlarmLimit
  • AlarmStatusLowLow
  • DigitalAlarmLimit
  • AlarmStatusDigital
  • ROCAlarmLimit
  • AlarmStatusROC

Signatures:

public string[] GetTrendPointParameterNames(string TagName)
public string[] GetTrendPointParameterNames(string TagName, string ReferenceGroup)
public string[] GetTrendPointParameterNames(string TagName, string ReferenceGroup, string NetworkNode)
public string[] GetTrendPointParameterNames(string TagName, string ReferenceGroup, string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • TagName (string): The name of the tag
  • ReferenceGroup (string): The tag path of the parent tag group
  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: Return a list of Tag Parameter names for the given Tag and Tag Group where Trend Point is enabled

Example:

var oasConfig = new Config();

// Example: Only the "Value" tab has Trend Point enabled
var result = oasConfig.GetTrendPointParameterNames("TrendTag1");
// result = [
//    "Value"
// ]

// Example: The "Value" and "Digital" (alarm) tabs have Trend Point enabled
var result = oasConfig.GetTrendPointParameterNames("TrendTag1");
// result = [
//    "Value",
//    "DigitalAlarmLimit",
//    "AlarmStatusDigital"
// ]

// Example: No Trend Points enabled
var result = oasConfig.GetTrendPointParameterNames("Tag", "TagGroup");
// result = []

// Example: Invalid Tag path or tag does not exist
var result = oasConfig.GetTrendPointParameterNames("InvalidTag");
// result = []
GetTrendPointTagNames

Gets a list of Tag names in a given parent Tag Group where the Trend Point option is enabled and the Tag is a direct descendants of the given parent Tag Group.

To set the parent Tag Group as the root, omit the ReferenceGroup parameter or pass an empty string.

Signatures:

public string[] GetTrendPointTagNames()
public string[] GetTrendPointTagNames(string ReferenceGroup)
public string[] GetTrendPointTagNames(string ReferenceGroup, string NetworkNode)
public string[] GetTrendPointTagNames(string ReferenceGroup, string NetworkNode, ref string ErrorString)
public string[] GetTrendPointTagNames(string ReferenceGroup, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ReferenceGroup (string): The tag path of the parent tag group
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: Return a list of tag names where the Trend Point option is enabled

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;

// Example: Tag in root Tag Group
var result = oasConfig.GetTrendPointTagNames();
// result = [
//    "TrendTag1"
// ]

// Example: Tag in root Tag Group with network node and result message
var result = oasConfig.GetTrendPointTagNames("", "localhost", ref resultMessage);
// result = [
//    "TrendTag1"
// ]
// resultMessage = "Success"

// Example: Tag in a given parent Tag Group
var result = oasConfig.GetTrendPointTagNames("TagGroupA");
// result = [
//    "TrendTag2"
// ]

// Example: Invalid Tag Group or does not exist
var result = oasConfig.GetTrendPointTagNames("InvalidTagGroup", "localhost", ref resultMessage);
// result = []
// resultMessage = "Cannot retrieve Trend Tag Names, Group does not exist"
ResetTrendXSamples

Clear the buffered trend data for the given Tags.

Signatures:

public void ResetTrendXSamples(string[] TagNames)
public void ResetTrendXSamples(string[] TagNames, string NetworkNode)
public void ResetTrendXSamples(string[] TagNames, string NetworkNode, ref string ErrorString)
public void ResetTrendXSamples(string[] TagNames, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • TagNames (string[]): Tag names
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var result = oasConfig.ResetTrendXSamples(["TrendTag1"]);

UDP Broadcast & Receive

LoadUDPBroadcastConfiguration

Load the given UDP Broadcast configuration file. The filename must end with the extension .UDPBroadcast.

Warning

This will replace the existing runtime configuration

Signatures:

public void LoadUDPBroadcastConfiguration(string ConfigurationFilePath)
public void LoadUDPBroadcastConfiguration(string ConfigurationFilePath, string NetworkNode)
public void LoadUDPBroadcastConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString)
public void LoadUDPBroadcastConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ConfigurationFilePath (string): The file system path of the configuration file
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
oasConfig.LoadUDPBroadcastConfiguration("C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles\\UDPBroadcastConfiguration.UDPBroadcast", "localhost", ref resultMessage);
// resultMessage = "Success"
LoadUDPReceiveConfiguration

Load the given UDP Receive configuration file. The filename must end with the extension .UDPReceive.

Warning

This will replace the existing runtime configuration

Signatures:

public void LoadUDPReceiveConfiguration(string ConfigurationFilePath)
public void LoadUDPReceiveConfiguration(string ConfigurationFilePath, string NetworkNode)
public void LoadUDPReceiveConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString)
public void LoadUDPReceiveConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ConfigurationFilePath (string): The file system path of the configuration file
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;
oasConfig.LoadUDPReceiveConfiguration("C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles\\UDPReceiveConfiguration.UDPReceive", "localhost", ref resultMessage);
// resultMessage = "Success"
SaveUDPBroadcastConfiguration

Save the UDP Broadcast (Unidirectional Network Gateway) configurations.

Requirements:

  • On Windows the path must start with: C:\ProgramData\OpenAutomationSoftware\ConfigFiles\
  • On Linux the path must start with: /oas/ConfigFiles/
  • The file extension must be set to: .UDPBroadcast

Signatures:

public void SaveUDPBroadcastConfiguration(string ConfigurationFilePath)
public void SaveUDPBroadcastConfiguration(string ConfigurationFilePath, string NetworkNode)
public void SaveUDPBroadcastConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString)
public void SaveUDPBroadcastConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ConfigurationFilePath (string): The file system path of the configuration file
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;

// Windows
oasConfig.SaveUDPBroadcastConfiguration("C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles\\UDPBroadcastConfig.UDPBroadcast", "localhost", ref resultMessage);

// Linux
oasConfig.SaveUDPBroadcastConfiguration("/oas/ConfigFiles/UDPBroadcastConfig.UDPBroadcast", "localhost", ref resultMessage);

// resultMessage = "Success"

// Windows incorrect file path or extension example
// ------------------------------------------------
// resultMessage = "File must be saved to C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles directory with file extension .UDPBroadcast"

// Linux incorrect file path or extension example
// ----------------------------------------------
// resultMessage = "File must be saved to /oas/ConfigFiles directory with file extension .UDPBroadcast"
SaveUDPReceiveConfiguration

Save the UDP Receive (Unidirectional Network Gateway) configurations.

Requirements:

  • On Windows the path must start with: C:\ProgramData\OpenAutomationSoftware\ConfigFiles\
  • On Linux the path must start with: /oas/ConfigFiles/
  • The file extension must be set to: .UDPReceive

Signatures:

public void SaveUDPReceiveConfiguration(string ConfigurationFilePath)
public void SaveUDPReceiveConfiguration(string ConfigurationFilePath, string NetworkNode)
public void SaveUDPReceiveConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString)
public void SaveUDPReceiveConfiguration(string ConfigurationFilePath, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • ConfigurationFilePath (string): The file system path of the configuration file
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Example:

var oasConfig = new Config();
var resultMessage = string.Empty;

// Windows
oasConfig.SaveUDPReceiveConfiguration("C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles\\UDPReceiveConfig.UDPReceive", "localhost", ref resultMessage);

// Linux
oasConfig.SaveUDPReceiveConfiguration("/oas/ConfigFiles/UDPReceiveConfig.UDPReceive", "localhost", ref resultMessage);

// resultMessage = "Success"

// Windows incorrect file path or extension example
// ------------------------------------------------
// resultMessage = "File must be saved to C:\\ProgramData\\OpenAutomationSoftware\\ConfigFiles directory with file extension .UDPReceivePBroadcast"

// Linux incorrect file path or extension example
// ----------------------------------------------
// resultMessage = "File must be saved to /oas/ConfigFiles directory with file extension .UDPReceive"
UDPBroadcastCSVExport

Export the UDP Broadcast (Unidirectional Network Gateway) configurations to a list of CSV strings. The first row is the header row as returned by UDPBroadcastCSVHeaderString followed by one row for each UDP Broadcast configuration. The first column is the primary key.

Signatures:

public string[] UDPBroadcastCSVExport()
public string[] UDPBroadcastCSVExport(string NetworkNode)
public string[] UDPBroadcastCSVExport(string NetworkNode, ref string ErrorString)
public string[] UDPBroadcastCSVExport(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: Returns a list of CSV strings

Example:

var oasConfig = new Config();
var result = oasConfig.UDPBroadcastCSVExport();
UDPBroadcastCSVHeaderString

Returns all of the column heading names for the UDP Broadcast configuration CSV export.

Signatures:

public string UDPBroadcastCSVHeaderString()
public string UDPBroadcastCSVHeaderString(string NetworkNode)
public string UDPBroadcastCSVHeaderString(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: A list of all CSV headers for UDP Broadcast configuration export

Example:

var oasConfig = new Config();
var result = oasConfig.UDPBroadcastCSVHeaderString();

// result = "IP Address,Port Number"
UDPBroadcastCSVImport

Import UDP Broadcast (Unidirectional Network Gateway) IP addresses and ports using CSV strings.

The first row should provide the headers IP Address and Port Number.

Following the header row should be one or more rows containing IP and port pairs representing UDP receivers.

If an IP address and port pair don't already exist it will be added, otherwise it will be ignored.

Info

The UPDBroadcastCSVImport API call does not currently support updating other UDP Broadcast parameters using the Dotnet SDK. You can update these through the Configure OAS application or the REST API.

Signatures:

public string UDPBroadcastCSVImport(string[] CSVStrings)
public string UDPBroadcastCSVImport(string[] CSVStrings, string NetworkNode)
public string UDPBroadcastCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString)
public string UDPBroadcastCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • CSVStrings (string[]): List of CSV rows to import including header row
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: Returns number of IP and port pairs added

Example:

List<string[]> udpBroadcastDestinationRows = [];

udpBroadcastDestinationRows.Add(["IP Address", "Port Number"]);
udpBroadcastDestinationRows.Add(["192.168.1.100", "12345"]);

var udpBroadcastDestinations = udpBroadcastDestinationRows
    .Select(row => string.Join(',', row))
    .ToArray();

var oasConfig = new Config();
var resultMessage = string.Empty;
var result = oasConfig.UDPBroadcastCSVImport(udpBroadcastDestinations, "localhost", ref resultMessage);

// New pair example
// ----------------
// result = "1 IP Addresses and Client Ports Added"
// resultMessage = "Success"

// Existing pair example
// ---------------------
// result = "0 IP Addresses and Client Ports Added"
// resultMessage = "Success"

// Failure example - missing header fields
// ---------------------------------------
// resultMessage = "No IP Addresses were imported.  IP Address and Port Number columns are required"

// Failure example - bad values
// ----------------------------
// resultMessage = "Errors in Rows:1
//                  0 IP Addresses and Client Ports Added"

UDPReceiveCSVExport

Export the UDP Receive (Unidirectional Network Gateway) configurations to a list of CSV strings. The first row is the header row as returned by UDPReceiveCSVHeaderString followed by one row for each UDP Receive configuration. The first column is the primary key.

Signatures:

public string[] UDPReceiveCSVExport()
public string[] UDPReceiveCSVExport(string NetworkNode)
public string[] UDPReceiveCSVExport(string NetworkNode, ref string ErrorString)
public string[] UDPReceiveCSVExport(string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string[]: Returns a list of CSV strings

Example:

var oasConfig = new Config();
var result = oasConfig.UDPReceiveCSVExport();
UDPReceiveCSVHeaderString

Returns all of the column heading names for the UDP Receive configuration CSV export.

Signatures:

public string UDPReceiveCSVHeaderString()
public string UDPReceiveCSVHeaderString(string NetworkNode)
public string UDPReceiveCSVHeaderString(string NetworkNode, string RemoteSCADAHostingName)

Parameters:

  • NetworkNode (string): OAS node IP or hostname
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: A list of all CSV headers for UDP Receive configuration export

Example:

var oasConfig = new Config();
var result = oasConfig.UDPReceiveCSVHeaderString();

// result = "Port Number"
UDPReceiveCSVImport

Import UDP Receive (Unidirectional Network Gateway) listening ports using CSV strings.

The first row should provide the header Port Number.

Following the header row should be one or more rows containing port numbers representing UDP listening ports.

If a port number doesn't already exist it will be added, otherwise it will be ignored.

Info

The UPDReceiveCSVImport API call does not currently support updating other UDP Receive parameters using the Dotnet SDK. You can update these through the Configure OAS application or the REST API.

Signatures:

public string UDPReceiveCSVImport(string[] CSVStrings)
public string UDPReceiveCSVImport(string[] CSVStrings, string NetworkNode)
public string UDPReceiveCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString)
public string UDPReceiveCSVImport(string[] CSVStrings, string NetworkNode, ref string ErrorString, string RemoteSCADAHostingName)

Parameters:

  • CSVStrings (string[]): List of CSV rows to import including header row
  • NetworkNode (string): OAS node IP or hostname
  • ErrorString (ref string): Error string result
  • RemoteSCADAHostingName (string): Registered Live Data Cloud hosting name

Returns:

  • string: Returns number ports added

Example:

List<string[]> udpReceivePortRows = [];

udpReceivePortRows.Add(["Port Number"]);
udpReceivePortRows.Add(["12345"]);

var udpReceivePorts = udpReceivePortRows
    .Select(row => string.Join(',', row))
    .ToArray();

var oasConfig = new Config();
var resultMessage = string.Empty;
var result = oasConfig.UDPReceiveCSVImport(udpReceivePorts, "localhost", ref resultMessage);

// New port example
// ----------------
// result = "1 Port Numbers Added"
// resultMessage = "Success"

// Existing port example
// ---------------------
// result = "0 Port Numbers Added"
// resultMessage = "Success"

// Failure example - missing header fields
// ---------------------------------------
// resultMessage = "No Port Numbers were imported.  Port Number column is required"

// Failure example - bad values
// ----------------------------
// resultMessage = "Errors in Rows:1
//                  0 Port Numbers Added"