public final class CanSocket extends Object implements Closeable
| Modifier and Type | Class and Description |
|---|---|
static class |
CanSocket.CanFrame |
static class |
CanSocket.CanId |
static class |
CanSocket.CanInterface |
static class |
CanSocket.Mode |
| Modifier and Type | Field and Description |
|---|---|
static CanSocket.CanInterface |
CAN_ALL_INTERFACES |
static int |
CAN_FD_MTU |
static int |
CAN_MTU |
| Constructor and Description |
|---|
CanSocket(CanSocket.Mode mode) |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(CanSocket.CanInterface canInterface) |
void |
close() |
boolean |
getLoopbackMode() |
int |
getMtu(String canif) |
boolean |
getRecvOwnMsgsMode() |
CanSocket.CanFrame |
recv() |
void |
send(CanSocket.CanFrame frame) |
void |
setLoopbackMode(boolean on) |
void |
setRecvOwnMsgsMode(boolean on) |
public static final CanSocket.CanInterface CAN_ALL_INTERFACES
public static final int CAN_MTU
public static final int CAN_FD_MTU
public CanSocket(CanSocket.Mode mode) throws IOException
IOExceptionpublic void bind(CanSocket.CanInterface canInterface) throws IOException
IOExceptionpublic void send(CanSocket.CanFrame frame) throws IOException
IOExceptionpublic CanSocket.CanFrame recv() throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic int getMtu(String canif) throws IOException
IOExceptionpublic void setLoopbackMode(boolean on)
throws IOException
IOExceptionpublic boolean getLoopbackMode()
throws IOException
IOExceptionpublic void setRecvOwnMsgsMode(boolean on)
throws IOException
IOExceptionpublic boolean getRecvOwnMsgsMode()
throws IOException
IOExceptionCopyright © 2023 LSST. All rights reserved.