jmri.jmrix.powerline.cp290
Class SpecificTrafficController

java.lang.Object
  extended by jmri.jmrix.AbstractMRTrafficController
      extended by jmri.jmrix.powerline.SerialTrafficController
          extended by jmri.jmrix.powerline.cp290.SpecificTrafficController
All Implemented Interfaces:
SerialInterface

public class SpecificTrafficController
extends 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.

Author:
Bob Jacobsen Copyright (C) 2001, 2003, 2005, 2006, 2008 Converted to multiple connection, kcameron Copyright (C) 2011

Nested Class Summary
 
Nested classes/interfaces inherited from class jmri.jmrix.AbstractMRTrafficController
AbstractMRTrafficController.RcvNotifier, AbstractMRTrafficController.XmtNotifier
 
Field Summary
 
Fields inherited from class jmri.jmrix.powerline.SerialTrafficController
logDebug
 
Fields inherited from class jmri.jmrix.AbstractMRTrafficController
allowUnexpectedReply, AUTORETRYSTATE, cmdListeners, controller, flushReceiveChars, IDLESTATE, istream, mCurrentMode, mCurrentState, mLastSender, mWaitBeforePoll, NORMALMODE, NOTIFIEDSTATE, OKSENDMSGSTATE, ostream, POLLSTATE, PROGRAMINGMODE, rcvException, replyInDispatch, WAITMSGREPLYSTATE, WAITREPLYINNORMMODESTATE, WAITREPLYINPROGMODESTATE, waitTimePoll, xmtException, xmtRunnable
 
Constructor Summary
SpecificTrafficController(SerialSystemConnectionMemo memo)
           
 
Method Summary
protected  boolean endOfMessage(AbstractMRReply msg)
          Decide if a reply have been completely received.
protected  void forwardToPort(AbstractMRMessage m, AbstractMRListener reply)
          Actually transmits the next message to the port
 int getNumberOfIntensitySteps()
          This system provides 16 dim steps
 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.
 void sendX10Sequence(X10Sequence s, SerialListener l)
          Send a sequence of X10 messages Makes them into the local messages and then queues in order
 
Methods inherited from class jmri.jmrix.powerline.SerialTrafficController
addSerialListener, enterNormalMode, enterProgMode, enterProgModeDelayTime, forwardMessage, forwardReply, getAdapterMemo, getSensorManager, pollMessage, pollReplyHandler, removeSerialListener, sendInsteonSequence, sendSerialMessage, setAdapterMemo, setInstance, setSensorManager
 
Methods inherited from class jmri.jmrix.AbstractMRTrafficController
addHeaderToOutput, addListener, addTrailerToOutput, canReceive, connectionWarn, connectPort, disconnectPort, finalize, getLastSender, getPortName, getSelfLock, handleOneIncomingReply, handleTimeout, hasTimeouts, lengthOfByteStream, loadChars, newRcvNotifier, notifyMessage, notifyReply, portReadyToSend, portWarn, portWarnTCP, programmerIdle, readByteProtected, receiveLoop, removeListener, reportReceiveLoopException, resetTimeout, sendMessage, setAllowUnexpectedReply, status, terminate, transmitWait, waitForStartOfReply
 
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
 

Constructor Detail

SpecificTrafficController

public SpecificTrafficController(SerialSystemConnectionMemo memo)
Method Detail

sendX10Sequence

public void sendX10Sequence(X10Sequence s,
                            SerialListener l)
Send a sequence of X10 messages

Makes them into the local messages and then queues in order

Overrides:
sendX10Sequence in class SerialTrafficController

getNumberOfIntensitySteps

public int getNumberOfIntensitySteps()
This system provides 16 dim steps

Overrides:
getNumberOfIntensitySteps in class SerialTrafficController
Returns:
By default, dimming not available.

getSerialMessage

public SerialMessage getSerialMessage(int length)
Get a message of a specific length for filling in.

Overrides:
getSerialMessage in class SerialTrafficController

forwardToPort

protected void forwardToPort(AbstractMRMessage m,
                             AbstractMRListener reply)
Description copied from class: AbstractMRTrafficController
Actually transmits the next message to the port

Overrides:
forwardToPort in class SerialTrafficController

newReply

protected AbstractMRReply newReply()
Description copied from class: SerialTrafficController

This is a default, null implementation, which must be overridden in an adapter-specific subclass.

Overrides:
newReply in class SerialTrafficController

endOfMessage

protected boolean endOfMessage(AbstractMRReply msg)
Decide if a reply have been completely received.

Overrides:
endOfMessage in class SerialTrafficController
Returns:
true if the reply is complete


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