Package jmri.jmrix.ieee802154.xbee
Class XBeeIOStream
java.lang.Object
jmri.jmrix.AbstractPortController
jmri.jmrix.ieee802154.xbee.XBeeIOStream
- All Implemented Interfaces:
PortAdapter
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.jmrix.AbstractPortController
AbstractPortController.Option -
Field Summary
Fields inherited from class jmri.jmrix.AbstractPortController
allowConnectionRecovery, manufacturerName, opened, option1Name, option2Name, option3Name, option4Name, options, reconnectinterval, reconnectMaxAttempts, reconnectMaxInterval -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigure all of the other jmrix widgets needed to work with this adapter.voidconnect()Open the connection.voiddispose()Clean up before removal.booleanReturn the disabled state of the adapter.Get the InputStream from the port.Get the outputStream to the port.voidrecover()This is called when a connection is initially lost.voidsetDisabled(boolean disabled) Set the connection disabled or enabled.booleanstatus()Query the status of this connection.Methods inherited from class jmri.jmrix.AbstractPortController
closeConnection, configureOption1, configureOption2, configureOption3, configureOption4, getManufacturer, getOption1Name, getOption2Name, getOption3Name, getOption4Name, getOptionChoices, getOptionDisplayName, getOptions, getOptionState, getReconnectMaxAttempts, getReconnectMaxInterval, getSystemConnectionMemo, getSystemPrefix, getUserName, isDirty, isOptionAdvanced, isOptionTypePassword, isOptionTypeText, isRestartRequired, purgeStream, reconnect, reconnectFromLoop, resetupConnection, safeSleep, setClosed, setManufacturer, setOpened, setOptionState, setReconnectMaxAttempts, setReconnectMaxInterval, setSystemConnectionMemo, setSystemPrefix, setUserName
-
Constructor Details
-
XBeeIOStream
-
-
Method Details
-
getInputStream
Description copied from class:AbstractPortControllerGet the InputStream from the port.- Specified by:
getInputStreamin interfacePortAdapter- Specified by:
getInputStreamin classAbstractPortController- Returns:
- the InputStream from the port
-
getOutputStream
Description copied from class:AbstractPortControllerGet the outputStream to the port.- Specified by:
getOutputStreamin interfacePortAdapter- Specified by:
getOutputStreamin classAbstractPortController- Returns:
- the outputStream to the port
-
connect
Description copied from interface:PortAdapterOpen the connection. -
configure
Description copied from interface:PortAdapterConfigure all of the other jmrix widgets needed to work with this adapter. -
status
Description copied from class:AbstractPortControllerQuery the status of this connection. This is a question of configuration, not transient hardware status.- Specified by:
statusin interfacePortAdapter- Overrides:
statusin classAbstractPortController- Returns:
- true if OK, at least as far as known
-
getCurrentPortName
- Specified by:
getCurrentPortNamein interfacePortAdapter- Specified by:
getCurrentPortNamein classAbstractPortController
-
getDisabled
Description copied from interface:PortAdapterReturn the disabled state of the adapter.- Specified by:
getDisabledin interfacePortAdapter- Overrides:
getDisabledin classAbstractPortController- Returns:
- true if disabled
-
setDisabled
Description copied from class:AbstractPortControllerSet the connection disabled or enabled. By default connections are enabled. If the implementing class does not use aSystemConnectionMemo, this method must be overridden. Overriding methods must callsuper.setDisabled(boolean)to ensure the configuration change state is correctly set.- Specified by:
setDisabledin interfacePortAdapter- Overrides:
setDisabledin classAbstractPortController- Parameters:
disabled- true if connection should be disabled
-
dispose
Description copied from class:AbstractPortControllerClean up before removal. Overriding methods must callsuper.dispose()or document why they are not calling the overridden implementation. In most cases, failure to call the overridden implementation will cause user-visible error.- Specified by:
disposein interfacePortAdapter- Overrides:
disposein classAbstractPortController
-
recover
Description copied from class:AbstractPortControllerThis is called when a connection is initially lost. After checking the allowConnectionRecovery flag, closes the connection, resets the open flag and attempts a reconnection.- Specified by:
recoverin interfacePortAdapter- Overrides:
recoverin classAbstractPortController
-