|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CanConnectionService
This is the primary control class for a CAN network interface.
Method Summary | |
---|---|
CanMessage |
receiveCanMessage(int can_id,
int can_mask)
Reads frames that are waiting on socket CAN (all interfaces) and returns an array if canId is correct. |
void |
sendCanMessage(String ifName,
int canId,
byte[] message)
Sends an array of bytes on a CAN socket |
Method Detail |
---|
void sendCanMessage(String ifName, int canId, byte[] message) throws EsfException, IOException
ifName
- the name of the socket (eg "can0")canId
- can identifier, must be uniquemessage
- the array of bytes to send to the socket
EsfException
IOException
CanMessage receiveCanMessage(int can_id, int can_mask) throws EsfException, IOException
A filter can be defined to receive only frames for the id we are interested in. If the can_id param is set to -1, no filter is applied.
can_id
- id to be filteredcan_mask
- mask to be applied to the id
EsfException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |