Package jmri.jmrix.loconet
Class Ln7gAccyRoutesManager
- java.lang.Object
-
- jmri.jmrix.loconet.Ln7gAccyRoutesManager
-
- All Implemented Interfaces:
java.util.EventListener,LocoNetListener
public class Ln7gAccyRoutesManager extends java.lang.Object implements LocoNetListener
-
-
Constructor Summary
Constructors Constructor Description Ln7gAccyRoutesManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDevice(LnSimple7thGenDeviceRoutes dev)voidaddDeviceRoutesRoute(java.lang.String devType, int serNum, int baseNum, int[][] turnouts, RouteSwitchPositionEnum[][] positions)voiddispose()intgetCountOfDevicesWithRoutes()LnSimple7thGenDeviceRoutesgetDevice(int i)java.lang.StringgetDevName(int devType)intgetDevType(java.lang.String deviceName)LocoNetSystemConnectionMemogetMemo()Returns the manager's memo.voidinitComponents(LocoNetSystemConnectionMemo c)Ln7gAccyRoutesManagerinitContext(java.lang.Object context)voidinitializeDeviceRoutes()Update from saved data.booleanloadTheXML()voidmessage(LocoNetMessage m)Member function that will be invoked by a LocoNetInterface implementation to forward a LocoNet message from the layout.voidsaveData(int deviceType, int deviceSerNum, int deviceBaseAddr, int entrySet, int routeNum, int entrya, int entryb, int entryc, int entryd)Save 4 entries of a route.java.lang.StringshowStoredDevicesWithRoutes()Get String which shows all 7th Gen Accy devices which can store routes, with any route data.
-
-
-
Constructor Detail
-
Ln7gAccyRoutesManager
public Ln7gAccyRoutesManager()
-
-
Method Detail
-
initComponents
public void initComponents(LocoNetSystemConnectionMemo c)
-
initContext
public Ln7gAccyRoutesManager initContext(java.lang.Object context)
-
initializeDeviceRoutes
public void initializeDeviceRoutes()
Update from saved data. Read the file of devices/routes.
-
showStoredDevicesWithRoutes
public java.lang.String showStoredDevicesWithRoutes()
Get String which shows all 7th Gen Accy devices which can store routes, with any route data.- Returns:
- string of 7th-gen Accy devices which can have enabled routes
-
getMemo
@Nonnull public LocoNetSystemConnectionMemo getMemo()
Returns the manager's memo.- Returns:
- a LocoNetSystemConnectionMemo
-
message
public void message(LocoNetMessage m)
Description copied from interface:LocoNetListenerMember function that will be invoked by a LocoNetInterface implementation to forward a LocoNet message from the layout.- Specified by:
messagein interfaceLocoNetListener- Parameters:
m- The received LocoNet message. Note that this same object may be presented to multiple users. It should not be modified here.
-
saveData
public void saveData(int deviceType, int deviceSerNum, int deviceBaseAddr, int entrySet, int routeNum, int entrya, int entryb, int entryc, int entryd)
Save 4 entries of a route.- Parameters:
deviceType- Device type numberdeviceSerNum- Device serial numberdeviceBaseAddr- Device base addressentrySet- Entry "set" numberrouteNum- Route numberentrya- Entry Aentryb- Entry Bentryc- Entry Centryd- Entry D
-
getDevName
public java.lang.String getDevName(int devType)
-
getDevType
public int getDevType(java.lang.String deviceName)
-
loadTheXML
public boolean loadTheXML()
-
getCountOfDevicesWithRoutes
public int getCountOfDevicesWithRoutes()
-
addDeviceRoutesRoute
public void addDeviceRoutesRoute(java.lang.String devType, int serNum, int baseNum, int[][] turnouts, RouteSwitchPositionEnum[][] positions)
-
addDevice
public void addDevice(LnSimple7thGenDeviceRoutes dev)
-
getDevice
public LnSimple7thGenDeviceRoutes getDevice(int i)
-
dispose
public void dispose()
-
-