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 void
addDevice(LnSimple7thGenDeviceRoutes dev)
void
addDeviceRoutesRoute(java.lang.String devType, int serNum, int baseNum, int[][] turnouts, RouteSwitchPositionEnum[][] positions)
void
dispose()
int
getCountOfDevicesWithRoutes()
LnSimple7thGenDeviceRoutes
getDevice(int i)
java.lang.String
getDevName(int devType)
int
getDevType(java.lang.String deviceName)
LocoNetSystemConnectionMemo
getMemo()
Returns the manager's memo.void
initComponents(LocoNetSystemConnectionMemo c)
Ln7gAccyRoutesManager
initContext(java.lang.Object context)
void
initializeDeviceRoutes()
Update from saved data.boolean
loadTheXML()
void
message(LocoNetMessage m)
Member function that will be invoked by a LocoNetInterface implementation to forward a LocoNet message from the layout.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.java.lang.String
showStoredDevicesWithRoutes()
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:LocoNetListener
Member function that will be invoked by a LocoNetInterface implementation to forward a LocoNet message from the layout.- Specified by:
message
in 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()
-
-