jmri.jmrit.withrottle
Class DeviceServer
java.lang.Object
jmri.jmrit.withrottle.DeviceServer
- All Implemented Interfaces:
- Runnable, EventListener, ControllerInterface, ThrottleControllerListener
public class DeviceServer
- extends Object
- implements Runnable, ThrottleControllerListener, ControllerInterface
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
newLine
String newLine
in
BufferedReader in
out
PrintStream out
listeners
ArrayList<DeviceListener> listeners
deviceName
String deviceName
deviceUDID
String deviceUDID
throttleController
ThrottleController throttleController
secondThrottleController
ThrottleController secondThrottleController
multiThrottles
Hashtable<Character,MultiThrottle> multiThrottles
isTrackPowerAllowed
final boolean isTrackPowerAllowed
isTurnoutAllowed
final boolean isTurnoutAllowed
isRouteAllowed
final boolean isRouteAllowed
rosterList
List<RosterEntry> rosterList
log
static org.slf4j.Logger log
DeviceServer
DeviceServer(Socket socket,
DeviceManager manager)
run
public void run()
- Specified by:
run in interface Runnable
closeThrottles
public void closeThrottles()
closeSocket
public void closeSocket()
startEKG
public void startEKG()
stopEKG
public void stopEKG()
getUDID
public String getUDID()
getName
public String getName()
getCurrentAddressString
public String getCurrentAddressString()
getWiTVersion
public static String getWiTVersion()
getWebServerPort
public static String getWebServerPort()
sendPacketToDevice
public void sendPacketToDevice(String message)
- Called by various Controllers to send a string message
to a connected device. Appends a newline to the end.
- Specified by:
sendPacketToDevice in interface ControllerInterface
- Parameters:
message - The string to send.
addDeviceListener
public void addDeviceListener(DeviceListener l)
- Add a DeviceListener
- Parameters:
l -
removeDeviceListener
public void removeDeviceListener(DeviceListener l)
- Remove a DeviceListener
- Parameters:
l -
notifyControllerAddressFound
public void notifyControllerAddressFound(ThrottleController TC)
- Specified by:
notifyControllerAddressFound in interface ThrottleControllerListener
notifyControllerAddressReleased
public void notifyControllerAddressReleased(ThrottleController TC)
- Specified by:
notifyControllerAddressReleased in interface ThrottleControllerListener
sendRoster
public String sendRoster()
- Format a package to be sent to the device for roster list selections.
- Returns:
- String containing a formatted list of some of each RosterEntry's info.
Include a header with the length of the string to be received.
Copyright © 1997-2013 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.
Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: