Package jmri.jmrix.loconet.uhlenbrock
Class LncvDevices
- java.lang.Object
-
- jmri.jmrix.loconet.uhlenbrock.LncvDevices
-
public class LncvDevices extends java.lang.Object
Manage an array of LncvDevice items. SeeLncvDevicesManager
Based on Lnsvf2Devices by B. Milhaupt
-
-
Constructor Summary
Constructors Constructor Description LncvDevices()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addDevice(LncvDevice d)
Add a device that responded to a PROG_START request to the list of LNCV Devices.boolean
deviceExists(LncvDevice d)
LncvDevice
getDevice(int index)
LncvDevice[]
getDevices()
int
isDeviceExistant(LncvDevice deviceToBeFound)
Get index of device with matching Mfg, ProdID, Num and Device Address.void
removeAllDevices()
int
size()
-
-
-
Constructor Detail
-
LncvDevices
public LncvDevices()
-
-
Method Detail
-
addDevice
public boolean addDevice(LncvDevice d)
Add a device that responded to a PROG_START request to the list of LNCV Devices.- Parameters:
d
- the device object, containing its properties- Returns:
- true if device was added, false if not eg it was already in the list
-
removeAllDevices
public void removeAllDevices()
-
isDeviceExistant
public int isDeviceExistant(LncvDevice deviceToBeFound)
Get index of device with matching Mfg, ProdID, Num and Device Address. Where a deviceToBeFound parameter is -1, that parameter is not compared.- Parameters:
deviceToBeFound
- Device we try to find in known LNCV devices list- Returns:
- index of found device, else -1 if matching device not found
-
deviceExists
public boolean deviceExists(LncvDevice d)
-
getDevice
public LncvDevice getDevice(int index)
-
getDevices
public LncvDevice[] getDevices()
-
size
public int size()
-
-