CSV Import and Export
This section describes one of the most efficient methods of configuring an OAS Platform. By importing CSV configuration files, you can quickly configure all Tags, Driver Interfaces, Data Logging, Alarm Logging, Alarm Notifications, Recipes, Reporting, and platform Security. This is much more reliable and faster than manually keying in configurations through the OAS Configuration application. This also allows you to make bulk changes to settings within the CSV file before importing.
All of the following methods have multiple overloads with optional parameters.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection
- RemoteSCADAHostingName is the name of the Live Data Cloud OAS Service to connect to.
- ErrorString will be set to Success when function is successful and an error message when in error.
TagCSVHeaderString
Use this method to retrieve all possiple Tag properties from the OAS server. This header string can be used as the basis of a CSV file to construct all of your Tags.
- Returns a String of comma-separated headings to be used with the TagCSVExport Function
- Returns Empty String if service is not reachable
VB
Dim oasc as New OASConfig.Config()
Dim ResultString As String = oasc.TagCSVHeaderString()
If ResultString = "" Then
Throw New Exception("OAS Service not reached.")
Else
'Parse ResultString
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string ResultString = oasc.TagCSVHeaderString();
if (string.IsNullOrEmpty(ResultString))
{
throw New Exception("OAS Service not reached.")
}
else
{
// Parse ResultString
}
TagCSVExportWithDesiredColumns
- The TagCSVExportWithDesiredColumns Function returns an array of comma-separated Strings, each String representing all attributes of a Tag.
- The DesiredColumns is the properties of each tag to return.
- Returns Empty Array if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim CSVStrings() As String
Dim DesiredColumns(1) As String
DesiredColumns(0) = "Tag"
DesiredColumns(1) = "Value - Value"
Dim ErrorString As String = ""
CSVStrings = oasc.TagCSVExportWithDesiredColumns(DesiredColumns, "localhost", ErrorString)
If ErrorString = "Success" Then
For Each col As String In CSVStrings
Console.WriteLine(col)
Next
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string[] CSVStrings = null;
string[] DesiredColumns = new string[2];
DesiredColumns[0] = "Tag";
DesiredColumns[1] = "Value - Value";
string ErrorString = "";
CSVStrings = oasc.TagCSVExportWithDesiredColumns(DesiredColumns, "localhost", ErrorString);
if (ErrorString == "Success")
{
foreach(string col in CSVStrings)
{
Console.WriteLine(col);
}
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
TagCSVImport
- The TagCSVImport Function is used to import comma-separated strings to the Tag configuration.
- Returns a status String describing the success or failure of the import.
- Returns Empty String if service is not reachable.
- CSVStrings is an array of comma-separated Strings.
- The first String in the passed array must be a header String with the unique heading columns that can be obtained with the TagCSVHeaderString Function.
- Import all or just a few selected columns, but as a minimum the Tag column must be specified.
VB
Dim oasc as New OASConfig.Config()
Dim ResultString As String
Dim CSVStrings(3) As String
CSVStrings(0) = "Tag,Value - Data Type,Value - Value,Value - Source"
CSVStrings(1) = "CSV Import Group.Tag1,Float,1.0,Value"
CSVStrings(2) = "CSV Import Group.Tag2,Float,2.0,Value"
CSVStrings(3) = "CSV Import Group.Tag3,Float,3.0,Value"
Dim ErrorString As String = ""
ResultString = oasc.TagCSVImport(CSVStrings, "localhost", ErrorString)
If ErrorString = "Success" Then
Console.WriteLine("SUCCESS")
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string ResultString = null;
string[] CSVStrings = new string[4];
CSVStrings[0] = "Tag,Value - Data Type,Value - Value,Value - Source";
CSVStrings[1] = "CSV Import Group.Tag1,Float,1.0,Value";
CSVStrings[2] = "CSV Import Group.Tag2,Float,2.0,Value";
CSVStrings[3] = "CSV Import Group.Tag3,Float,3.0,Value";
string ErrorString = "";
ResultString = oasc.TagCSVImport(CSVStrings, "localhost", ref ErrorString);
if (ErrorString == "Success")
{
Console.WriteLine("SUCCESS");
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
DriverInterfaceCSVHeaderString
- The DriverInterfaceCSVHeaderString Function returns a String of comma-separated heading to be used with the DriverInterCSVExport Function.
- Returns Empty String if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim ResultString As String = oasc.DriverInterfaceCSVHeaderString()
If ResultString = "" Then
Throw New Exception("OAS Service not reached.")
Else
'Parse ResultString
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string ResultString = oasc.DriverInterfaceCSVHeaderString();
if (string.IsNullOrEmpty(ResultString))
{
throw New Exception("OAS Service not reached.")
}
else
{
// Parse ResultString
}
DriverInterfaceCSVExport
- The DriverInterfaceCSVExport Function returns an array of comma-separated Strings, each String representing all attributes of a Driver Interface Group.
- This function is to be used in conjuction with the DriverInterfaceCSVHeaderString Function.
- Returns Empty Array if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim CSVStrings() As String
Dim ErrorString As String = ""
CSVStrings = oasc.DriverInterfaceCSVExport("localhost", ErrorString)
If ErrorString = "Success" Then
For Each col As String In CSVStrings
Console.WriteLine(col)
Next
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string[] CSVStrings = null;
string ErrorString = "";
CSVStrings = oasc.DriverInterfaceCSVExport("localhost", ref ErrorString);
if (ErrorString == "Success")
{
foreach(string col in CSVStrings)
{
Console.WriteLine(col);
}
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
DriverInterfaceCSVImport
- The DriverInterfaceCSVImport Function is used to import comma-separated strings to the Driver Interface configuration.
- Returns a status String describing the success or failure of the import.
- Returns Empty String if service is not reachable.
- CSVStrings is an array of comma-separated Strings.
- The first String in the passed array must be a header String with the unique heading columns that can be obtained with the DriverInterfaceCSVHeaderString Function.
- Import all or just a few selected columns, but as a minimum the Logging Group Name column must be specified.
VB
Dim oasc as New OASConfig.Config()
Dim CSVStrings(3) As String
CSVStrings(0) = "Name,Driver,Connection,Simulation,IP Address,TCP Port Number,Modbus Ethernet Type,Serial Port Number,Serial Type,Baud Rate,Data Bits,Parity,Stop Bits,Number Of Retries,Number Of Bad Messages To Offline,Check To Return To Online Rate,AB Logix Processor Type,AB Classic Processor Type,Backplane,Slot,Simulate,Gateway,AB Classic Driver,Transaction Timeout,Connection Timeout,AB CSP TCP Port Number,AB EIP TCP Port Number,Siemens Processor Type,Siemens Rack,Siemens Slot,Last Column"
CSVStrings(1) = "Modbus Driver Interface 01,Modbus,Ethernet,StaticReadWrite,192.168.0.1,502,TCP,1,RTU,9600,8,None,One,3,3,60,ControlLogix,PLC5,1,0,False,False,CSP,250,2500,2222,44818,S7_1500,0,1,Last Column"
CSVStrings(2) = "Modbus Driver Interface 02,Modbus,Ethernet,StaticReadWrite,192.168.0.2,502,TCP,1,RTU,9600,8,None,One,3,3,60,ControlLogix,PLC5,1,0,False,False,CSP,250,2500,2222,44818,S7_1500,0,1,Last Column"
CSVStrings(3) = "Modbus Driver Interface 03,Modbus,Ethernet,StaticReadWrite,192.168.0.3,502,TCP,1,RTU,9600,8,None,One,3,3,60,ControlLogix,PLC5,1,0,False,False,CSP,250,2500,2222,44818,S7_1500,0,1,Last Column"
Dim ErrorString As String = ""
Dim ResultString As String = oasc.DriverInterfaceCSVImport(CSVStrings, "localhost", ErrorString)
If ErrorString = "Success" Then
Console.WriteLine("SUCCESS")
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string[] CSVStrings = new string[4];
CSVStrings[0] = "Name,Driver,Connection,Simulation,IP Address,TCP Port Number,Modbus Ethernet Type,Serial Port Number,Serial Type,Baud Rate,Data Bits,Parity,Stop Bits,Number Of Retries,Number Of Bad Messages To Offline,Check To Return To Online Rate,AB Logix Processor Type,AB Classic Processor Type,Backplane,Slot,Simulate,Gateway,AB Classic Driver,Transaction Timeout,Connection Timeout,AB CSP TCP Port Number,AB EIP TCP Port Number,Siemens Processor Type,Siemens Rack,Siemens Slot,Last Column";
CSVStrings[1] = "Modbus Driver Interface 01,Modbus,Ethernet,StaticReadWrite,192.168.0.1,502,TCP,1,RTU,9600,8,None,One,3,3,60,ControlLogix,PLC5,1,0,False,False,CSP,250,2500,2222,44818,S7_1500,0,1,Last Column";
CSVStrings[2] = "Modbus Driver Interface 02,Modbus,Ethernet,StaticReadWrite,192.168.0.2,502,TCP,1,RTU,9600,8,None,One,3,3,60,ControlLogix,PLC5,1,0,False,False,CSP,250,2500,2222,44818,S7_1500,0,1,Last Column";
CSVStrings[3] = "Modbus Driver Interface 03,Modbus,Ethernet,StaticReadWrite,192.168.0.3,502,TCP,1,RTU,9600,8,None,One,3,3,60,ControlLogix,PLC5,1,0,False,False,CSP,250,2500,2222,44818,S7_1500,0,1,Last Column";
string ErrorString = "";
string ResultString = oasc.DriverInterfaceCSVImport(CSVStrings, "localhost", ref ErrorString);
if (ErrorString == "Success")
{
Console.WriteLine("SUCCESS");
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
DataLoggingCSVHeaderString
- The DataLoggingCSVHeaderString Function returns a String of comma-separated heading to be used with the DataLoggingCSVExport Function.
- Returns Empty String if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim ResultString As String = oasc.DataLoggingCSVHeaderString("localhost")
If ResultString = "" Then
Throw New Exception("OAS Service not reached.")
Else
'Parse ResultString
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string ResultString = oasc.DataLoggingCSVHeaderString("localhost");
if (string.IsNullOrEmpty(ResultString))
{
throw New Exception("OAS Service not reached.")
}
else
{
// Parse ResultString
}
DataLoggingCSVExport
- The DataLoggingCSVExport Function returns an array of comma-separated Strings, each String representing all attributes of a Data Logging Group.
- This function is to be used in conjuction with the DataLoggingCSVHeaderString Function.
- Returns Empty Array if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim ErrorString As String = ""
Dim CSVStrings() As String = oasc.DataLoggingCSVExport("localhost", ErrorString)
If ErrorString = "Success" Then
For Each col As String In CSVStrings
Console.WriteLine(col)
Next
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string ErrorString = "";
string[] CSVStrings = oasc.DataLoggingCSVExport("localhost", ref ErrorString);
if (ErrorString == "Success")
{
foreach(string col in CSVStrings)
{
Console.WriteLine(col);
}
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
DataLoggingCSVImport
- The DataLoggingCSVImport Function is used to import comma-separated strings to the Data Logging configuration.
- Returns a status String describing the success or failure of the import.
- Returns Empty String if service is not reachable.
- CSVStrings is an array of comma-separated Strings.
- The first String in the passed array must be a header String with the unique heading columns that can be obtained with the DataLoggingCSVHeaderString Function.
- Import all or just a few selected columns, but as a minimum the Logging Group Name column must be specified.
VB
Dim oasc as New OASConfig.Config()
Dim CSVStrings(3) As String
Dim ErrorString As String = ""
CSVStrings(0) = "Logging Group Name,Logging Type,Logging Rate,Logging Active"
CSVStrings(1) = "Group1,Continuous,1.0,False"
CSVStrings(2) = "Group2,EventDriven,1.0,False"
CSVStrings(3) = "Group3,SpecificTimeOfDay,1.0,False"
Dim ResultString As String = oasc.DataLoggingCSVImport(CSVStrings, "localhost", ErrorString)
If ErrorString = "Success" Then
Console.WriteLine("SUCCESS")
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string[] CSVStrings = new string[4];
string ErrorString = "";
CSVStrings[0] = "Logging Group Name,Logging Type,Logging Rate,Logging Active";
CSVStrings[1] = "Group1,Continuous,1.0,False";
CSVStrings[2] = "Group2,EventDriven,1.0,False";
CSVStrings[3] = "Group3,SpecificTimeOfDay,1.0,False";
string ResultString = oasc.DataLoggingCSVImport(CSVStrings, "localhost", ref ErrorString);
if (ErrorString == "Success")
{
Console.WriteLine("SUCCESS");
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
GetOptions
Returns two values: (1) a comma separated string of option names; (2) a comma separated string of options values.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
{
string errorString = "";
string networknode = "localhost";
object[] arrOptions = oasc.GetOptions(true, networknode, ref errorString);
if (errorString == "Success")
{
string options = (string)arrOptions[0];
string values = (string)arrOptions[1];
Console.WriteLine(options);
Console.WriteLine(values);
}
else
{
Console.WriteLine(errorString);
}
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
If True Then
Dim errorString As String = ""
Dim networknode As String = "localhost"
Dim arrOptions As Object() = oasc.GetOptions(True, networknode, errorString)
If errorString = "Success" Then
Dim options As String = CStr(arrOptions(0))
Dim values As String = CStr(arrOptions(1))
Console.WriteLine(options)
Console.WriteLine(values)
Else
Console.WriteLine(errorString)
End If
End If
End Sub
End Class
End Namespace
OptionsCSVImport
- Sets the OAS Options found under Configure >> Options.
- The first string is the header of the options to set. The second string is the values.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
{
string errorString = "";
string networknode = "localhost";
string[] CSVStrings = new string[2];
CSVStrings[0] = "Load Default Tag Configuration,Default Tag Configuration File";
CSVStrings[1] = @"1,C:\Tags\DemoTags.Tags";
string resultString = oasc.OptionsCSVImport(CSVStrings, networknode, ref errorString);
if (errorString == "Success")
{
Console.WriteLine(resultString);
}
else
{
Console.WriteLine(errorString);
}
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
If True Then
Dim errorString As String = ""
Dim networknode As String = "localhost"
Dim CSVStrings As String() = New String(1) {}
CSVStrings(0) = "Load Default Tag Configuration,Default Tag Configuration File"
CSVStrings(1) = "1,C:\Tags\DemoTags.Tags"
Dim resultString As String = oasc.OptionsCSVImport(CSVStrings, networknode, errorString)
If errorString = "Success" Then
Console.WriteLine(resultString)
Else
Console.WriteLine(errorString)
End If
End If
End Sub
End Class
End Namespace
AlarmLoggingCSVHeaderString
- The AlarmLoggingCSVHeaderString Function returns a String of comma-separated heading to be used with the AlarmLoggingCSVExport Function.
- Returns Empty String if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim ResultString As String = oasc.AlarmLoggingCSVHeaderString("localhost")
If ResultString = "" Then
Throw New Exception("OAS Service not reached.")
Else
'Parse ResultString
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string ResultString = oasc.AlarmLoggingCSVHeaderString("localhost");
if (string.IsNullOrEmpty(ResultString))
{
throw New Exception("OAS Service not reached.")
}
else
{
// Parse ResultString
}
AlarmLoggingCSVExport
- The AlarmLoggingCSVExport Function returns an array of comma-separated Strings, each String representing all attributes of a Alarm Logging Group.
- This function is to be used in conjuction with the AlarmLoggingCSVHeaderString Function.
- Returns Empty Array if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim ErrorString As String = ""
Dim CSVStrings() As String = oasc.AlarmLoggingCSVExport("localhost", ErrorString)
If ErrorString = "Success" Then
For Each col As String In CSVStrings
Console.WriteLine(col)
Next
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string ErrorString = "";
string[] CSVStrings = oasc.AlarmLoggingCSVExport("localhost", ref ErrorString);
if (ErrorString == "Success")
{
foreach(string col in CSVStrings)
{
Console.WriteLine(col);
}
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
AlarmLoggingCSVImport
- The AlarmLoggingCSVImport Function is used to import comma-separated strings to the Alarm Logging configuration.
- Returns a status String describing the success or failure of the import.
- Returns Empty String if service is not reachable.
- CSVStrings is an array of comma-separated Strings.
- The first String in the passed array must be a header String with the unique heading columns that can be obtained with the AlarmLoggingCSVHeaderString Function.
- Import all or just a few selected columns, but as a minimum the Logging Group Name column must be specified.
VB
Dim oasc as New OASConfig.Config()
Dim CSVStrings(3) As String
Dim ErrorString As String = ""
CSVStrings(0) = "Logging Group Name,Min Priority,Max Priority"
CSVStrings(1) = "Group1,0,1000000"
CSVStrings(2) = "Group2,0,1000000"
CSVStrings(3) = "Group3,0,1000000"
Dim ResultString As String = oasc.AlarmLoggingCSVImport(CSVStrings, "localhost", ErrorString)
If ErrorString = "Success" Then
Console.WriteLine("SUCCESS")
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string[] CSVStrings = new string[4];
string ErrorString = "";
CSVStrings[0] = "Logging Group Name,Min Priority,Max Priority";
CSVStrings[1] = "Group1,0,1000000";
CSVStrings[2] = "Group2,0,1000000";
CSVStrings[3] = "Group3,0,1000000";
stting ResultString = oasc.AlarmLoggingCSVImport(CSVStrings, "localhost", ref ErrorString);
if (ErrorString == "Success")
{
Console.WriteLine("SUCCESS");
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
AlarmNotificationCSVHeaderString
- The AlarmNotificationCSVHeaderString Function returns a String of comma-separated heading to be used with the AlarmNotificationCSVExport Function.
- Returns Empty String if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim ResultString As String = oasc.AlarmNotificationCSVHeaderString("localhost")
If ResultString = "" Then
Throw New Exception("OAS Service not reached.")
Else
'Parse ResultString
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string ResultString = oasc.AlarmNotificationCSVHeaderString();
if (string.IsNullOrEmpty(ResultString))
{
throw New Exception("OAS Service not reached.")
}
else
{
// Parse ResultString
}
AlarmNotificationCSVExport
- The AlarmNotificationCSVExport Function returns an array of comma-separated Strings, each String representing all attributes of a Alarm Notification Group.
- This function is to be used in conjuction with the AlarmNotificationCSVHeaderString Function.
- Returns Empty Array if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim ErrorString As String = ""
Dim CSVStrings() As String = oasc.AlarmNotificationCSVExport("localhost", ErrorString)
If ErrorString = "Success" Then
For Each col As String In CSVStrings
Console.WriteLine(col)
Next
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string ErrorString = "";
string[] CSVStrings = oasc.AlarmNotificationCSVExport("localhost", ref ErrorString);
if (ErrorString == "Success")
{
foreach(string col in CSVStrings)
{
Console.WriteLine(col);
}
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
AlarmNotificationCSVImport
- The AlarmNotificationCSVImport Function is used to import comma-separated strings to the Alarm Notification configuration.
- Returns a status String describing the success or failure of the import.
- Returns Empty String if service is not reachable.
- CSVStrings is an array of comma-separated Strings.
- The first String in the passed array must be a header String with the unique heading columns that can be obtained with the AlarmNotificationCSVHeaderString Function.
- Import all or just a few selected columns, but as a minimum the Notification Group Name column must be specified.
VB
Dim oasc as New OASConfig.Config()
Dim CSVStrings(3) As String
Dim ErrorString As String = ""
CSVStrings(0) = "Notification Group Name,Min Priority,Max Priority"
CSVStrings(1) = "Group1,0,1000000"
CSVStrings(2) = "Group2,0,1000000"
CSVStrings(3) = "Group3,0,1000000"
Dim ResultString as String = oasc.AlarmNotificationCSVImport(CSVStrings, "localhost", ErrorString)
If ErrorString = "Success" Then
Console.WriteLine("SUCCESS")
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string[] CSVStrings = new string[4];
string ErrorString = "";
CSVStrings[0] = "Notification Group Name,Min Priority,Max Priority";
CSVStrings[1] = "Group1,0,1000000";
CSVStrings[2] = "Group2,0,1000000";
CSVStrings[3] = "Group3,0,1000000";
string ResultString = oasc.AlarmNotificationCSVImport(CSVStrings, "localhost", ref ErrorString);
if (ErrorString == "Success")
{
Console.WriteLine("SUCCESS");
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
ReportCSVHeaderString
- The ReportCSVHeaderString Function returns a String of comma-separated heading to be used with the ReportCSVExport Function.
- Returns Empty String if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim ResultString As String = oasc.ReportCSVHeaderString("localhost")
If ResultString = "" Then
Throw New Exception("OAS Service not reached.")
Else
'Parse ResultString
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string ResultString = oasc.ReportCSVHeaderString();
if (string.IsNullOrEmpty(ResultString))
{
throw New Exception("OAS Service not reached.")
}
else
{
// Parse ResultString
}
ReportCSVExport
- The ReportCSVExport Function returns an array of comma-separated Strings, each String representing all attributes of a Alarm Logging Group.
- This function is to be used in conjuction with the ReportCSVHeaderString Function.
- Returns Empty Array if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim ErrorString As String = ""
Dim CSVStrings() As String = oasc.ReportCSVExport("localhost", ErrorString)
If ErrorString = "Success" Then
For Each col As String In CSVStrings
Console.WriteLine(col)
Next
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string ErrorString = "";
string[] CSVStrings = oasc.ReportCSVExport("localhost", ref ErrorString);
if (ErrorString == "Success")
{
foreach(string col in CSVStrings)
{
Console.WriteLine(col);
}
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
ReportCSVImport
- The ReportCSVImport Function is used to import comma-separated strings to the Alarm Logging configuration.
- Returns a status String describing the success or failure of the import.
- Returns Empty String if service is not reachable.
- CSVStrings is an array of comma-separated Strings.
- The first String in the passed array must be a header String with the unique heading columns that can be obtained with the ReportCSVHeaderString Function.
- Import all or just a few selected columns, but as a minimum the Logging Group Name column must be specified.
VB
Dim oasc as New OASConfig.Config()
Dim CSVStrings(3) As String
Dim ErrorString As String = ""
CSVStrings(0) = "Report Name,Output Type"
CSVStrings(1) = "Report1,Excel"
CSVStrings(2) = "Report2,HTML_Plain"
CSVStrings(3) = "Report3,PDF_SystemFonts"
Dim ResultString as String = oasc.ReportCSVImport(CSVStrings, "localhost", ErrorString)
If ErrorString = "Success" Then
Console.WriteLine("SUCCESS")
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string[] CSVStrings = new string[4];
string ErrorString = "";
CSVStrings[0] = "Report Name,Output Type";
CSVStrings[1] = "Report1,Excel";
CSVStrings[2] = "Report2,HTML_Plain";
CSVStrings[3] = "Report3,PDF_SystemFonts";
string ResultString = oasc.ReportCSVImport(CSVStrings, "localhost", ref ErrorString);
if (ErrorString == "Success")
{
Console.WriteLine("SUCCESS");
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
RecipeCSVHeaderString
- The RecipeCSVHeaderString Function returns a String of comma-separated heading to be used with the RecipeCSVExport Function.
- Returns Empty String if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim ResultString As String = oasc.RecipeCSVHeaderString("localhost")
If ResultString = "" Then
Throw New Exception("OAS Service not reached.")
Else
'Parse ResultString
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string ResultString = oasc.RecipeCSVHeaderString();
if (string.IsNullOrEmpty(ResultString))
{
throw New Exception("OAS Service not reached.")
}
else
{
// Parse ResultString
}
RecipeCSVExport
- The RecipeCSVExport Function returns an array of comma-separated Strings, each String representing all attributes of a Alarm Logging Group.
- This function is to be used in conjuction with the RecipeCSVHeaderString Function.
- Returns Empty Array if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim ErrorString As String = ""
Dim CSVStrings() As String = oasc.RecipeCSVExport("localhost", ErrorString)
If ErrorString = "Success" Then
For Each col As String In CSVStrings
Console.WriteLine(col)
Next
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string ErrorString = "";
string[] CSVStrings = oasc.RecipeCSVExport("localhost", ref ErrorString);
if (ErrorString == "Success")
{
foreach(string col in CSVStrings)
{
Console.WriteLine(col);
}
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
RecipeCSVImport
- The RecipeCSVImport Function is used to import comma-separated strings to the Alarm Logging configuration.
- Returns a status String describing the success or failure of the import.
- Returns Empty String if service is not reachable.
- CSVStrings is an array of comma-separated Strings.
- The first String in the passed array must be a header String with the unique heading columns that can be obtained with the RecipeCSVHeaderString Function.
- Import all or just a few selected columns, but as a minimum the Logging Group Name column must be specified.
VB
Dim oasc as New OASConfig.Config()
Dim ResultString As String
Dim CSVStrings(3) As String
Dim ErrorString As String = ""
CSVStrings(0) = "Recipe Name,Recipe Type"
CSVStrings(1) = "Recipe1,MultipleRecords"
CSVStrings(2) = "Recipe2,SingleRecord"
CSVStrings(3) = "Recipe3,Queued"
ResultString = oasc.RecipeCSVImport(CSVStrings, "localhost", ErrorString)
If ErrorString = "Success" Then
Console.WriteLine("SUCCESS")
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string[] CSVStrings = new string[4];
string ErrorString = "";
CSVStrings[0] = "Recipe Name,Recipe Type";
CSVStrings[1] = "Recipe1,MultipleRecords";
CSVStrings[2] = "Recipe2,SingleRecord";
CSVStrings[3] = "Recipe3,Queued";
string ResultString = oasc.RecipeCSVImport(CSVStrings, "localhost", ref ErrorString);
if (ErrorString == "Success")
{
Console.WriteLine("SUCCESS");
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
SecurityCSVHeaderString
- The SecurityCSVHeaderString Function returns a String of comma-separated heading to be used with the SecurityCSVExport Function.
- Returns Empty String if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim ResultString As String = oasc.SecurityCSVHeaderString("localhost")
If ResultString = "" Then
Throw New Exception("OAS Service not reached.")
Else
'Parse ResultString
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string ResultString = oasc.SecurityCSVHeaderString();
if (string.IsNullOrEmpty(ResultString))
{
throw New Exception("OAS Service not reached.")
}
else
{
// Parse ResultString
}
SecurityCSVExport
- The SecurityCSVExport Function returns an array of comma-separated Strings, each String representing all attributes of a Alarm Logging Group.
- This function is to be used in conjuction with the SecurityCSVHeaderString Function.
- Returns Empty Array if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim ErrorString As String = ""
Dim CSVStrings() As String = oasc.SecurityCSVExport("localhost", ErrorString)
If ErrorString = "Success" Then
For Each col As String In CSVStrings
Console.WriteLine(col)
Next
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string ErrorString = "";
string[] CSVStrings = oasc.SecurityCSVExport("localhost", ref ErrorString);
if (ErrorString == "Success")
{
foreach(string col in CSVStrings)
{
Console.WriteLine(col);
}
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
SecurityCSVImport
- The SecurityCSVImport Function is used to import comma-separated strings to the Alarm Logging configuration.
- Returns a status String describing the success or failure of the import.
- Returns Empty String if service is not reachable.
- CSVStrings is an array of comma-separated Strings.
- The first String in the passed array must be a header String with the unique heading columns that can be obtained with the SecurityCSVHeaderString Function.
- Import all or just a few selected columns, but as a minimum the Logging Group Name column must be specified.
VB
Dim oasc as New OASConfig.Config()
Dim CSVStrings(3) As String
Dim ErrorString As String = ""
CSVStrings(0) = "Group Name,Enable All"
CSVStrings(1) = "Security1,1"
CSVStrings(2) = "Security2,1"
CSVStrings(3) = "Security3,1"
Dim ResultString as String = oas.SecurityCSVImport(CSVStrings, "localhost", ErrorString)
If ErrorString = "Success" Then
Console.WriteLine("SUCCESS")
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string[] CSVStrings = new string[4];
string ErrorString = "";
CSVStrings[0] = "Group Name,Enable All";
CSVStrings[1] = "Security1,1";
CSVStrings[2] = "Security2,1";
CSVStrings[3] = "Security3,1";
string ResultString = oasc.SecurityCSVImport(CSVStrings, "localhost", ref ErrorString);
if (ErrorString == "Success")
{
Console.WriteLine("SUCCESS");
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
SecurityUsersCSVHeaderString
- The SecurityUsersCSVHeaderString Function returns a String of comma-separated heading to be used with the SecurityUsersCSVExport Function.
- Returns Empty String if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim ResultString As String = oasc.SecurityUsersCSVHeaderString("localhost")
If ResultString = "" Then
Throw New Exception("OAS Service not reached.")
Else
'Parse ResultString
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string ResultString = oasc.SecurityUsersCSVHeaderString();
if (string.IsNullOrEmpty(ResultString))
{
throw New Exception("OAS Service not reached.")
}
else
{
// Parse ResultString
}
SecurityUsersCSVExport
- The SecurityUsersCSVExport Function returns an array of comma-separated Strings, each String representing all attributes of a Alarm Logging Group.
- This function is to be used in conjuction with the SecurityUsersCSVHeaderString Function.
- Returns Empty Array if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim ErrorString As String = ""
Dim CSVStrings() As String = oasc.SecurityUsersCSVExport("localhost", ErrorString)
If ErrorString = "Success" Then
For Each col As String In CSVStrings
Console.WriteLine(col)
Next
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string ErrorString = "";
string[] CSVStrings = oasc.SecurityUsersCSVExport("localhost", ref ErrorString);
if (ErrorString == "Success")
{
foreach(string col in CSVStrings)
{
Console.WriteLine(col);
}
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
SecurityUsersCSVImport
- The SecurityUsersCSVImport Function is used to import comma-separated strings to the Alarm Logging configuration.
- Returns a status String describing the success or failure of the import.
- Returns Empty String if service is not reachable.
- CSVStrings is an array of comma-separated Strings.
- The first String in the passed array must be a header String with the unique heading columns that can be obtained with the SecurityUsersCSVHeaderString Function.
- Import all or just a few selected columns, but as a minimum the Logging Group Name column must be specified.
VB
Dim oasc as New OASConfig.Config()
Dim CSVStrings(3) As String
Dim ErrorString As String = ""
CSVStrings(0) = "UserName,Password,Security Group"
CSVStrings(1) = "User1,Password1,Security1"
CSVStrings(2) = "User2,Password2,Security2"
CSVStrings(3) = "User3,Password3,Security3"
Dim ResultString as String = oasc.SecurityUsersCSVImport(CSVStrings, "localhost", ErrorString)
If ErrorString = "Success" Then
Console.WriteLine("SUCCESS")
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string[] CSVStrings = new string[4];
string ErrorString = "";
CSVStrings[0] = "UserName,Password,Security Group";
CSVStrings[1] = "User1,Password1,Security1";
CSVStrings[2] = "User2,Password2,Security2";
CSVStrings[3] = "User3,Password3,Security3";
string ResultString = oasc.SecurityUsersCSVImport(CSVStrings, "localhost", ref ErrorString);
if (ErrorString == "Success")
{
Console.WriteLine("SUCCESS");
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
RemoteSCADAHostingCSVHeaderString
- The RemoteSCADAHostingCSVHeaderString Function returns a String of comma-separated heading to be used with the RemoteSCADAHostingCSVExport Function.
- Returns Empty String if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim ResultString As String = oasc.RemoteSCADAHostingCSVHeaderString()
If ResultString = "" Then
Throw New Exception("OAS Service not reached.")
Else
'Parse ResultString
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string ResultString = oasc.RemoteSCADAHostingCSVHeaderString();
if (string.IsNullOrEmpty(ResultString))
{
throw New Exception("OAS Service not reached.")
}
else
{
// Parse ResultString
}
RemoteSCADAHostingCSVExport
- The RemoteSCADAHostingCSVExport Function returns an array of comma-separated Strings, each String representing all attributes of a Remote SCADA Hosting Group (Live Data Cloud).
- This function is to be used in conjuction with the RemoteSCADAHostingCSVHeaderString Function.
- Returns Empty Array if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim CSVStrings() As String
Dim ErrorString As String = ""
CSVStrings = oasc.RemoteSCADAHostingCSVExport("localhost", ErrorString)
If ErrorString = "Success" Then
For Each col As String In CSVStrings
Console.WriteLine(col)
Next
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string[] CSVStrings = null;
string ErrorString = "";
CSVStrings = oasc.RemoteSCADAHostingCSVExport("localhost", ref ErrorString);
if (ErrorString == "Success")
{
foreach(string col in CSVStrings)
{
Console.WriteLine(col);
}
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
RemoteSCADAHostingCSVImport
- The RemoteSCADAHostingCSVImport Function is used to import comma-separated strings to the Remote SCADA Hosting Group (Live Data Cloud).
- Returns a status String describing the success or failure of the import.
- Returns Empty String if service is not reachable.
- CSVStrings is an array of comma-separated Strings.
- The first String in the passed array must be a header String with the unique heading columns that can be obtained with the RemoteSCADAHostingCSVHeaderString Function.
- Import all or just a few selected columns, but as a minimum the Remote SCADA Hosting Name Name column must be specified.
VB
Dim oasc as New OASConfig.Config()
Dim CSVStrings(3) As String
CSVStrings(0) = "Server Node Name,Remote SCADA Hosting Name,Enable Hosting"
CSVStrings(1) = "LDCServer01,MachineName,1"
CSVStrings(2) = "LDCServer02,MachineName,1"
CSVStrings(3) = "LDCServer03,MachineName,1"
Dim ErrorString As String = ""
Dim ResultString As String = oasc.RemoteSCADAHostingCSVImport(CSVStrings, "localhost", ErrorString)
If ErrorString = "Success" Then
Console.WriteLine("SUCCESS")
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string[] CSVStrings = new string[4];
CSVStrings[0] = "Server Node Name,Remote SCADA Hosting Name,Enable Hosting";
CSVStrings[1] = "LDCServer01,MachineName,1";
CSVStrings[2] = "LDCServer02,MachineName,1";
CSVStrings[3] = "LDCServer03,MachineName,1";
string ErrorString = "";
string ResultString = oasc.RemoteSCADAHostingCSVImport(CSVStrings, "localhost", ref ErrorString);
if (ErrorString == "Success")
{
Console.WriteLine("SUCCESS");
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
AEOPCServersCSVHeaderString
- The AEOPCServersCSVHeaderString Function returns a String of comma-separated heading to be used with the AEOPCServersCSVExport Function.
- Returns Empty String if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim ResultString As String = oasc.AEOPCServersCSVHeaderString()
If ResultString = "" Then
Throw New Exception("OAS Service not reached.")
Else
'Parse ResultString
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string ResultString = oasc.AEOPCServersCSVHeaderString();
if (string.IsNullOrEmpty(ResultString))
{
throw New Exception("OAS Service not reached.")
}
else
{
// Parse ResultString
}
AEOPCServersCSVExport
- The AEOPCServersCSVExport Function returns an array of comma-separated Strings, each String representing all attributes of Alarm and Event Servers that are in the Alarm and Event Servers configuration.
- This function is to be used in conjuction with the AEOPCServersCSVHeaderString Function.
- Returns Empty Array if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim CSVStrings() As String
Dim ErrorString As String = ""
CSVStrings = oasc.AEOPCServersCSVExport("localhost", ErrorString)
If ErrorString = "Success" Then
For Each col As String In CSVStrings
Console.WriteLine(col)
Next
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string[] CSVStrings = null;
string ErrorString = "";
CSVStrings = oasc.AEOPCServersCSVExport("localhost", ref ErrorString);
if (ErrorString == "Success")
{
foreach(string col in CSVStrings)
{
Console.WriteLine(col);
}
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
AEOPCServersCSVImport
- The AEOPCServersCSVImport Function is used to import comma-separated strings to the Alarm and Event OPC Servers configuration.
- Returns a status String describing the success or failure of the import.
- Returns Empty String if service is not reachable.
- CSVStrings is an array of comma-separated Strings.
- The first String in the passed array must be a header String with the unique heading columns that can be obtained with the AEOPCServersCSVHeaderString Function.
- Import all or just a few selected columns, but as a minimum the AE OPC Server column must be specified.
VB
Dim oasc as New OASConfig.Config()
Dim CSVStrings(3) As String
CSVStrings(0) = "AE OPC Server,Classic OPC,OPC UA Server URL"
CSVStrings(1) = "AEOPC01,0,111.111.111.111"
CSVStrings(2) = "AEOPC02,0,111.111.111.111"
CSVStrings(3) = "AEOPC03,0,111.111.111.111"
Dim ErrorString As String = ""
Dim ResultString As String = oasc.AEOPCServersCSVImport(CSVStrings, "localhost", ErrorString)
If ErrorString = "Success" Then
Console.WriteLine("SUCCESS")
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string[] CSVStrings = new string[4];
CSVStrings[0] = "AE OPC Server,Classic OPC,OPC UA Server URL";
CSVStrings[1] = "AEOPC01,0,111.111.111.111";
CSVStrings[2] = "AEOPC02,0,111.111.111.111";
CSVStrings[3] = "AEOPC03,0,111.111.111.111";
string ErrorString = "";
string ResultString = oasc.AEOPCServersCSVImport(CSVStrings, "localhost", ref ErrorString);
if (ErrorString == "Success")
{
Console.WriteLine("SUCCESS");
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
UDPBroadcastCSVHeaderString
- The UDPBroadcastCSVHeaderString Function returns a String of comma-separated heading to be used with the UDPBroadcastCSVExport Function.
- Returns Empty String if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim ResultString As String = oasc.UDPBroadcastCSVHeaderString()
If ResultString = "" Then
Throw New Exception("OAS Service not reached.")
Else
'Parse ResultString
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string ResultString = oasc.UDPBroadcastCSVHeaderString();
if (string.IsNullOrEmpty(ResultString))
{
throw New Exception("OAS Service not reached.")
}
else
{
// Parse ResultString
}
UDPBroadcastCSVExport
- The UDPBroadcastCSVExport Function returns an array of comma-separated Strings, each String representing all attributes of the UDP Broadcast configuration.
- This function is to be used in conjuction with the UDPBroadcastCSVHeaderString Function.
- Returns Empty Array if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim CSVStrings() As String
Dim ErrorString As String = ""
CSVStrings = oasc.UDPBroadcastCSVExport("localhost", ErrorString)
If ErrorString = "Success" Then
For Each col As String In CSVStrings
Console.WriteLine(col)
Next
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string[] CSVStrings = null;
string ErrorString = "";
CSVStrings = oasc.UDPBroadcastCSVExport("localhost", ref ErrorString);
if (ErrorString == "Success")
{
foreach(string col in CSVStrings)
{
Console.WriteLine(col);
}
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
UDPBroadcastCSVImport
- The UDPBroadcastCSVImport Function is used to import comma-separated strings to the UDP Broadcast configuration.
- Returns a status String describing the success or failure of the import.
- Returns Empty String if service is not reachable.
- CSVStrings is an array of comma-separated Strings.
- The first String in the passed array must be a header String with the unique heading columns that can be obtained with the UDPBroadcastCSVHeaderString Function.
- Import all or just a few selected columns, but as a minimum the IP Address and Port Number columns must be specified.
VB
Dim oasc as New OASConfig.Config()
Dim CSVStrings(1) As String
CSVStrings(0) = "IP Address,Port Number"
CSVStrings(1) = "111.111.111.111,50001"
Dim ErrorString As String = ""
Dim ResultString As String = oasc.UDPBroadcastCSVImport(CSVStrings, "localhost", ErrorString)
If ErrorString = "Success" Then
Console.WriteLine("SUCCESS")
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string[] CSVStrings = new string[2];
CSVStrings[0] = "IP Address,Port Number";
CSVStrings[1] = "111.111.111.111,50001";
string ErrorString = "";
string ResultString = oasc.UDPBroadcastCSVImport(CSVStrings, "localhost", ref ErrorString);
if (ErrorString == "Success")
{
Console.WriteLine("SUCCESS");
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
UDPReceiveCSVHeaderString
- The UDPReceiveCSVHeaderString Function returns a String of comma-separated heading to be used with the UDPReceiveCSVExport Function.
- Returns Empty String if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim ResultString As String = oasc.UDPReceiveCSVHeaderString()
If ResultString = "" Then
Throw New Exception("OAS Service not reached.")
Else
'Parse ResultString
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string ResultString = oasc.UDPReceiveCSVHeaderString();
if (string.IsNullOrEmpty(ResultString))
{
throw New Exception("OAS Service not reached.")
}
else
{
// Parse ResultString
}
UDPReceiveCSVExport
- The UDPReceiveCSVExport Function returns an array of comma-separated Strings, each String representing all attributes of the UDP Receive configuration.
- This function is to be used in conjuction with the UDPReceiveCSVHeaderString Function.
- Returns Empty Array if service is not reachable.
VB
Dim oasc as New OASConfig.Config()
Dim CSVStrings() As String
Dim ErrorString As String = ""
CSVStrings = oasc.UDPReceiveCSVExport("localhost", ErrorString)
If ErrorString = "Success" Then
For Each col As String In CSVStrings
Console.WriteLine(col)
Next
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string[] CSVStrings = null;
string ErrorString = "";
CSVStrings = oasc.UDPReceiveCSVExport("localhost", ref ErrorString);
if (ErrorString == "Success")
{
foreach(string col in CSVStrings)
{
Console.WriteLine(col);
}
}
else
{
throw new Exception("ERROR : " + ErrorString);
}
UDPReceiveCSVImport
- The UDPReceiveCSVImport Function is used to import comma-separated strings to the UDP Receive configuration.
- Returns a status String describing the success or failure of the import.
- Returns Empty String if service is not reachable.
- CSVStrings is an array of comma-separated Strings.
- The first String in the passed array must be a header String with the unique heading columns that can be obtained with the UDPReceiveCSVHeaderString Function.
- Import all or just a few selected columns, but as a minimum the Port Number column must be specified.
VB
Dim oasc as New OASConfig.Config()
Dim CSVStrings(1) As String
CSVStrings(0) = "Port Number"
CSVStrings(1) = "50001"
Dim ErrorString As String = ""
Dim ResultString As String = oasc.UDPReceiveCSVImport(CSVStrings, "localhost", ErrorString)
If ErrorString = "Success" Then
Console.WriteLine("SUCCESS")
Else
Throw New Exception("ERROR : " + ErrorString)
End If
C#
OASConfig.Config oasc = new OASConfig.Config();
string[] CSVStrings = new string[2];
CSVStrings[0] = "Port Number";
CSVStrings[1] = "50001";
string ErrorString = "";
string ResultString = oasc.UDPReceiveCSVImport(CSVStrings, "localhost", ref ErrorString);
if (ErrorString == "Success")
{
Console.WriteLine("SUCCESS");
}
else
{
throw new Exception("ERROR : " + ErrorString);
}