Package jmri.jmrix.dccpp.dccppovertcp
Class DCCppTcpDriverAdapter
java.lang.Object
jmri.jmrix.AbstractPortController
jmri.jmrix.AbstractNetworkPortController
jmri.jmrix.dccpp.DCCppNetworkPortController
jmri.jmrix.dccpp.dccppovertcp.DCCppTcpDriverAdapter
- All Implemented Interfaces:
DCCppPortController,NetworkPortAdapter,PortAdapter
Implements DCCppPortController for the DCCppOverTcp system network
connection.
This connects a DCC++ via a telnet connection. Normally controlled by the DCCppTcpDriverFrame class. Based on LnTcpDriverAdapter.
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.jmrix.AbstractPortController
AbstractPortController.Option -
Field Summary
Fields inherited from class jmri.jmrix.dccpp.DCCppNetworkPortController
commandStationNames, commandStationType, commandStationTypes, mTurnoutExtraSpace, mTurnoutNoRetryFields inherited from class jmri.jmrix.AbstractNetworkPortController
connTimeout, m_HostName, m_port, socketConnFields inherited from class jmri.jmrix.AbstractPortController
allowConnectionRecovery, manufacturerName, option1Name, option2Name, option3Name, option4Name, options, reconnectinterval, reconnectMaxAttempts, reconnectMaxInterval -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidSet up all of the other objects to operate with a DCC++ connected via this class.voidconfigureOption1(String value) Set the first port option.booleanokToSend()Can the port accept additional characters?voidsetOutputBufferEmpty(boolean s) We need a way to say if the output buffer is empty or notbooleanstatus()Check that this object is ready to operate.Methods inherited from class jmri.jmrix.dccpp.DCCppNetworkPortController
configureOption3, getSystemConnectionMemo, resetupConnection, setCommandStationType, setCommandStationType, setTurnoutHandlingMethods inherited from class jmri.jmrix.AbstractNetworkPortController
autoConfigure, closeConnection, connect, 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
configureOption2, configureOption4, dispose, 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
configureOption2, configureOption4, connect, dispose, getDisabled, getInputStream, getManufacturer, getOption1Name, getOption2Name, getOption3Name, getOption4Name, getOptionChoices, getOptionDisplayName, getOptions, getOptionState, getOutputStream, getReconnectMaxAttempts, getReconnectMaxInterval, getSystemPrefix, getUserName, isDirty, isOptionAdvanced, isOptionTypePassword, isOptionTypeText, isRestartRequired, recover, setDisabled, setManufacturer, setOptionState, setReconnectMaxAttempts, setReconnectMaxInterval, setSystemConnectionMemo, setSystemPrefix, setUserName
-
Constructor Details
-
DCCppTcpDriverAdapter
public DCCppTcpDriverAdapter()
-
-
Method Details
-
configure
Set up all of the other objects to operate with a DCC++ connected via this class. -
status
Description copied from class:DCCppNetworkPortControllerCheck that this object is ready to operate. This is a question of configuration, not transient hardware status.- Specified by:
statusin interfaceDCCppPortController- Specified by:
statusin interfaceNetworkPortAdapter- Specified by:
statusin interfacePortAdapter- Specified by:
statusin classDCCppNetworkPortController- Returns:
- true if OK, at least as far as known
-
configureOption1
Description copied from interface:PortAdapterSet the first port option. Only to be used after construction, but before the openPort call.- Specified by:
configureOption1in interfacePortAdapter- Overrides:
configureOption1in classAbstractPortController- Parameters:
value- to set the option to
-
setOutputBufferEmpty
Description copied from interface:DCCppPortControllerWe need a way to say if the output buffer is empty or not- Specified by:
setOutputBufferEmptyin interfaceDCCppPortController- Overrides:
setOutputBufferEmptyin classDCCppNetworkPortController- Parameters:
s- true to set buffer empty, else false.
-
okToSend
Description copied from class:DCCppNetworkPortControllerCan the port accept additional characters? This might go false for short intervals, but it might also stick off if something goes wrong.- Specified by:
okToSendin interfaceDCCppPortController- Specified by:
okToSendin classDCCppNetworkPortController- Returns:
- true if OK to send, else false.
-