public class XBeeMessage extends Object
This class is used within the XBee Java Library to read data sent by remote devices.
| Constructor and Description |
|---|
XBeeMessage(RemoteXBeeDevice remoteXBeeDevice,
byte[] data)
Class constructor.
|
XBeeMessage(RemoteXBeeDevice remoteXBeeDevice,
byte[] data,
boolean isBroadcast)
Class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getData()
Returns the a byte array containing the data of the message.
|
String |
getDataString()
Returns the data of the message in string format.
|
RemoteXBeeDevice |
getDevice()
Returns the remote XBee device this message is associated to.
|
boolean |
isBroadcast()
Returns whether or not the message was received via broadcast.
|
public XBeeMessage(RemoteXBeeDevice remoteXBeeDevice, byte[] data)
XBeeMessage with the given parameters.remoteXBeeDevice - The remote XBee device the message belongs to.data - Byte array containing the data of the message.NullPointerException - if remoteXBeeDevice == null or
if data == null.RemoteXBeeDevicepublic XBeeMessage(RemoteXBeeDevice remoteXBeeDevice, byte[] data, boolean isBroadcast)
XBeeMessage with the given parameters.remoteXBeeDevice - The remote XBee device the message belongs to.data - Byte array containing the data of the message.isBroadcast - Indicates if the message was received via broadcast.NullPointerException - if remoteXBeeDevice == null or
if data == null.RemoteXBeeDevicepublic byte[] getData()
public String getDataString()
public RemoteXBeeDevice getDevice()
RemoteXBeeDevicepublic boolean isBroadcast()
true if the message was received via broadcast,
false otherwise.© Copyright 2014?2015 Digi International Inc. All rights reserved.