类 DataPacket
- java.lang.Object
-
- com.inlaylink.rfid.communication.DataPacket
-
public class DataPacket extends java.lang.ObjectThe 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.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 bytegetAddress()Gets address.bytegetCheckSum()Gets check sum.bytegetCmd()Gets cmd.byte[]getCoreData()Get core data byte [ ].intgetCoreDataLen()Gets core data len.byte[]getData()Get data byte [ ].bytegetHead()Gets head.bytegetLen()Gets len.bytegetState()Gets state.java.lang.StringtoString()
-
-
-
构造器详细资料
-
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
public DataPacket(byte[] bytes) throws java.security.InvalidParameterExceptionInstantiates a new Data packet.- 参数:
bytes- the bytes- 抛出:
java.security.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
public java.lang.String toString()
- 覆盖:
toString在类中java.lang.Object
-
-