public class SendDataResponsePacket extends XBeeAPIPacket
This frame type is sent out the serial port in response to the
SendDataRequestPacket
, providing its frame ID is non-zero.
SendDataRequestPacket
,
XBeeAPIPacket
NO_FRAME_ID
Constructor and Description |
---|
SendDataResponsePacket(int frameID,
DeviceCloudStatus status)
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
static SendDataResponsePacket |
createPacket(byte[] payload)
Creates a new
SendDataResponsePacket object from the given
payload. |
LinkedHashMap<String,String> |
getAPIPacketParameters()
Returns a map with the XBee packet parameters and their values.
|
DeviceCloudStatus |
getStatus()
Retrieves the file upload status.
|
boolean |
isBroadcast()
Returns whether or not the packet is a broadcast packet.
|
boolean |
needsAPIFrameID()
Returns whether the API packet needs API Frame ID or not.
|
void |
setStatus(DeviceCloudStatus status)
Sets the file upload status.
|
checkFrameID, getAPIData, getFrameID, getFrameType, getFrameTypeValue, getPacketData, setFrameID
equals, generateByteArray, generateByteArrayEscaped, getChecksum, getPacketLength, getParameters, hashCode, parsePacket, parsePacket, toPrettyString, toString
public SendDataResponsePacket(int frameID, DeviceCloudStatus status)
SendDataResponsePacket
object with the given parameters.frameID
- Frame ID.status
- Status.IllegalArgumentException
- if frameID < 0
or
if frameID > 255
.NullPointerException
- if status == null
.DeviceCloudStatus
public static SendDataResponsePacket createPacket(byte[] payload)
SendDataResponsePacket
object from the given
payload.payload
- The API frame payload. It must start with the frame type
corresponding to a Send Data Response packet
(0xB8
). The byte array must be in
OperatingMode.API
mode.IllegalArgumentException
- if payload[0] != APIFrameType.SEND_DATA_RESPONSE.getValue()
or
if payload.length <
.NullPointerException
- if payload == null
.public LinkedHashMap<String,String> getAPIPacketParameters()
XBeeAPIPacket
public DeviceCloudStatus getStatus()
setStatus(DeviceCloudStatus)
,
DeviceCloudStatus
public boolean isBroadcast()
XBeeAPIPacket
isBroadcast
in class XBeeAPIPacket
true
if the packet is a broadcast packet, false
otherwise.public boolean needsAPIFrameID()
XBeeAPIPacket
needsAPIFrameID
in class XBeeAPIPacket
true
if the packet needs API Frame ID, false
otherwise.public void setStatus(DeviceCloudStatus status)
status
- File upload status.NullPointerException
- if status == null
.getStatus()
,
DeviceCloudStatus
© Copyright 2014 - 2024 Digi International Inc. All rights reserved.