Package com.scriptel.proscript

## Class DeviceManager

- java.lang.Object
- - com.scriptel.proscript.DeviceManager

-     public final class DeviceManager
      extends java.lang.Object

  This class manages ScripTouch devices.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | `destroy()` | Destroy the ProScript library, call this prior to closing your application, do not call anything else in the library after calling this.
    `static Device[]` | `getAttachedDevices()` | This method will return any and all attached ScripTouch devices.
    `static java.lang.String` | `getInitialErrorMessage()` | This message will return a String containing an error message if initialization failed for some reason, such as if one of the required ProScript libraries does not exist.
    `static java.util.Date` | `getLibraryBuildDate()` | Gets the date the library was built.
    `static java.lang.String` | `getLibraryVersion()` | Gets the version of the ProScript library.
    `static int` | `getLibraryVersionMajor()` | Gets the major component of the ProScript library version.
    `static int` | `getLibraryVersionMinor()` | Gets the minor component of the ProScript library version.
    `static int` | `getLibraryVersionRelease()` | Gets the release component of the ProScript library version.
    `static java.util.Date` | `getWrapperBuildDate()` | Gets the date the Java wrapper was built.
    `static java.lang.String` | `getWrapperVersion()` | Gets the version of the Java wrapper.
    `static int` | `getWrapperVersionMajor()` | Gets the major component of the Java wrapper version.
    `static int` | `getWrapperVersionMinor()` | Gets the minor component of the Java wrapper version.
    `static int` | `getWrapperVersionRelease()` | Gets the release component of the Java wrapper version.
    `static void` | `registerDeviceListener​(DeviceNotificationListener listener)` | This method registers a new device listener for added and removed devices.
    `static void` | `registerDeviceListener​(DeviceNotificationListener listener, boolean sendCached)` | This method registers a new device listener for added and removed devices.
    `static void` | `unregisterDeviceListener​(DeviceNotificationListener listener)` | This method unregisters a device listener.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getInitialErrorMessage

          public static java.lang.String getInitialErrorMessage()

      This message will return a String containing an error message if initialization failed for some reason, such as if one of the required ProScript libraries does not exist.
      Returns:
        initialization error message

    - #### getAttachedDevices

          public static Device[] getAttachedDevices()
                                             throws java.io.IOException

      This method will return any and all attached ScripTouch devices.
      Returns:
        List of ScripTouch devices attached to the computer.
      Throws:
        `java.io.IOException` - Thrown in the event of a problem.

    - #### registerDeviceListener

          public static void registerDeviceListener​(DeviceNotificationListener listener)

      This method registers a new device listener for added and removed devices.
      Parameters:
        `listener` - The listener to add.

    - #### registerDeviceListener

          public static void registerDeviceListener​(DeviceNotificationListener listener,
                                                    boolean sendCached)

      This method registers a new device listener for added and removed devices. Do not attempt to register or unregister device listeners within the listener callback.
      Parameters:
        `listener` - The listener to add.
        `sendCached` - Whether or not to send the currently connected devices to the listener upon registration.

    - #### unregisterDeviceListener

          public static void unregisterDeviceListener​(DeviceNotificationListener listener)

      This method unregisters a device listener. Do not attempt to register or unregister a device listener inside of a listener callback.
      Parameters:
        `listener` - Listener to remove.

    - #### destroy

          public static void destroy()

      Destroy the ProScript library, call this prior to closing your application, do not call anything else in the library after calling this.

    - #### getWrapperVersion

          public static java.lang.String getWrapperVersion()

      Gets the version of the Java wrapper.
      Returns:
        Version number of the Java wrapper.

    - #### getWrapperVersionMajor

          public static int getWrapperVersionMajor()

      Gets the major component of the Java wrapper version.
      Returns:
        Major component of the Java wrapper version.

    - #### getWrapperVersionMinor

          public static int getWrapperVersionMinor()

      Gets the minor component of the Java wrapper version.
      Returns:
        Minor component of the Java wrapper version.

    - #### getWrapperVersionRelease

          public static int getWrapperVersionRelease()

      Gets the release component of the Java wrapper version.
      Returns:
        Release component of the Java wrapper version.

    - #### getWrapperBuildDate

          public static java.util.Date getWrapperBuildDate()

      Gets the date the Java wrapper was built.
      Returns:
        Date the Java wrapper was built.

    - #### getLibraryVersion

          public static java.lang.String getLibraryVersion()

      Gets the version of the ProScript library.
      Returns:
        ProScript library version.

    - #### getLibraryVersionMajor

          public static int getLibraryVersionMajor()

      Gets the major component of the ProScript library version.
      Returns:
        Major component of the ProScript library version.

    - #### getLibraryVersionMinor

          public static int getLibraryVersionMinor()

      Gets the minor component of the ProScript library version.
      Returns:
        Minor component of the ProScript library version.

    - #### getLibraryVersionRelease

          public static int getLibraryVersionRelease()

      Gets the release component of the ProScript library version.
      Returns:
        Release component of the ProScript library version.

    - #### getLibraryBuildDate

          public static java.util.Date getLibraryBuildDate()

      Gets the date the library was built.
      Returns:
        The date the ProScript library was built.