public class TPCANMsgFD
extends java.lang.Object
implements java.lang.Cloneable
Constructor and Description |
---|
TPCANMsgFD()
Default constructor
|
TPCANMsgFD(int id,
java.util.EnumSet<TPCANMessageType> type,
byte dlc,
byte[] data)
Constructs a new message object.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Clones this message object.
|
byte[] |
getData()
Gets the data of this message.
|
byte |
getDlc()
Gets the data length code of this message.
|
int |
getID()
Gets the id of this message.
|
byte |
getLengthFromDLC()
Gets the length of this message based on its DLC.
|
static byte |
getLengthFromDLC(byte dlc)
Gets the length of a message based on a DLC.
|
byte |
getType()
Gets the type of this message.
|
java.util.EnumSet<TPCANMessageType> |
getTypeEnum()
Gets the type of this message.
|
void |
setData(byte[] data,
byte dlc)
Sets the data and length of this message.
|
void |
setDlc(byte dlc)
Sets the data length code of this message.
|
void |
setID(int id)
Sets the id of this message.
|
void |
setType(byte type)
Sets the type of this message.
|
void |
setType(java.util.EnumSet<TPCANMessageType> type)
Sets the type of this message.
|
public TPCANMsgFD()
public TPCANMsgFD(int id, java.util.EnumSet<TPCANMessageType> type, byte dlc, byte[] data)
id
- the message idtype
- the message typedlc
- the message data length codedata
- the message datapublic void setID(int id)
id
- the message idpublic void setData(byte[] data, byte dlc)
data
- the message datadlc
- the message lengthpublic void setDlc(byte dlc)
dlc
- the data length code of the messagepublic void setType(java.util.EnumSet<TPCANMessageType> type)
type
- the message typepublic void setType(byte type)
type
- the message typepublic int getID()
public byte[] getData()
public byte getDlc()
public byte getLengthFromDLC()
public static byte getLengthFromDLC(byte dlc)
dlc
- data length codepublic java.util.EnumSet<TPCANMessageType> getTypeEnum()
public byte getType()
public java.lang.Object clone()
clone
in class java.lang.Object