public abstract class AbstractXBeeDevice extends Object
XBeeDevice
,
RemoteXBeeDevice
Constructor and Description |
---|
AbstractXBeeDevice(IConnectionInterface connectionInterface)
Class constructor.
|
AbstractXBeeDevice(String port,
int baudRate)
Class constructor.
|
AbstractXBeeDevice(String port,
int baudRate,
int dataBits,
int stopBits,
int parity,
int flowControl)
Class constructor.
|
AbstractXBeeDevice(String port,
SerialPortParameters serialPortParameters)
Class constructor.
|
AbstractXBeeDevice(XBeeDevice localXBeeDevice,
XBee64BitAddress addr64)
Class constructor.
|
AbstractXBeeDevice(XBeeDevice localXBeeDevice,
XBee64BitAddress addr64,
XBee16BitAddress addr16,
String id)
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
applyChanges()
Applies changes to all command registers causing queued command register
values to be applied.
|
void |
enableApplyConfigurationChanges(boolean enabled)
Enables or disables the 'apply configuration changes' option for this
device.
|
void |
executeParameter(String parameter)
Executes the given command in this XBee device.
|
XBee16BitAddress |
get16BitAddress()
Returns the 16-bit address of this XBee device.
|
XBee64BitAddress |
get64BitAddress()
Returns the 64-bit address of this XBee device.
|
int |
getADCValue(IOLine ioLine)
Returns the analog value of the provided IO line of this XBee device.
|
IConnectionInterface |
getConnectionInterface()
Returns the connection interface associated to this XBee device.
|
XBee64BitAddress |
getDestinationAddress()
Returns the 64-bit destination extended address of this XBee device.
|
Set<IOLine> |
getDIOChangeDetection()
Returns the set of IO lines of this device that are monitored for
change detection.
|
IOValue |
getDIOValue(IOLine ioLine)
Returns the digital value of the provided IO line of this XBee device.
|
String |
getFirmwareVersion()
Returns the firmware version (hexadecimal string value) of this XBee
device.
|
HardwareVersion |
getHardwareVersion()
Returns the hardware version of this XBee device.
|
IOMode |
getIOConfiguration(IOLine ioLine)
Returns the configuration mode of the provided IO line of this XBee
device.
|
int |
getIOSamplingRate()
Returns the IO sampling rate of this XBee device.
|
String |
getNodeID()
Returns the node identifier of this XBee device.
|
byte[] |
getPANID()
Returns the operating PAN ID (Personal Area Network Identifier) of
this XBee device.
|
byte[] |
getParameter(String parameter)
Gets the value of the given parameter from this XBee device.
|
PowerLevel |
getPowerLevel()
Returns the output power level at which this XBee device transmits
conducted power.
|
double |
getPWMDutyCycle(IOLine ioLine)
Gets the PWM duty cycle (in %) corresponding to the provided IO line of
this XBee device.
|
XBeeProtocol |
getXBeeProtocol()
Returns the XBee Protocol of this XBee device.
|
boolean |
isApplyConfigurationChangesEnabled()
Returns whether the 'apply configuration changes' option is enabled in
this device.
|
abstract boolean |
isRemote()
Returns whether this XBee device is a remote device.
|
void |
readDeviceInfo()
Reads some parameters from this device and obtains its protocol.
|
IOSample |
readIOSample()
Returns an IO sample from this XBee device containing the value of all
enabled digital IO and analog input channels.
|
abstract void |
reset()
Performs a software reset on this XBee device and blocks until the
process is completed.
|
void |
setDestinationAddress(XBee64BitAddress xbee64BitAddress)
Sets the 64-bit destination extended address of this XBee device.
|
void |
setDIOChangeDetection(Set<IOLine> lines)
Sets the digital IO lines of this XBee device to be monitored and
sampled whenever their status changes.
|
void |
setDIOValue(IOLine ioLine,
IOValue ioValue)
Sets the digital value (high or low) to the provided IO line of this
XBee device.
|
void |
setIOConfiguration(IOLine ioLine,
IOMode ioMode)
Sets the configuration of the given IO line of this XBee device.
|
void |
setIOSamplingRate(int rate)
Sets the IO sampling rate to enable periodic sampling in this XBee
device.
|
void |
setNodeID(String nodeID)
Sets the node identifier of this XBee device.
|
void |
setPANID(byte[] panID)
Sets the PAN ID (Personal Area Network Identifier) of this XBee device.
|
void |
setParameter(String parameter,
byte[] parameterValue)
Sets the given parameter with the provided value in this XBee device.
|
void |
setPowerLevel(PowerLevel powerLevel)
Sets the output power level at which this XBee device transmits
conducted power.
|
void |
setPWMDutyCycle(IOLine ioLine,
double dutyCycle)
Sets the duty cycle (in %) of the provided IO line of this XBee device.
|
String |
toString() |
void |
updateDeviceDataFrom(AbstractXBeeDevice device)
Updates the current device reference with the data provided for the
given device.
|
void |
writeChanges()
Writes configurable parameter values to the non-volatile memory of this
XBee device so that parameter modifications persist through subsequent
resets.
|
public AbstractXBeeDevice(IConnectionInterface connectionInterface)
XBeeDevice
object with the
given connection interface.connectionInterface
- The connection interface with the physical
XBee device.NullPointerException
- if connectionInterface == null
.AbstractXBeeDevice(String, int)
,
AbstractXBeeDevice(String, SerialPortParameters)
,
AbstractXBeeDevice(XBeeDevice, XBee64BitAddress)
,
AbstractXBeeDevice(XBeeDevice, XBee64BitAddress, XBee16BitAddress, String)
,
AbstractXBeeDevice(String, int, int, int, int, int)
,
IConnectionInterface
public AbstractXBeeDevice(String port, int baudRate)
XBeeDevice
object in the
given port name and baud rate.port
- Serial port name where XBee device is attached to.baudRate
- Serial port baud rate to communicate with the device.
Other connection parameters will be set as default (8
data bits, 1 stop bit, no parity, no flow control).IllegalArgumentException
- if baudRate < 0
.NullPointerException
- if port == null
.AbstractXBeeDevice(IConnectionInterface)
,
AbstractXBeeDevice(String, SerialPortParameters)
,
AbstractXBeeDevice(XBeeDevice, XBee64BitAddress)
,
AbstractXBeeDevice(XBeeDevice, XBee64BitAddress, XBee16BitAddress, String)
,
AbstractXBeeDevice(String, int, int, int, int, int)
public AbstractXBeeDevice(String port, int baudRate, int dataBits, int stopBits, int parity, int flowControl)
XBeeDevice
object in the
given serial port name and settings.port
- Serial port name where XBee device is attached to.baudRate
- Serial port baud rate to communicate with the device.dataBits
- Serial port data bits.stopBits
- Serial port data bits.parity
- Serial port data bits.flowControl
- Serial port data bits.IllegalArgumentException
- if baudRate < 0
or
if dataBits < 0
or
if stopBits < 0
or
if parity < 0
or
if flowControl < 0
.NullPointerException
- if port == null
.AbstractXBeeDevice(IConnectionInterface)
,
AbstractXBeeDevice(String, int)
,
AbstractXBeeDevice(String, SerialPortParameters)
,
AbstractXBeeDevice(XBeeDevice, XBee64BitAddress)
,
AbstractXBeeDevice(XBeeDevice, XBee64BitAddress, XBee16BitAddress, String)
public AbstractXBeeDevice(String port, SerialPortParameters serialPortParameters)
XBeeDevice
object in the
given serial port name and parameters.port
- Serial port name where XBee device is attached to.serialPortParameters
- Object containing the serial port parameters.NullPointerException
- if port == null
or
if serialPortParameters == null
.AbstractXBeeDevice(IConnectionInterface)
,
AbstractXBeeDevice(String, int)
,
AbstractXBeeDevice(XBeeDevice, XBee64BitAddress)
,
AbstractXBeeDevice(XBeeDevice, XBee64BitAddress, XBee16BitAddress, String)
,
AbstractXBeeDevice(String, int, int, int, int, int)
,
SerialPortParameters
public AbstractXBeeDevice(XBeeDevice localXBeeDevice, XBee64BitAddress addr64)
RemoteXBeeDevice
object
with the given local XBeeDevice
which contains the connection
interface to be used.localXBeeDevice
- The local XBee device that will behave as
connection interface to communicate with this
remote XBee device.addr64
- The 64-bit address to identify this XBee device.IllegalArgumentException
- If localXBeeDevice.isRemote() == true
.NullPointerException
- if localXBeeDevice == null
or
if addr64 == null
.AbstractXBeeDevice(IConnectionInterface)
,
AbstractXBeeDevice(String, int)
,
AbstractXBeeDevice(String, SerialPortParameters)
,
AbstractXBeeDevice(XBeeDevice, XBee64BitAddress, XBee16BitAddress, String)
,
AbstractXBeeDevice(String, int, int, int, int, int)
,
XBee16BitAddress
public AbstractXBeeDevice(XBeeDevice localXBeeDevice, XBee64BitAddress addr64, XBee16BitAddress addr16, String id)
RemoteXBeeDevice
object
with the given local XBeeDevice
which contains the connection
interface to be used.localXBeeDevice
- The local XBee device that will behave as
connection interface to communicate with this
remote XBee device.addr64
- The 64-bit address to identify this XBee device.addr16
- The 16-bit address to identify this XBee device. It might
be null
.id
- The node identifier of this XBee device. It might be
null
.IllegalArgumentException
- If localXBeeDevice.isRemote() == true
.NullPointerException
- If localXBeeDevice == null
or
if addr64 == null
.AbstractXBeeDevice(IConnectionInterface)
,
AbstractXBeeDevice(String, int)
,
AbstractXBeeDevice(String, SerialPortParameters)
,
AbstractXBeeDevice(XBeeDevice, XBee64BitAddress)
,
AbstractXBeeDevice(String, int, int, int, int, int)
,
XBee16BitAddress
,
XBee64BitAddress
public void applyChanges() throws TimeoutException, XBeeException
This method must be invoked if the 'apply configuration changes' option is disabled and the changes to this XBee device parameters must be applied.
To know if the 'apply configuration changes' option is enabled, use
the isApplyConfigurationChangesEnabled()
method. And to
enable/disable this feature, the method
enableApplyConfigurationChanges(boolean)
.
Applying changes does not imply the modifications will persist
through subsequent resets. To do so, use the writeChanges()
method.
InterfaceNotOpenException
- if this device connection is not open.TimeoutException
- if there is a timeout sending the get Apply
Changes command.XBeeException
- if there is any other XBee related exception.enableApplyConfigurationChanges(boolean)
,
isApplyConfigurationChangesEnabled()
,
setParameter(String, byte[])
,
writeChanges()
public void enableApplyConfigurationChanges(boolean enabled)
Enabling this option means that when any parameter of this XBee device is set, it will be also applied.
If this option is disabled, the method applyChanges()
must be
used in order to apply the changes in all the parameters that were
previously set.
enabled
- true
to apply configuration changes when an XBee
parameter is set, false
otherwise.applyChanges()
,
isApplyConfigurationChangesEnabled()
public void executeParameter(String parameter) throws TimeoutException, XBeeException
This method is intended to be used for those AT parameters that cannot be read or written, they just execute some action in the XBee module.
parameter
- The AT command to be executed.IllegalArgumentException
- if parameter.length() != 2
.NullPointerException
- if parameter == null
.TimeoutException
- if there is a timeout executing the parameter.XBeeException
- if there is any other XBee related exception.getParameter(String)
,
setParameter(String, byte[])
public XBee16BitAddress get16BitAddress()
To refresh this value use the readDeviceInfo()
method.
XBee16BitAddress
public XBee64BitAddress get64BitAddress()
If this value is null
or
XBee64BitAddress.UNKNOWN_ADDRESS
, use the
readDeviceInfo()
method to get its value.
XBee64BitAddress
public int getADCValue(IOLine ioLine) throws TimeoutException, XBeeException
The provided IO line must be previously configured as ADC. To
do so, use setIOConfiguration
and IOMode.ADC
.
ioLine
- The IO line to get its analog value.InterfaceNotOpenException
- if this device connection is not open.NullPointerException
- if ioLine == null
.TimeoutException
- if there is a timeout sending the get IO values
command.XBeeException
- if there is any other XBee related exception.getIOConfiguration(IOLine)
,
setIOConfiguration(IOLine, IOMode)
,
IOLine
,
IOMode.ADC
public IConnectionInterface getConnectionInterface()
IConnectionInterface
public XBee64BitAddress getDestinationAddress() throws TimeoutException, XBeeException
XBee64BitAddress.BROADCAST_ADDRESS
is the broadcast address
for the PAN. XBee64BitAddress.COORDINATOR_ADDRESS
can be used to
address the Pan Coordinator.
InterfaceNotOpenException
- if this device connection is not open.TimeoutException
- if there is a timeout sending the get
destination address command.XBeeException
- if there is any other XBee related exception.setDestinationAddress(XBee64BitAddress)
,
XBee64BitAddress
public Set<IOLine> getDIOChangeDetection() throws TimeoutException, XBeeException
A null
set means the DIO change detection feature is disabled.
Modules can be configured to transmit to the configured destination address a data sample immediately whenever a monitored digital IO line changes state.
null
if there are no monitored lines.InterfaceNotOpenException
- if this device connection is not open.TimeoutException
- if there is a timeout sending the get DIO
change detection command.XBeeException
- if there is any other XBee related exception.getDestinationAddress()
,
setDestinationAddress(XBee64BitAddress)
,
setDIOChangeDetection(Set)
public IOValue getDIOValue(IOLine ioLine) throws TimeoutException, XBeeException
The provided IO line must be previously configured as digital I/O
. To do so, use setIOConfiguration
and the following
IOMode
:
IOMode.DIGITAL_IN
to configure as digital input.IOMode.DIGITAL_OUT_HIGH
to configure as digital output, high.
IOMode.DIGITAL_OUT_LOW
to configure as digital output, low.
ioLine
- The IO line to get its digital value.InterfaceNotOpenException
- if this device connection is not open.NullPointerException
- if ioLine == null
.TimeoutException
- if there is a timeout sending the get IO values
command.XBeeException
- if there is any other XBee related exception.getIOConfiguration(IOLine)
,
setIOConfiguration(IOLine, IOMode)
,
IOLine
,
IOValue
,
IOMode.DIGITAL_IN
,
IOMode.DIGITAL_OUT_HIGH
,
IOMode.DIGITAL_OUT_LOW
public String getFirmwareVersion()
To refresh this value use the readDeviceInfo()
method.
public HardwareVersion getHardwareVersion()
If this value is null
, use the readDeviceInfo()
method to get its value.
HardwareVersion
,
HardwareVersionEnum
public IOMode getIOConfiguration(IOLine ioLine) throws TimeoutException, XBeeException
ioLine
- The IO line to get its configuration.InterfaceNotOpenException
- if this device connection is not open.NullPointerException
- if ioLine == null
.TimeoutException
- if there is a timeout sending the get
configuration command.XBeeException
- if there is any other XBee related exception.setIOConfiguration(IOLine, IOMode)
,
IOLine
,
IOMode
public int getIOSamplingRate() throws TimeoutException, XBeeException
A sample rate of 0
means the IO sampling feature is disabled.
Periodic sampling allows this XBee module to take an IO sample and transmit it to a remote device (configured in the destination address) at the configured periodic rate (ms).
InterfaceNotOpenException
- if this device connection is not open.TimeoutException
- if there is a timeout sending the get IO
sampling rate command.XBeeException
- if there is any other XBee related exception.getDestinationAddress()
,
setDestinationAddress(XBee64BitAddress)
,
setIOSamplingRate(int)
public String getNodeID()
To refresh this value use the readDeviceInfo()
method.
setNodeID(String)
public byte[] getPANID() throws TimeoutException, XBeeException
For modules to communicate they must be configured with the same identifier. Only modules with matching IDs can communicate with each other.This parameter allows multiple networks to co-exist on the same physical channel.
InterfaceNotOpenException
- if this device connection is not open.TimeoutException
- if there is a timeout getting the PAN ID.XBeeException
- if there is any other XBee related exception.setPANID(byte[])
public byte[] getParameter(String parameter) throws TimeoutException, XBeeException
parameter
- The name of the parameter to retrieve its value.IllegalArgumentException
- if parameter.length() != 2
.NullPointerException
- if parameter == null
.TimeoutException
- if there is a timeout getting the parameter value.XBeeException
- if there is any other XBee related exception.executeParameter(String)
,
setParameter(String, byte[])
public PowerLevel getPowerLevel() throws TimeoutException, XBeeException
InterfaceNotOpenException
- if this device connection is not open.TimeoutException
- if there is a timeout getting the power level.XBeeException
- if there is any other XBee related exception.setPowerLevel(PowerLevel)
,
PowerLevel
public double getPWMDutyCycle(IOLine ioLine) throws TimeoutException, XBeeException
The provided IO line must be:
IOLine.hasPWMCapability()
).setIOConfiguration
and IOMode.PWM
).ioLine
- The IO line to get its PWM duty cycle.IllegalArgumentException
- if ioLine.hasPWMCapability() == false
.InterfaceNotOpenException
- if this device connection is not open.NullPointerException
- if ioLine == null
.TimeoutException
- if there is a timeout sending the get PWM duty
cycle command.XBeeException
- if there is any other XBee related exception.getIOConfiguration(IOLine)
,
setIOConfiguration(IOLine, IOMode)
,
setPWMDutyCycle(IOLine, double)
,
IOLine
,
IOMode.PWM
public XBeeProtocol getXBeeProtocol()
To refresh this value use the readDeviceInfo()
method.
XBeeProtocol
public boolean isApplyConfigurationChangesEnabled()
If this option is enabled, when any parameter of this XBee device is set, it will be also applied.
If this option is disabled, the method applyChanges()
must be
used in order to apply the changes in all the parameters that were
previously set.
true
if the option is enabled, false
otherwise.applyChanges()
,
enableApplyConfigurationChanges(boolean)
public abstract boolean isRemote()
true
if this XBee device is a remote device,
false
otherwise.public void readDeviceInfo() throws TimeoutException, XBeeException
This method refresh the values of:
InterfaceNotOpenException
- if this device connection is not open.TimeoutException
- if there is a timeout reading the parameters.XBeeException
- if there is any other XBee related exception.get16BitAddress()
,
get64BitAddress()
,
getHardwareVersion()
,
getNodeID()
,
getFirmwareVersion()
,
getXBeeProtocol()
,
setNodeID(String)
public IOSample readIOSample() throws TimeoutException, XBeeException
InterfaceNotOpenException
- if this device connection is not open.TimeoutException
- if there is a timeout getting the IO sample.XBeeException
- if there is any other XBee related exception.IOSample
public abstract void reset() throws TimeoutException, XBeeException
TimeoutException
- if the configured time expires while waiting
for the command reply.XBeeException
- if there is any other XBee related exception.public void setDestinationAddress(XBee64BitAddress xbee64BitAddress) throws TimeoutException, XBeeException
XBee64BitAddress.BROADCAST_ADDRESS
is the broadcast address
for the PAN. XBee64BitAddress.COORDINATOR_ADDRESS
can be used to
address the Pan Coordinator.
xbee64BitAddress
- 64-bit destination address to be configured.InterfaceNotOpenException
- if this device connection is not open.NullPointerException
- if xbee64BitAddress == null
.TimeoutException
- if there is a timeout sending the set
destination address command.XBeeException
- if there is any other XBee related exception.getDestinationAddress()
,
XBee64BitAddress
public void setDIOChangeDetection(Set<IOLine> lines) throws TimeoutException, XBeeException
A null
set of lines disables this feature.
If a change is detected on an enabled digital IO pin, a digital IO sample is immediately transmitted to the configured destination address.
The destination address can be configured using the
setDestinationAddress(XBee64BitAddress)
method and retrieved by
getDestinationAddress()
.
lines
- Set of IO lines to be monitored, null
to disable
this feature.InterfaceNotOpenException
- if this device connection is not open.TimeoutException
- if there is a timeout sending the set DIO
change detection command.XBeeException
- if there is any other XBee related exception.getDestinationAddress()
,
getDIOChangeDetection()
,
setDestinationAddress(XBee64BitAddress)
public void setDIOValue(IOLine ioLine, IOValue ioValue) throws TimeoutException, XBeeException
ioLine
- The IO line to set its value.ioValue
- The IOValue to set to the IO line (HIGH
or
LOW
).InterfaceNotOpenException
- if this device connection is not open.NullPointerException
- if ioLine == null
or
if ioValue == null
.TimeoutException
- if there is a timeout sending the set DIO
command.XBeeException
- if there is any other XBee related exception.getIOConfiguration(IOLine)
,
setIOConfiguration(IOLine, IOMode)
,
IOLine
,
IOValue
,
IOMode.DIGITAL_OUT_HIGH
,
IOMode.DIGITAL_OUT_LOW
public void setIOConfiguration(IOLine ioLine, IOMode ioMode) throws TimeoutException, XBeeException
ioLine
- The IO line to configure.ioMode
- The IO mode to set to the IO line.InterfaceNotOpenException
- if this device connection is not open.NullPointerException
- if ioLine == null
or
if ioMode == null
.TimeoutException
- if there is a timeout sending the set
configuration command.XBeeException
- if there is any other XBee related exception.getIOConfiguration(IOLine)
,
IOLine
,
IOMode
public void setIOSamplingRate(int rate) throws TimeoutException, XBeeException
A sample rate of 0
ms. disables this feature.
All enabled digital IO and analog inputs will be sampled and
transmitted every rate
milliseconds to the configured destination
address.
The destination address can be configured using the
setDestinationAddress(XBee64BitAddress)
method and retrieved by
getDestinationAddress()
.
rate
- IO sampling rate in milliseconds.IllegalArgumentException
- if rate < 0
or rate >
0xFFFF
.InterfaceNotOpenException
- if this device connection is not open.TimeoutException
- if there is a timeout sending the set IO
sampling rate command.XBeeException
- if there is any other XBee related exception.getDestinationAddress()
,
setDestinationAddress(XBee64BitAddress)
,
getIOSamplingRate()
public void setNodeID(String nodeID) throws TimeoutException, XBeeException
nodeID
- The new node id of the device.IllegalArgumentException
- if nodeID.length > 20
.InterfaceNotOpenException
- if this device connection is not open.NullPointerException
- if nodeID == null
.TimeoutException
- if there is a timeout setting the node ID value.XBeeException
- if there is any other XBee related exception.getNodeID()
public void setPANID(byte[] panID) throws TimeoutException, XBeeException
For modules to communicate they must be configured with the same identifier. Only modules with matching IDs can communicate with each other.This parameter allows multiple networks to co-exist on the same physical channel.
panID
- The new PAN ID of this XBee device.IllegalArgumentException
- if panID.length == 0
or
if panID.length > 8
.InterfaceNotOpenException
- if this device connection is not open.NullPointerException
- if panID == null
.TimeoutException
- if there is a timeout setting the PAN ID.XBeeException
- if there is any other XBee related exception.getPANID()
public void setParameter(String parameter, byte[] parameterValue) throws TimeoutException, XBeeException
If the 'apply configuration changes' option is enabled in this device,
the configured value for the given parameter will be immediately applied,
if not the method applyChanges()
must be invoked to apply it.
Use:
isApplyConfigurationChangesEnabled()
to know
if the 'apply configuration changes' option is enabled.enableApplyConfigurationChanges(boolean)
to enable or
disable this option.To make parameter modifications persist through subsequent resets use
the writeChanges()
method.
parameter
- The name of the parameter to be set.parameterValue
- The value of the parameter to set.IllegalArgumentException
- if parameter.length() != 2
.NullPointerException
- if parameter == null
or
if parameterValue == null
.TimeoutException
- if there is a timeout setting the parameter.XBeeException
- if there is any other XBee related exception.applyChanges()
,
enableApplyConfigurationChanges(boolean)
,
executeParameter(String)
,
getParameter(String)
,
isApplyConfigurationChangesEnabled()
,
writeChanges()
public void setPowerLevel(PowerLevel powerLevel) throws TimeoutException, XBeeException
powerLevel
- The new output power level to be set in this XBee
device.InterfaceNotOpenException
- if this device connection is not open.NullPointerException
- if powerLevel == null
.TimeoutException
- if there is a timeout setting the power level.XBeeException
- if there is any other XBee related exception.getPowerLevel()
,
PowerLevel
public void setPWMDutyCycle(IOLine ioLine, double dutyCycle) throws TimeoutException, XBeeException
The provided IO line must be:
IOLine.hasPWMCapability()
).setIOConfiguration
and IOMode.PWM
).ioLine
- The IO line to set its duty cycle value.dutyCycle
- The duty cycle of the PWM.IllegalArgumentException
- if ioLine.hasPWMCapability() == false
or
if value < 0
or
if value > 1023
.InterfaceNotOpenException
- if this device connection is not open.NullPointerException
- if ioLine == null
.TimeoutException
- if there is a timeout sending the set PWM duty
cycle command.XBeeException
- if there is any other XBee related exception.getIOConfiguration(IOLine)
,
getIOConfiguration(IOLine)
,
setIOConfiguration(IOLine, IOMode)
,
getPWMDutyCycle(IOLine)
,
IOLine
,
IOMode.PWM
public void updateDeviceDataFrom(AbstractXBeeDevice device)
This is only for internal use.
device
- The XBee Device to get the data from.public void writeChanges() throws TimeoutException, XBeeException
Parameters values remain in this device's memory until overwritten by subsequent use of this method.
If changes are made without writing them to non-volatile memory, the module reverts back to previously saved parameters the next time the module is powered-on.
Writing the parameter modifications does not mean those values are
immediately applied, this depends on the status of the 'apply
configuration changes' option. Use method
isApplyConfigurationChangesEnabled()
to get its status and
enableApplyConfigurationChanges(boolean)
to enable/disable the
option. If it is disable method applyChanges()
can be used in
order to manually apply the changes.
InterfaceNotOpenException
- if this device connection is not open.TimeoutException
- if there is a timeout executing the write
changes command.XBeeException
- if there is any other XBee related exception.applyChanges()
,
enableApplyConfigurationChanges(boolean)
,
isApplyConfigurationChangesEnabled()
,
setParameter(String, byte[])
© Copyright 2014–2014 Digi International Inc. All rights reserved.