|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrix.AbstractMRTrafficController
jmri.jmrix.powerline.SerialTrafficController
public abstract class SerialTrafficController
Converts Stream-based I/O to/from messages. The "SerialInterface" side sends/receives message objects.
The connection to a SerialPortController is via a pair of *Streams, which then carry sequences of characters for transmission. Note that this processing is handled in an independent thread.
This maintains a list of nodes, but doesn't currently do anything with it.
This implementation is complete and can be instantiated, but is not functional. It will be created e.g. when a default object is needed for configuring nodes, etc, during the initial configuration. A subclass must be instantiated to actually communicate with an adapter.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class jmri.jmrix.AbstractMRTrafficController |
|---|
AbstractMRTrafficController.RcvNotifier, AbstractMRTrafficController.XmtNotifier |
| Field Summary | |
|---|---|
protected boolean |
logDebug
|
| Constructor Summary | |
|---|---|
SerialTrafficController()
|
|
| Method Summary | |
|---|---|
void |
addSerialListener(SerialListener l)
|
protected boolean |
endOfMessage(AbstractMRReply msg)
This is a default, null implementation, which must be overridden in an adapter-specific subclass. |
protected AbstractMRMessage |
enterNormalMode()
|
protected AbstractMRMessage |
enterProgMode()
|
protected int |
enterProgModeDelayTime()
|
protected void |
forwardMessage(AbstractMRListener client,
AbstractMRMessage m)
Forward a SerialMessage to all registered SerialInterface listeners. |
protected void |
forwardReply(AbstractMRListener client,
AbstractMRReply r)
Forward a reply to all registered SerialInterface listeners. |
protected void |
forwardToPort(AbstractMRMessage m,
AbstractMRListener reply)
Actually transmits the next message to the port |
SerialSystemConnectionMemo |
getAdapterMemo()
|
int |
getNumberOfIntensitySteps()
Provide the maximum number of dimming steps available. |
SerialSensorManager |
getSensorManager()
|
SerialMessage |
getSerialMessage(int length)
Get a message of a specific length for filling in. |
protected AbstractMRReply |
newReply()
This is a default, null implementation, which must be overridden in an adapter-specific subclass. |
protected AbstractMRMessage |
pollMessage()
Eventually, do initialization if needed |
protected AbstractMRListener |
pollReplyHandler()
|
void |
removeSerialListener(SerialListener l)
|
void |
sendInsteonSequence(InsteonSequence s,
SerialListener l)
Send a sequence of Insteon messages to an adapter. |
void |
sendSerialMessage(SerialMessage m,
SerialListener reply)
Forward a preformatted message to the actual interface. |
void |
sendX10Sequence(X10Sequence s,
SerialListener l)
Send a sequence of X10 messages to an adapter. |
void |
setAdapterMemo(SerialSystemConnectionMemo adaptermemo)
|
void |
setInstance()
Deprecated. |
void |
setSensorManager(SerialSensorManager m)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jmri.jmrix.powerline.SerialInterface |
|---|
status |
| Field Detail |
|---|
protected boolean logDebug
| Constructor Detail |
|---|
public SerialTrafficController()
| Method Detail |
|---|
@Deprecated public void setInstance()
setInstance in class AbstractMRTrafficController
public void sendX10Sequence(X10Sequence s,
SerialListener l)
Makes them into the local messages and then queues in order.
This is a default, null implementation, which must be overridden in an adapter-specific subclass.
public void sendInsteonSequence(InsteonSequence s,
SerialListener l)
Makes them into the local messages and then queues in order.
This is a default, null implementation, which must be overridden in an adapter-specific subclass.
public int getNumberOfIntensitySteps()
public SerialMessage getSerialMessage(int length)
This is a default, null implementation, which must be overridden in an adapter-specific subclass.
public void addSerialListener(SerialListener l)
addSerialListener in interface SerialInterfacepublic void removeSerialListener(SerialListener l)
removeSerialListener in interface SerialInterfaceprotected int enterProgModeDelayTime()
enterProgModeDelayTime in class AbstractMRTrafficController
protected void forwardMessage(AbstractMRListener client,
AbstractMRMessage m)
forwardMessage in class AbstractMRTrafficController
protected void forwardReply(AbstractMRListener client,
AbstractMRReply r)
forwardReply in class AbstractMRTrafficControllerpublic void setSensorManager(SerialSensorManager m)
public SerialSensorManager getSensorManager()
protected AbstractMRMessage pollMessage()
pollMessage in class AbstractMRTrafficControllerprotected AbstractMRListener pollReplyHandler()
pollReplyHandler in class AbstractMRTrafficController
public void sendSerialMessage(SerialMessage m,
SerialListener reply)
sendSerialMessage in interface SerialInterface
protected void forwardToPort(AbstractMRMessage m,
AbstractMRListener reply)
AbstractMRTrafficController
forwardToPort in class AbstractMRTrafficControllerprotected AbstractMRMessage enterProgMode()
enterProgMode in class AbstractMRTrafficControllerprotected AbstractMRMessage enterNormalMode()
enterNormalMode in class AbstractMRTrafficControllerpublic void setAdapterMemo(SerialSystemConnectionMemo adaptermemo)
public SerialSystemConnectionMemo getAdapterMemo()
protected boolean endOfMessage(AbstractMRReply msg)
This is a default, null implementation, which must be overridden in an adapter-specific subclass.
endOfMessage in class AbstractMRTrafficControllerprotected AbstractMRReply newReply()
This is a default, null implementation, which must be overridden in an adapter-specific subclass.
newReply in class AbstractMRTrafficController
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||