public class TXIPv6Packet extends XBeeAPIPacket
RXIPv6Packet,
XBeeAPIPacketNO_FRAME_ID| Constructor and Description |
|---|
TXIPv6Packet(int frameID,
Inet6Address destAddress,
int destPort,
int sourcePort,
IPProtocol protocol,
byte[] data)
Class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static TXIPv6Packet |
createPacket(byte[] payload)
Creates a new
TXIPv6Packet object from the given payload. |
LinkedHashMap<String,String> |
getAPIPacketParameters()
Returns a map with the XBee packet parameters and their values.
|
byte[] |
getData()
Retrieves the transmission data.
|
Inet6Address |
getDestAddress()
Retrieves the destination IPv6 address.
|
int |
getDestPort()
Retrieves the destination port.
|
IPProtocol |
getProtocol()
Retrieves the IP protocol.
|
int |
getSourcePort()
Retrieves the source port.
|
int |
getTransmitOptions()
Retrieves the transmit options.
|
boolean |
needsAPIFrameID()
Returns whether the API packet needs API Frame ID or not.
|
void |
setData(byte[] data)
Sets the new transmission data.
|
void |
setDestAddress(Inet6Address destAddress)
Sets the destination IPv6 address.
|
void |
setDestPort(int destPort)
Sets the destination port.
|
void |
setProtocol(IPProtocol protocol)
Sets the IP protocol.
|
void |
setSourcePort(int sourcePort)
Sets the source port.
|
checkFrameID, getAPIData, getFrameID, getFrameType, getFrameTypeValue, getPacketData, isBroadcast, setFrameIDequals, generateByteArray, generateByteArrayEscaped, getChecksum, getPacketLength, getParameters, hashCode, parsePacket, parsePacket, toPrettyString, toStringpublic TXIPv6Packet(int frameID, Inet6Address destAddress, int destPort, int sourcePort, IPProtocol protocol, byte[] data)
TXIPv6Packet object with
the given parameters.frameID - Frame ID.destAddress - IPv6 address of the destination device.destPort - Destination port number.sourcePort - Source port number.protocol - Protocol used for transmitted data.data - Transmit data bytes.IllegalArgumentException - if frameID < 0 or
if frameID > 255 or
if destPort < 0 or
if destPort > 65535 or
if sourcePort < 0 or
if sourcePort > 65535.NullPointerException - if destAddress == null or
if protocol == null.IPProtocol,
Inet6Addresspublic static TXIPv6Packet createPacket(byte[] payload)
TXIPv6Packet object from the given payload.payload - The API frame payload. It must start with the frame type
corresponding to a TX IPv6 packet (0x1A).
The byte array must be in OperatingMode.API mode.IllegalArgumentException - if payload[0] != APIFrameType.TX_IPV6.getValue() or
if payload.length < .NullPointerException - if payload == null.public LinkedHashMap<String,String> getAPIPacketParameters()
XBeeAPIPacketpublic byte[] getData()
setData(byte[])public Inet6Address getDestAddress()
setDestAddress(Inet6Address),
Inet6Addresspublic int getDestPort()
setDestPort(int)public IPProtocol getProtocol()
setProtocol(IPProtocol),
IPProtocolpublic int getSourcePort()
setSourcePort(int)public int getTransmitOptions()
public boolean needsAPIFrameID()
XBeeAPIPacketneedsAPIFrameID in class XBeeAPIPackettrue if the packet needs API Frame ID, false
otherwise.public void setData(byte[] data)
data - The transmission data.getData()public void setDestAddress(Inet6Address destAddress)
destAddress - The new destination IPv6 address.NullPointerException - if destAddress == null.getDestAddress(),
Inet6Addresspublic void setDestPort(int destPort)
destPort - The new destination port.IllegalArgumentException - if destPort < 0 or
if destPort > 65535.getDestPort()public void setProtocol(IPProtocol protocol)
protocol - The new IP protocol.NullPointerException - if protocol == null.getProtocol(),
IPProtocolpublic void setSourcePort(int sourcePort)
sourcePort - The new source port.IllegalArgumentException - if sourcePort < 0 or
if sourcePort > 65535.getSourcePort()© Copyright 2014 - 2019 Digi International Inc. All rights reserved.