Loading API Index...
Open Automation Software API Documentation
Show / Hide Table of Contents

Alarm Notification Groups

GetAlarmNotificationNames

  • The GetAlarmNotificationNames Function returns a list of the Alarm Notification 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 networkNode = "";
            string ErrorString = "";
            string[] Groups = null;
            Groups = oasc.GetAlarmNotificationNames(networkNode, ref ErrorString);
            if (ErrorString == "Success")
            {
                foreach (string Group in Groups)
                {
                    Console.WriteLine(Group);
                }
                if (Groups.Length == 0)
                {
                    Console.WriteLine("There are no 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 networkNode As String = ""
            Dim ErrorString As String = ""
            Dim Groups As String() = Nothing
            Groups = oasc.GetAlarmNotificationNames(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 no groups to show")
                End If
            Else
                Console.WriteLine(ErrorString)
            End If
        End Sub
    End Class
End Namespace

AddAlarmNotificationGroup

  • The AddAlarmNotificationGroup Function adds a Alarm Notification Group to the existing Alarm Notification 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 networkNode = "";
            string ErrorString = "";
            string group = "";
            Int32 ResultInt32 = 0;
            ResultInt32 = oasc.AddAlarmNotificationGroup(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 networkNode As String = ""
            Dim ErrorString As String = ""
            Dim group As String = ""
            Dim ResultInt32 As Int32 = 0
            ResultInt32 = oasc.AddAlarmNotificationGroup(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

RemoveAlarmNotificationGroup

  • The RemoveAlarmNotificationGroup Function removes a Alarm Notification Group from the existing Alarm Notification 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 networkNode = "";
            Int32 ResultInt32 = 0;
            string group = "moo";
            string ErrorString = "";
            ResultInt32 = oasc.RemoveAlarmNotificationGroup(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 networkNode As String = ""
            Dim ResultInt32 As Int32 = 0
            Dim group As String = ""
            Dim ErrorString As String = ""
            ResultInt32 = oasc.RemoveAlarmNotificationGroup(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

GetAlarmNotificationParameterStrings

  • The GetAlarmNotificationParameterStrings Function returns an array of Strings containing all property types available for each Alarm Notification Group.
  • Returns Empty String Array if service is not reachable.
  • Returns a String Array of property types for all possible Parameters for a Alarm Notification 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.GetAlarmNotificationParameterStrings(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.GetAlarmNotificationParameterStrings(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

GetAlarmNotification_Parameter_Value

  • The GetAlarmNotification_Parameter_Value Function returns an object value for the Alarm Notification Group and Parameter specified.
  • Returns nothing if service is not reachable.
  • Parameter is a String of the Parameter Type desired of the Alarm Notification Group.
  • Group is a String of the Alarm Notification 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 group = "";
            string parameter = "";
            ResultObject = oasc.GetAlarmNotification_Parameter_Value(parameter, group, networknode, ref ErrorString);
            if (ErrorString == "Success")
            {
                if (ResultObject == null)
                {
                    Console.WriteLine("No value to show");
                }
                else
                {
                    try
                    {
                        Console.WriteLine(ResultObject.ToString());
                    }
                    catch
                    {
                        Console.WriteLine("Error converting value to string.");
                    }
                }
            }
        }
    }
}
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 group As String = ""
            Dim parameter As String = ""
            ResultObject = oasc.GetAlarmNotification_Parameter_Value(parameter, group, networknode, ErrorString)

            If ErrorString = "Success" Then

                If ResultObject Is Nothing Then
                    Console.WriteLine("No value to show")
                Else

                    Try
                        Console.WriteLine(ResultObject.ToString())
                    Catch
                        Console.WriteLine("Error converting value to string.")
                    End Try
                End If
            End If
        End Sub
    End Class
End Namespace

GetAlarmNotification_Parameter_Values

  • The GetAlarmNotification_Parameter_Values Function returns an array of object values for the Alarm Notification Group specified.
  • The order of the array corresponds with the GetAlarmNotificationParameterStrings Function order.
  • Returns empty array if service is not reachable.
  • Group is a String of the Alarm Notification 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 group = "";
            object[] ResultObjects;
            string ResultString;
            string ErrorString = "";
            ResultObjects = oasc.GetAlarmNotification_Parameter_Values(group, networknode, ref ErrorString);
            if (ErrorString == "Success")
            {
                foreach (var ResultObject in ResultObjects)
                {
                    try
                    {
                        if (ResultObjects == null)
                            ResultString = "";
                        else
                            ResultString = ResultObject.ToString();
                            Console.WriteLine(ResultString);
                    }
                    catch
                    {
                        Console.WriteLine("Error Converting Object");
                    }
                }
            }
        }
    }
}
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 group As String = ""
            Dim ResultObjects As Object()
            Dim ResultString As String
            Dim ErrorString As String = ""
            ResultObjects = oasc.GetAlarmNotification_Parameter_Values(group, networknode, ErrorString)

            If ErrorString = "Success" Then

                For Each ResultObject In ResultObjects

                    Try

                        If ResultObjects Is Nothing Then
                            ResultString = ""
                        Else
                            ResultString = ResultObject.ToString()
                        End If

                        Console.WriteLine(ResultString)
                    Catch
                        Console.WriteLine("Error Converting Object")
                    End Try
                Next
            End If
        End Sub
    End Class
End Namespace

SetAlarmNotification_Parameter_Value

  • Sets an object value for the Alarm Notification 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 Notification Group.
  • Value is the desired value to set.
  • Group is a String of the Alarm Notification 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 group = "";
            string param = "";
            string paramvalue = "";
            Int32 ResultInt32;
            string ErrorString = "";
            ResultInt32 = oasc.SetAlarmNotification_Parameter_Value(param, paramvalue, 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()

        Public Shared Sub Main(ByVal args As String())
            Dim networknode As String = ""
            Dim group As String = ""
            Dim param As String = ""
            Dim paramvalue As String = ""
            Dim ResultInt32 As Int32
            Dim ErrorString As String = ""
            ResultInt32 = oasc.SetAlarmNotification_Parameter_Value(param, paramvalue, 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

SaveAlarmNotificationConfiguration

  • The SaveAlarmNotificationConfiguration Subroutine saves the current Alarm Notification 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 path = "";
            string ErrorString = "";
            oasc.SaveAlarmNotificationConfiguration(path, networknode, ref ErrorString);
            if (ErrorString != "Success")
                Console.WriteLine(ErrorString);
            else
                Console.WriteLine("Success");
        }
    }
 }
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 path As String = ""
            Dim ErrorString As String = ""
            oasc.SaveAlarmNotificationConfiguration(path, networknode, ErrorString)
            If ErrorString <> "Success" Then
                Console.WriteLine(ErrorString)
            Else
                Console.WriteLine("Success")
            End If
        End Sub
    End Class
End Namespace

LoadAlarmNotificationConfiguration

  • The LoadAlarmNotificationConfiguration Subroutine saves the current Alarm Notification 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 path = "";
            string ErrorString = "";
            oasc.LoadAlarmNotificationConfiguration(path, networknode, ref ErrorString);
            if (ErrorString != "Success")
                Console.WriteLine(ErrorString);
            else
                Console.WriteLine("Success");
        }
    }
 }
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 path As String = ""
            Dim ErrorString As String = ""
            oasc.LoadAlarmNotificationConfiguration(path, networknode, ErrorString)

            If ErrorString <> "Success" Then
                Console.WriteLine(ErrorString)
            Else
                Console.WriteLine("Success")
            End If
        End Sub
    End Class
End Namespace
Back to top Copyright (c) Open Automation Software. All rights reserved.