Class Lnsv1Devices

java.lang.Object
jmri.jmrix.loconet.lnsvf1.Lnsv1Devices

public class Lnsv1Devices extends Object
Manage an array of Lnsv1Device items. See Lnsv1DevicesManager Based on Lnsvf2Devices by B. Milhaupt
  • Constructor Details

  • Method Details

    • addDevice

      public boolean addDevice(Lnsv1Device d)
      Add a device that responded to a PROBE_ALL request (or simply sent a READ_ONE reply) to the list of LNSV1 Devices.
      Parameters:
      d - the device object, containing its properties
      Returns:
      true if device was added, false if not e.g. it was already in the list
    • removeAllDevices

      public void removeAllDevices()
    • isDeviceExistant

      public int isDeviceExistant(Lnsv1Device deviceToBeFound)
      Get index in deviceList of the first device matching (only) the Device Address. Where a deviceToBeFound parameter is -1, that parameter is not compared.
      Parameters:
      deviceToBeFound - Device we try to find in known LNSV1 devices list
      Returns:
      index of found device, -1 if matching device not found
    • deviceExists

      public boolean deviceExists(Lnsv1Device d)
    • getDevice

      public Lnsv1Device getDevice(int index)
    • getDevices

      public Lnsv1Device[] getDevices()
    • size

      public int size()