Package jmri.jmrix.roco.z21.simulator
Class Z21SimulatorAdapter
java.lang.Object
jmri.jmrix.AbstractPortController
jmri.jmrix.AbstractNetworkPortController
jmri.jmrix.roco.z21.Z21Adapter
jmri.jmrix.roco.z21.simulator.Z21SimulatorAdapter
- All Implemented Interfaces:
Runnable,NetworkPortAdapter,PortAdapter
Provide access to a simulated z21 system.
Currently, the z21Simulator reacts to commands sent from the user interface with messages an appropriate reply message.
NOTE: Some material in this file was modified from other portions of the support infrastructure.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classNested classes/interfaces inherited from class jmri.jmrix.AbstractPortController
AbstractPortController.Option -
Field Summary
FieldsFields inherited from class jmri.jmrix.roco.z21.Z21Adapter
COMMUNICATION_UDP_PORT, DEFAULT_IP_ADDRESS, rbFields inherited from class jmri.jmrix.AbstractNetworkPortController
connTimeout, m_HostName, m_port, socketConnFields inherited from class jmri.jmrix.AbstractPortController
allowConnectionRecovery, manufacturerName, opened, option1Name, option2Name, option3Name, option4Name, options, reconnectinterval, reconnectMaxAttempts, reconnectMaxInterval -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class jmri.jmrix.roco.z21.Z21Adapter
dispose, getSocket, getSystemConnectionMemo, resetupConnection, statusMethods inherited from class jmri.jmrix.AbstractNetworkPortController
autoConfigure, closeConnection, connect, getAdvertisementName, getConnectionTimeout, getCurrentPortName, getHostAddress, getHostName, getInputStream, getMdnsConfigure, getOutputStream, getPort, getServiceType, reconnectFromLoop, setAdvertisementName, setConnectionTimeout, setHostAddress, setHostName, setMdnsConfigure, setPort, setPort, setServiceTypeMethods inherited from class jmri.jmrix.AbstractPortController
configureOption1, configureOption2, configureOption3, configureOption4, getDisabled, getManufacturer, getOption1Name, getOption2Name, getOption3Name, getOption4Name, getOptionChoices, getOptionDisplayName, getOptions, getOptionState, getReconnectMaxAttempts, getReconnectMaxInterval, getSystemPrefix, getUserName, isDirty, isOptionAdvanced, isOptionTypePassword, isOptionTypeText, isRestartRequired, purgeStream, reconnect, recover, safeSleep, setClosed, setDisabled, setManufacturer, setOpened, setOptionState, setReconnectMaxAttempts, setReconnectMaxInterval, setSystemConnectionMemo, setSystemPrefix, setUserNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jmri.jmrix.PortAdapter
configureOption1, configureOption2, configureOption3, configureOption4, getDisabled, getManufacturer, getOption1Name, getOption2Name, getOption3Name, getOption4Name, getOptionChoices, getOptionDisplayName, getOptions, getOptionState, getReconnectMaxAttempts, getReconnectMaxInterval, getSystemPrefix, getUserName, isDirty, isOptionAdvanced, isOptionTypePassword, isOptionTypeText, isRestartRequired, recover, setDisabled, setManufacturer, setOptionState, setReconnectMaxAttempts, setReconnectMaxInterval, setSystemConnectionMemo, setSystemPrefix, setUserName
-
Field Details
-
threadStopRequest
-
socket
-
-
Constructor Details
-
Z21SimulatorAdapter
public Z21SimulatorAdapter()
-
-
Method Details
-
configure
Set up all of the other objects to operate with a z21Simulator connected to this port.- Specified by:
configurein interfaceNetworkPortAdapter- Specified by:
configurein interfacePortAdapter- Overrides:
configurein classZ21Adapter
-
connect
Open the connection.- Specified by:
connectin interfacePortAdapter- Overrides:
connectin classZ21Adapter- Throws:
IOException- if unable to connect
-
terminateThread
Terminate service threadThis is intended to be used only by testing subclasses.
-
run
-