类 DataPacket
java.lang.Object
com.inlaylink.rfid.communication.DataPacket
The type Data packet.
-
构造器概要
构造器构造器说明DataPacket(byte cmd) Instantiates a new Data packet.DataPacket(byte[] bytes) Instantiates a new Data packet.DataPacket(byte cmd, byte[] coreBytes) Instantiates a new Data packet.DataPacket(byte head, byte address, byte cmd, byte[] data, int length) Instantiates a new Data packet. -
方法概要
-
构造器详细资料
-
DataPacket
public DataPacket(byte cmd) Instantiates a new Data packet.- 参数:
cmd- the cmd
-
DataPacket
public DataPacket(byte cmd, byte[] coreBytes) Instantiates a new Data packet.- 参数:
cmd- the cmdcoreBytes- the core bytes
-
DataPacket
public DataPacket(byte head, byte address, byte cmd, byte[] data, int length) Instantiates a new Data packet.- 参数:
head- the headaddress- the addresscmd- the cmddata- the datalength- the length
-
DataPacket
Instantiates a new Data packet.- 参数:
bytes- the bytes- 抛出:
InvalidParameterException- the invalid parameter exception
-
-
方法详细资料
-
getHead
public byte getHead()Gets head.- 返回:
- the head
-
getLen
public byte getLen()Gets len.- 返回:
- the len
-
getAddress
public byte getAddress()Gets address.- 返回:
- the address
-
getState
public byte getState()Gets state.- 返回:
- the state
-
getCmd
public byte getCmd()Gets cmd.- 返回:
- the cmd
-
getCoreDataLen
public int getCoreDataLen()Gets core data len.- 返回:
- the core data len
-
getCoreData
public byte[] getCoreData()Get core data byte [ ].- 返回:
- the byte [ ]
-
getCheckSum
public byte getCheckSum()Gets check sum.- 返回:
- the check sum
-
getData
public byte[] getData()Get data byte [ ].- 返回:
- the byte [ ]
-
toString
-