public class XBee
extends java.lang.Object
Constructor and Description |
---|
XBee() |
Modifier and Type | Method and Description |
---|---|
static com.digi.xbee.api.connection.bluetooth.AbstractBluetoothInterface |
createConnectionInterface(android.content.Context context,
android.bluetooth.BluetoothDevice bleDevice)
Retrieves an XBee Android Bluetooth connection interface for the given
context and Bluetooth device.
|
static com.digi.xbee.api.connection.bluetooth.AbstractBluetoothInterface |
createConnectionInterface(android.content.Context context,
java.lang.String deviceAddress)
Retrieves an XBee Android Bluetooth connection interface for the given
context and Bluetooth device address.
|
static com.digi.xbee.api.connection.IConnectionInterface |
createConnectiontionInterface(android.content.Context context,
int baudRate)
Returns an XBee Android connection interface for the given context and
baud rate.
|
static com.digi.xbee.api.connection.IConnectionInterface |
createConnectiontionInterface(android.content.Context context,
int baudRate,
AndroidUSBPermissionListener permissionListener)
Returns an XBee Android connection interface for the given context and
baud rate.
|
static com.digi.xbee.api.connection.IConnectionInterface |
createConnectiontionInterface(android.content.Context context,
java.lang.String port,
int baudRate)
Retrieves an XBee Android connection interface for the given context,
port and baud rate.
|
static com.digi.xbee.api.connection.IConnectionInterface |
createConnectiontionInterface(android.content.Context context,
java.lang.String port,
com.digi.xbee.api.connection.serial.SerialPortParameters serialPortParameters)
Retrieves an XBee Android connection interface for the given context,
port and parameters.
|
public static com.digi.xbee.api.connection.IConnectionInterface createConnectiontionInterface(android.content.Context context, int baudRate)
This constructor uses the Android USB host interface API to communicate with the devices.
context
- The Android application context.baudRate
- The USB connection baud rate.java.lang.NullPointerException
- if context == null
.java.lang.IllegalArgumentException
- if baudRate < 1
.createConnectiontionInterface(Context, int, AndroidUSBPermissionListener)
,
IConnectionInterface
public static com.digi.xbee.api.connection.IConnectionInterface createConnectiontionInterface(android.content.Context context, int baudRate, AndroidUSBPermissionListener permissionListener)
This constructor uses the Android USB host interface API to communicate with the devices.
context
- The Android context.baudRate
- The USB connection baud rate.permissionListener
- The USB permission listener that will be
notified when user grants USB permissions.java.lang.NullPointerException
- if context == null
.java.lang.IllegalArgumentException
- if baudRate < 1
.createConnectiontionInterface(Context, int)
,
IConnectionInterface
,
AndroidUSBPermissionListener
public static com.digi.xbee.api.connection.IConnectionInterface createConnectiontionInterface(android.content.Context context, java.lang.String port, int baudRate)
This constructor uses the Digi Android Serial Port API based on the RxTx library to communicate with the devices.
context
- The Android application context.port
- The Android COM port.baudRate
- The serial port connection baud rate.java.lang.NullPointerException
- if context == null
or
if port == null
.java.lang.IllegalArgumentException
- if baudRate < 1
.createConnectiontionInterface(Context, String, SerialPortParameters)
,
IConnectionInterface
public static com.digi.xbee.api.connection.IConnectionInterface createConnectiontionInterface(android.content.Context context, java.lang.String port, com.digi.xbee.api.connection.serial.SerialPortParameters serialPortParameters)
This constructor uses the Digi Android Serial Port API based on the RxTx library to communicate with the devices.
context
- The Android application context.port
- The Android COM port.serialPortParameters
- The serial port parameters.java.lang.NullPointerException
- if context == null
or
if port == null
or
if serialPortParameters == null
.createConnectiontionInterface(Context, String, int)
,
IConnectionInterface
,
SerialPortParameters
public static com.digi.xbee.api.connection.bluetooth.AbstractBluetoothInterface createConnectionInterface(android.content.Context context, android.bluetooth.BluetoothDevice bleDevice)
context
- The Android application context.bleDevice
- The Bluetooth device.java.lang.NullPointerException
- if context == null
or
if bleDevice == null
.createConnectionInterface(Context, String)
,
AbstractBluetoothInterface
,
BluetoothDevice
public static com.digi.xbee.api.connection.bluetooth.AbstractBluetoothInterface createConnectionInterface(android.content.Context context, java.lang.String deviceAddress)
context
- The Android application context.deviceAddress
- The address of the Bluetooth device.java.lang.IllegalArgumentException
- if the device address does not follow
the format "00:11:22:33:AA:BB".java.lang.NullPointerException
- if context == null
or
if deviceAddress == null
.createConnectionInterface(Context, BluetoothDevice)
,
AbstractBluetoothInterface