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

Driver Interfaces

GetDriverInterfaceNames

  • The GetDriverInterfaceNames Function returns a list of the Driver Interfaces.
  • 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.
  • ErrorString will be set to Success when function is successful and an error message when in error.
  • RemoteSCADAHostingName is the name of the Live Data Cloud OAS Service to connect to.
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;
            Groups = oasc.GetDriverInterfaceNames(networknode, ref ErrorString);
            if (ErrorString == "Success")
            {
                foreach (var Group in Groups)
                    Console.WriteLine(Group);
            }
            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 ErrorString As String = ""
            Dim Groups As String()
            Groups = oasc.GetDriverInterfaceNames(networknode, ErrorString)

            If ErrorString = "Success" Then

                For Each Group In Groups
                    Console.WriteLine(Group)
                Next
            Else
                Console.WriteLine(ErrorString)
            End If
        End Sub
    End Class
End Namespace

GetRepRemoveDriverInterfaceortNames

  • The RemoveDriverInterface Function removes a Driver Interface Group from the existing Driver Interface configuration.
  • Returns -1 if service is not reachable.
  • Returns 1 if successful.
  • Returns 0 if the Driver Interface does not exist or removing the Driver Interface failed.
  • Name is the name of the Driver Interface to remove.
  • NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
  • ErrorString will be set to Success when function is successful and an error message when in error.
  • RemoteSCADAHostingName is the name of the Live Data Cloud OAS Service to connect to.
C#
using System;

namespace OASDataSample
{
    class Program
    {
        static OASConfig.Config oasc = new OASConfig.Config();
        static void Main(string[] args)
        {
            string networknode = "";
            string ErrorString = "";
            Int32 ResultInt32;
            string driver = "";
            ResultInt32 = oasc.RemoveDriverInterface(driver, networknode, ref ErrorString);
            if (ResultInt32 == -1)
                Console.WriteLine("OAS Service not reached.");
            else if (ResultInt32 == 1)
                Console.WriteLine("Driver Interface successfully removed.");
            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 ErrorString As String = ""
            Dim ResultInt32 As Int32
            Dim driver As String = ""
            ResultInt32 = oasc.RemoveDriverInterface(driver, networknode, ErrorString)

            If ResultInt32 = -1 Then
                Console.WriteLine("OAS Service not reached.")
            ElseIf ResultInt32 = 1 Then
                Console.WriteLine("Driver Interface successfully removed.")
            Else
                Console.WriteLine(ErrorString)
            End If
        End Sub
    End Class
End Namespace

GetDriverInterfaceParameterStrings

  • The GetDriverInterfaceParameterStrings Function returns an array of Strings containing all property types available for each Driver Interface Group.
  • Returns Empty String Array if service is not reachable.
  • Returns a String Array of property types for all possible Parameters for a Driver Interface Group.
  • 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.
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.GetDriverInterfaceParameterStrings(networknode);
            foreach (string Parameter in Parameters)
                Console.WriteLine(Parameter);
        }
    }
}
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 Parameters As String() = Nothing
            Parameters = oasc.GetDriverInterfaceParameterStrings(networknode)

            For Each Parameter As String In Parameters
                Console.WriteLine(Parameter)
            Next
        End Sub
    End Class
End Namespace

GetDriverInterface_Parameter_Value

  • The GetDriverInterface_Parameter_Value Function returns an object value for the Driver Interface Group and Parameter specified.
  • Returns nothing if service is not reachable.
  • Parameter is a String of the Parameter Type desired of the Driver Interface Group.
  • Name is a String of the Driver Interface Group desired.
  • NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
  • ErrorString will be set to Success when function is successful and an error message when in error.
  • RemoteSCADAHostingName is the name of the Live Data Cloud OAS Service to connect to.
C#
using System;

namespace OASDataSample
{
    class Program
    {
        static OASConfig.Config oasc = new OASConfig.Config();
        static void Main(string[] args)
        {
            string networknode = "";
            object ResultObject;
            string ErrorString = "";
            string parameter = "";
            string driver = "";
            ResultObject = oasc.GetDriverInterface_Parameter_Value(parameter, driver, networknode, ref ErrorString);
            if (ErrorString == "Success")
            {
                try
                {
                    Console.WriteLine(ResultObject);
                }
                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()

        Private Shared Sub Main(ByVal args As String())
            Dim networknode As String = ""
            Dim ResultObject As Object
            Dim ErrorString As String = ""
            Dim parameter As String = ""
            Dim driver As String = ""
            ResultObject = oasc.GetDriverInterface_Parameter_Value(parameter, driver, networknode, ErrorString)

            If ErrorString = "Success" Then

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

SetDriverInterface_Parameter_Value

  • The SetDriverInterface_Parameter_Value Function sets an object value for the Driver Interface Group and Parameter specified.
  • If the Driver Interface specified does not exist it will be added.
  • Returns -1 if service is not reachable.
  • Returns 0 if 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 Driver Interface Group.
  • Value is the desired value to set.
  • Name is a String of the Driver Interface Group desired.
  • NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
  • ErrorString will be set to Success when function is successful and an error message when in error.
  • RemoteSCADAHostingName is the name of the Live Data Cloud OAS Service to connect to.
C#
using System;

namespace OASDataSample
{
    class Program
    {
        static OASConfig.Config oasc = new OASConfig.Config();
        static void Main(string[] args)
        {
            string networknode = "";
            string driver = "";
            string param = "";
            string value = "";
            Int32 ResultInt32;
            string ErrorString = "";

            ResultInt32 = oasc.SetDriverInterface_Parameter_Value(param, value, driver, 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 driver As String = ""
            Dim param As String = ""
            Dim value As String = ""
            Dim ResultInt32 As Int32
            Dim ErrorString As String = ""
            ResultInt32 = oasc.SetDriverInterface_Parameter_Value(param, value, driver, 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
Back to top Copyright (c) Open Automation Software. All rights reserved.