jmri.jmrit.withrottle
Class DeviceServer

java.lang.Object
  extended by jmri.jmrit.withrottle.DeviceServer
All Implemented Interfaces:
Runnable, EventListener, ControllerInterface, ThrottleControllerListener

public class DeviceServer
extends Object
implements Runnable, ThrottleControllerListener, ControllerInterface


Method Summary
 void addDeviceListener(DeviceListener l)
          Add a DeviceListener
 void closeSocket()
           
 void closeThrottles()
           
 String getCurrentAddressString()
           
 String getName()
           
 String getUDID()
           
static String getWebServerPort()
           
static String getWiTVersion()
           
 void notifyControllerAddressFound(ThrottleController TC)
           
 void notifyControllerAddressReleased(ThrottleController TC)
           
 void removeDeviceListener(DeviceListener l)
          Remove a DeviceListener
 void run()
           
 void sendPacketToDevice(String message)
          Called by various Controllers to send a string message to a connected device.
 String sendRoster()
          Format a package to be sent to the device for roster list selections.
 void startEKG()
           
 void stopEKG()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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 - 2011 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: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads