Package jmri.jmrix.loconet.lnsvf1
Class Lnsv1Devices
- java.lang.Object
-
- jmri.jmrix.loconet.lnsvf1.Lnsv1Devices
-
public class Lnsv1Devices extends java.lang.Object
Manage an array of Lnsv1Device items. SeeLnsv1DevicesManager
Based on Lnsvf2Devices by B. Milhaupt
-
-
Constructor Summary
Constructors Constructor Description Lnsv1Devices()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.boolean
deviceExists(Lnsv1Device d)
Lnsv1Device
getDevice(int index)
Lnsv1Device[]
getDevices()
int
isDeviceExistant(Lnsv1Device deviceToBeFound)
Get index in deviceList of the first device matching (only) the Device Address.void
removeAllDevices()
int
size()
-
-
-
Constructor Detail
-
Lnsv1Devices
public Lnsv1Devices()
-
-
Method Detail
-
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()
-
-