|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.dalsemi.comm.CanFrame
This class represents a CAN Frame.
| Field Summary | |
byte[] |
data
|
boolean |
extendedID
|
int |
ID
|
int |
length
|
int |
messageCenter
|
boolean |
remoteFrameRequest
|
byte[] |
tempdata
|
| Constructor Summary | |
CanFrame()
Create a new CAN Frame with default parameters. |
|
CanFrame(int ID,
boolean extendedID,
byte[] buf,
int length)
Create a new CAN Frame with specified parameters. |
|
| Method Summary | |
byte[] |
getData()
Get the data for the incoming or outgoing frame. |
boolean |
getExtendedID()
Get the ID field type on a CAN Frame |
int |
getID()
Get the ID field on a CAN Frame to be sent or already received. |
int |
getLength()
Get the length of the data in the incoming or outgoing frame. |
int |
getMessageCenter()
Get the message center where this frame was received, or where this frame will be sent. |
boolean |
getRemoteFrameRequest()
Get the RTR bit in the frame to determine if it is a Remote Frame. |
void |
setData(byte[] buf)
Set the data for the outgoing frame. |
void |
setExtendedID(boolean extendedID)
Set the ID field type on a CAN Frame |
void |
setID(int ID)
Set the ID field on a CAN Frame |
void |
setLength(int length)
Set the length for the data in the outgoing frame. |
void |
setMessageCenter(int MC)
Set the message center with which to send this CAN Frame |
void |
setRemoteFrameRequest(boolean RTR)
Set the RTR bit in the frame to change this from a Data Frame to a Remote Frame. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public int ID
public boolean extendedID
public int messageCenter
public boolean remoteFrameRequest
public byte[] data
public byte[] tempdata
public int length
| Constructor Detail |
public CanFrame()
public CanFrame(int ID,
boolean extendedID,
byte[] buf,
int length)
ID - Identifier on framebuf - Data for framelength - Length of data| Method Detail |
public void setID(int ID)
ID - Identifier on framepublic int getID()
public void setExtendedID(boolean extendedID)
extendedID - true for extended ID, false for standard IDpublic boolean getExtendedID()
public void setMessageCenter(int MC)
MC - Message Center to usepublic int getMessageCenter()
public void setRemoteFrameRequest(boolean RTR)
RTR - true for Remote Frame, false for Data Frame.public boolean getRemoteFrameRequest()
public void setData(byte[] buf)
buf - Data to put in frame.public byte[] getData()
public void setLength(int length)
len - Length of data in frame.public int getLength()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||