public interface CanConnectionService
Modifier and Type | Method and Description |
---|---|
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
|
void sendCanMessage(String ifName, int canId, byte[] message) throws KuraException, IOException
ifName
- the name of the socket (eg "can0")canId
- can identifier, must be uniquemessage
- the array of bytes to send to the socketKuraException
IOException
CanMessage receiveCanMessage(int can_id, int can_mask) throws KuraException, 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 idKuraException
IOException
Copyright © 2016. All Rights Reserved.