Alarm Logging Groups
GetAlarmLoggingNames
- The GetAlarmLoggingNames Function returns a list of the Alarm Logging Groups.
- Returns Empty String Array if service is not reachable.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string[] Groups = null;
string ErrorString = "";
string networkNode = "";
Groups = oasc.GetAlarmLoggingNames(networkNode, ref ErrorString);
if (ErrorString == "Success")
{
foreach (string Group in Groups)
{
Console.WriteLine(Group);
}
if (Groups.Length == 0)
{
Console.WriteLine("There are groups to show.");
}
}
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())
Dim Groups As String() = Nothing
Dim ErrorString As String = ""
Dim networkNode As String = ""
Groups = oasc.GetAlarmLoggingNames(networkNode, ErrorString)
If ErrorString = "Success" Then
For Each Group As String In Groups
Console.WriteLine(Group)
Next
If Groups.Length = 0 Then
Console.WriteLine("There are groups to show.")
End If
Else
Console.WriteLine(ErrorString)
End If
End Sub
End Class
End Namespace
AddAlarmLoggingGroup
- The AddAlarmLoggingGroup Function adds a Alarm Logging Group to the existing Alarm Logging configuration.
- Returns -1 if service is not reachable.
- Returns 1 if successful.
- Returns 0 if the Group already exists or adding the Group failed.
- Group is the name of the Group to add.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string ErrorString = "";
string networkNode = "";
Int32 ResultInt32 = 0;
string group = "";
ResultInt32 = oasc.AddAlarmLoggingGroup(group, networkNode, ref ErrorString);
if (ResultInt32 == -1)
{
Console.WriteLine("OAS Service not reached.");
}
else if (ResultInt32 == 1)
{
Console.WriteLine("Group successfully added.");
}
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())
Dim ErrorString As String = ""
Dim networkNode As String = ""
Dim ResultInt32 As Int32 = 0
Dim group As String = ""
ResultInt32 = oasc.AddAlarmLoggingGroup(group, networkNode, ErrorString)
If ResultInt32 = -1 Then
Console.WriteLine("OAS Service not reached.")
ElseIf ResultInt32 = 1 Then
Console.WriteLine("Group successfully added.")
Else
Console.WriteLine(ErrorString)
End If
End Sub
End Class
End Namespace
RemoveAlarmLoggingGroup
- The RemoveAlarmLoggingGroup Function removes a Alarm Logging Group from the existing Alarm Logging configuration.
- Returns -1 if service is not reachable.
- Returns 1 if successful.
- Returns 0 if the Group does not exist or removing the Group failed.
- Group is the name of the Group to remove.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string ErrorString = "";
string networkNode = "";
string group = "";
Int32 ResultInt32 = 0;
ResultInt32 = oasc.RemoveAlarmLoggingGroup(group, networkNode, ref ErrorString);
if (ResultInt32 == -1)
{
Console.WriteLine("OAS Service not reached.");
}
else if (ResultInt32 == 1)
{
Console.WriteLine("Group successfully removed.");
}
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())
Dim ErrorString As String = ""
Dim networkNo de As String = ""
Dim group As String = ""
Dim ResultInt32 As Int32 = 0
ResultInt32 = oasc.RemoveAlarmLoggingGroup(group, networkNode, ErrorString)
If ResultInt32 = -1 Then
Console.WriteLine("OAS Service not reached.")
ElseIf ResultInt32 = 1 Then
Console.WriteLine("Group successfully removed.")
Else
Console.WriteLine(ErrorString)
End If
End Sub
End Class
End Namespace
GetAlarmLoggingParameterStrings
- The GetAlarmLoggingParameterStrings Function returns an array of Strings containing all property types available for each Alarm Logging Group.
- Returns Empty String Array if service is not reachable.
- Returns a String Array of property types for all possible Parameters for a Alarm Logging Group.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networkNode = "";
string[] Parameters = null;
Parameters = oasc.GetAlarmLoggingParameterStrings(networkNode);
foreach (string Parameter in Parameters)
{
Console.WriteLine(Parameter);
}
if (Parameters.Length == 0)
{
Console.WriteLine("There are no parameters to show.");
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
Dim networkNode As String = ""
Dim Parameters As String() = Nothing
Parameters = oasc.GetAlarmLoggingParameterStrings(networkNode)
For Each Parameter As String In Parameters
Console.WriteLine(Parameter)
Next
If Parameters.Length = 0 Then
Console.WriteLine("There are no parameters to show.")
End If
End Sub
End Class
End Namespace
GetAlarmLogging_Parameter_Value
- The GetAlarmLogging_Parameter_Value Function returns an object value for the Alarm Logging Group and Parameter specified.
- Returns nothing if service is not reachable. ‘ Parameter is a String of the Parameter Type desired of the Alarm Logging Group.
- Group is a String of the Alarm Logging Group desired.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networkNode = "";
object ResultObject = null;
string ErrorString = "";
string loggingGroup = "";
string parameter = "";
ResultObject = oasc.GetAlarmLogging_Parameter_Value(parameter, loggingGroup, networkNode, ref ErrorString);
if (ErrorString == "Success")
{
if (ResultObject == null)
{
Console.WriteLine("No result to show.");
}
else
{
try
{
Console.WriteLine(ResultObject.ToString());
}
catch
{
Console.WriteLine("Error converting value to string.");
}
}
}
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())
Dim networkNode As String = ""
Dim ResultObject As Object = Nothing
Dim ErrorString As String = ""
Dim loggingGroup As String = ""
Dim parameter As String = ""
ResultObject = oasc.GetAlarmLogging_Parameter_Value(parameter, loggingGroup, networkNode, ErrorString)
If ErrorString = "Success" Then
If ResultObject Is Nothing Then
Console.WriteLine("No result to show.")
Else
Try
Console.WriteLine(ResultObject.ToString())
Catch
Console.WriteLine("Error converting value to string.")
End Try
End If
Else
Console.WriteLine(ErrorString)
End If
End Sub
End Class
End Namespace
GetAlarmLogging_Parameter_Values
- The GetAlarmLogging_Parameter_Values Function returns an array of object values for the Alarm Logging Group specified.
- The order of the array corresponds with the GetAlarmLoggingParameterStrings Function order.
- Returns empty array if service is not reachable.
- Group is a String of the Alarm Logging Group desired.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networkNode = "";
string ErrorString = "";
object[] ResultObjects = null;
string ResultString = null;
string group = "";
ResultObjects = oasc.GetAlarmLogging_Parameter_Values(group, networkNode, ref ErrorString);
if (ErrorString == "Success")
{
foreach (object ResultObject in ResultObjects)
{
try
{
if (ResultObject == null)
{
ResultString = "";
}
else
{
ResultString = ResultObject.ToString();
}
Console.WriteLine(ResultString);
}
catch
{
Console.WriteLine("Error Converting Object");
}
}
if (ResultObjects.Length == 0)
{
Console.WriteLine("No results to show");
}
}
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())
Dim networkNode As String = ""
Dim ErrorString As String = ""
Dim ResultObjects As Object() = Nothing
Dim ResultString As String = Nothing
Dim group As String = "TestMe"
ResultObjects = oasc.GetAlarmLogging_Parameter_Values(group, networkNode, ErrorString)
If ErrorString = "Success" Then
For Each ResultObject As Object In ResultObjects
Try
If ResultObject Is Nothing Then
ResultString = ""
Else
ResultString = ResultObject.ToString()
End If
Console.WriteLine(ResultString)
Catch
Console.WriteLine("Error Converting Object")
End Try
Next
If ResultObjects.Length = 0 Then
Console.WriteLine("No results to show")
End If
Else
Console.WriteLine(ErrorString)
End If
End Sub
End Class
End Namespace
SetAlarmLogging_Parameter_Value
SetAlarmLogging_Parameter_Value
- The SetAlarmLogging_Parameter_Value Function sets an object value for the Alarm Logging Group and Parameter specified.
- Returns -1 if service is not reachable.
- Returns 0 if the Group does not exist or the value did not get set correctly.
- Returns 1 if the function was successful.
- Parameter is a String of the Parameter Type desired of the Alarm Logging Group.
- Value is the desired value to set.
- Group is a String of the Alarm Logging Group desired.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networkNode = "";
Int32 ResultInt32 = 0;
string ErrorString = "";
string parameterName = "";
object valueToSet = null;
string group = "";
ResultInt32 = oasc.SetAlarmLogging_Parameter_Value(parameterName, valueToSet, group, networkNode, ref ErrorString);
if (ResultInt32 == -1)
{
Console.WriteLine("OAS Service not reached.");
}
else if (ResultInt32 == 1)
{
Console.WriteLine("Parameter Successfully Updated.");
}
else
{
Console.WriteLine(ErrorString);
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Private Shared Sub Main(ByVal args As String())
Dim networkNode As String = ""
Dim ResultInt32 As Int32 = 0
Dim ErrorString As String = ""
Dim parameterName As String = ""
Dim valueToSet As Object = null
Dim group As String = ""
ResultInt32 = oasc.SetAlarmLogging_Parameter_Value(parameterName, valueToSet, group, networkNode, ErrorString)
If ResultInt32 = -1 Then
Console.WriteLine("OAS Service not reached.")
ElseIf ResultInt32 = 1 Then
Console.WriteLine("Parameter Successfully Updated.")
Else
Console.WriteLine(ErrorString)
End If
End Sub
End Class
End Namespace
SaveAlarmLoggingConfiguration
- The SaveAlarmLoggingConfiguration Subroutine saves the current Alarm Logging configuration to the specified file path.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networkNode = "";
string ErrorString = "";
string filePath = @"";
oasc.SaveAlarmLoggingConfiguration(filePath, networkNode, ref ErrorString);
if (ErrorString != "Success")
{
Console.WriteLine(ErrorString);
}
else
{
Console.WriteLine("File successfully saved.");
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
Dim networkNode As String = ""
Dim ErrorString As String = ""
Dim filePath As String = ""
oasc.SaveAlarmLoggingConfiguration(filePath, networkNode, ErrorString)
If ErrorString <> "Success" Then
Console.WriteLine(ErrorString)
Else
Console.WriteLine("File successfully saved.")
End If
End Sub
End Class
End Namespace
GetAlarmLogLoadAlarmLoggingConfigurationging_Parameter_Value
- The LoadAlarmLoggingConfiguration Subroutine saves the current Alarm Logging configuration to the specified file path.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networkNode = "";
string filePath = @"";
string ErrorString = "";
oasc.LoadAlarmLoggingConfiguration(filePath, networkNode, ref ErrorString);
if (ErrorString != "Success")
{
Console.WriteLine(ErrorString);
}
else
{
Console.WriteLine("File Successfully Loaded");
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
Dim networkNode As String = ""
Dim filePath As String = ""
Dim ErrorString As String = ""
oasc.LoadAlarmLoggingConfiguration(filePath, networkNode, ErrorString)
If ErrorString <> "Success" Then
Console.WriteLine(ErrorString)
Else
Console.WriteLine("File Successfully Loaded")
End If
End Sub
End Class
End Namespace