|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrix.loconet.locomon.Llnmon
public class Llnmon
A utility class for formatting LocoNet packets into human-readable text.
Much of this file is a Java-recoding of the display.c file from the llnmon package of John Jabour. Some of the conversions involve explicit decoding of structs defined in loconet.h in that same package. Those parts are (C) Copyright 2001 Ron W. Auld. Use of these parts is by direct permission of the author.
Most major comment blocks here are quotes from the Digitrax Loconet(r) OPCODE SUMMARY: found in the Loconet(r) Personal Edition 1.
Some of the message formats used in this class are Copyright Digitrax, Inc. and used with permission as part of the JMRI project. That permission does not extend to uses in other software products. If you wish to use this code, algorithm or these message formats outside of JMRI, please contact Digitrax Inc for separate permission.
Note that the formatted strings end in a \n, and may contain more than one line separated by \n. Someday this should be converted to proper Java line handling, but for now it has to be handled in locomon, the sole user of this. (It could be handled by moving the code from locomon into the display member here)
Reverse engineering of OPC_MULTI_SENSE was provided by Al Silverstein, used with permission.
Reverse engineering of the Duplex Group/Password/Channel management was provided by Leo Bicknell with help from B. Milhaupt, used with permission.
| Field Summary | |
|---|---|
protected boolean |
forceHex
Global flag to indicate the message was not fully parsed, so the hex should be included. |
| Constructor Summary | |
|---|---|
Llnmon()
|
|
| Method Summary | |
|---|---|
String |
displayMessage(LocoNetMessage l)
This function creates a string representation of a LocoNet buffer. |
protected String |
format(LocoNetMessage l)
Format the message into a text string. |
static String |
getDeviceNameFromIPLInfo(int manuf,
int type)
|
static String |
getSlaveNameFromIPLInfo(int manuf,
int slaveNum)
|
void |
setLocoNetReporterManager(ReporterManager loconetReporterManager)
|
void |
setLocoNetSensorManager(SensorManager loconetSensorManager)
sets the loconet sensor manager which is used to find sensor "user names" from sensor "system names" |
void |
setLocoNetTurnoutManager(TurnoutManager loconetTurnoutManager)
sets the loconet turnout manager which is used to find turnout "user names" from turnout "system names" |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean forceHex
| Constructor Detail |
|---|
public Llnmon()
| Method Detail |
|---|
protected String format(LocoNetMessage l)
l - Message to parse
public String displayMessage(LocoNetMessage l)
public static String getDeviceNameFromIPLInfo(int manuf,
int type)
public static String getSlaveNameFromIPLInfo(int manuf,
int slaveNum)
public void setLocoNetTurnoutManager(TurnoutManager loconetTurnoutManager)
loconetTurnoutManager - public void setLocoNetSensorManager(SensorManager loconetSensorManager)
loconetSensorManager - public void setLocoNetReporterManager(ReporterManager loconetReporterManager)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||