Package jmri.jmrit.z21server
Class Service40
- java.lang.Object
-
- jmri.jmrit.z21server.Service40
-
public class Service40 extends java.lang.Object
Handle X-BUS Protokoll (header type 0x40). Only function to handle a loco throttle have been implemented.
-
-
Constructor Summary
Constructors Constructor Description Service40()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
handleService(byte[] data, java.net.InetAddress clientAddress)
Handle a X-Bus command.static void
setChangeListener(java.beans.PropertyChangeListener cl)
Set a listener to be called on track power manager events.
-
-
-
Constructor Detail
-
Service40
public Service40()
-
-
Method Detail
-
setChangeListener
public static void setChangeListener(java.beans.PropertyChangeListener cl)
Set a listener to be called on track power manager events. The listener is called with the Z21 LAN_X_BC_TRACK_POWER_ON/OFF packet to be sent to the client. Note that throttle changes are handled in the AppClient class.- Parameters:
cl
- - listener class
-
handleService
public static byte[] handleService(byte[] data, java.net.InetAddress clientAddress)
Handle a X-Bus command.- Parameters:
data
- - the Z21 packet bytes without data length and header.clientAddress
- - the sending client's InetAddress- Returns:
- a response packet to be sent to the client or null if nothing is to sent (yet).
-
-