Interface GenDriverAPI4Contacts


  • public interface GenDriverAPI4Contacts
    Defines the interface of a digital contacts interface driver.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean connect()
      Connects to the contacts interface.
      void disconnect()
      Disconnects from the contacts interface.
      boolean isConnected()
      Tells if the contacts interface is connected.
      boolean[] readContacts​(java.lang.String functionalProfileName, java.lang.String dataPointName)
      Reads the state of the digital contacts according to a specific functional profile and data point.
      void writeContacts​(java.lang.String functionalProfileName, java.lang.String dataPointName, boolean[] values)
      Writes the state of the digital contacts according to a specific functional profile and data point.
    • Method Detail

      • connect

        boolean connect()
                 throws GenDriverException
        Connects to the contacts interface.
        Returns:
        true if connected, false otherwise
        Throws:
        GenDriverException - when connection failed
      • isConnected

        boolean isConnected()
        Tells if the contacts interface is connected.
        Returns:
        true if connected, false otherwise
      • readContacts

        boolean[] readContacts​(java.lang.String functionalProfileName,
                               java.lang.String dataPointName)
                        throws GenDriverException
        Reads the state of the digital contacts according to a specific functional profile and data point. The number of contacts returned is determined by the driver instance.
        Parameters:
        functionalProfileName - the functional profile name
        dataPointName - the data point name
        Returns:
        an array of boolean
        Throws:
        GenDriverException - when an error occurred
      • writeContacts

        void writeContacts​(java.lang.String functionalProfileName,
                           java.lang.String dataPointName,
                           boolean[] values)
                    throws GenDriverException
        Writes the state of the digital contacts according to a specific functional profile and data point. If the given number of values is less than the driver instance's, only the first n contacts are written.
        Parameters:
        functionalProfileName - the functional profile name
        dataPointName - the data point name
        values - an array of boolean containing the states to write
        Throws:
        GenDriverException - when an error occurred