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 address == null
or
if data == null
.RemoteXBeeDevice
public 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 xbeeAddress == null
or
if data == null
.RemoteXBeeDevice
public byte[] getData()
public String getDataString()
public RemoteXBeeDevice getDevice()
RemoteXBeeDevice
public boolean isBroadcast()
true
if the message was received via broadcast,
false
otherwise.© Copyright 2014–2014 Digi International Inc. All rights reserved.