|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CLibrary
CLibary to interact wit libc.so in Linux. Implemented for communication with CAN.
JNA
Nested Class Summary | |
---|---|
static class |
CLibrary.can_frame
Implements the C-structure can_frame. |
static class |
CLibrary.fd_set
Implements the C-structure fd_set. |
static class |
CLibrary.ifmap
Implements the C-structure ifmap. |
static class |
CLibrary.ifreq
Implements the C-structure ifreq. |
static class |
CLibrary.sockaddr
Implements the C-structure sockaddr. |
static class |
CLibrary.sockaddr_can
Implements the C-structure sockaddr_can. |
static class |
CLibrary.timeval
Implements the C-structure timeval. |
Nested classes/interfaces inherited from interface com.sun.jna.Library |
---|
com.sun.jna.Library.Handler |
Field Summary | |
---|---|
static int |
AF_CAN
|
static int |
CAN_RAW
|
static int |
EAGAIN
|
static int |
ENETDOWN
|
static int |
ENODEV
|
static int |
EWOULDBLOCK
|
static int |
F_DUPFD
|
static int |
F_GETFD
|
static int |
F_GETFL
|
static int |
F_SETFD
|
static int |
F_SETFL
|
static int |
FD_SETSIZE
|
static int |
IFNAMESIZE
|
static CLibrary |
INSTANCE
|
static int |
O_NONBLOCK
|
static int |
PF_CAN
|
static com.sun.jna.NativeLong |
SIOCGIFINDEX
|
static int |
SOCK_RAW
|
Fields inherited from interface com.sun.jna.Library |
---|
OPTION_ALLOW_OBJECTS, OPTION_CALLING_CONVENTION, OPTION_FUNCTION_MAPPER, OPTION_INVOCATION_MAPPER, OPTION_STRUCTURE_ALIGNMENT, OPTION_TYPE_MAPPER |
Method Summary | |
---|---|
int |
bind(int __fd,
com.sun.jna.Structure.ByReference __addr,
int __len)
Give the socket FD the local address ADDR (which is LEN bytes long). |
int |
close(int __fd)
Close the file descriptor FD. |
int |
fcntl(int __fd,
int __cmd,
java.lang.Object... objects)
Do the file control operation described by CMD on FD. |
int |
ioctl(int __fd,
com.sun.jna.NativeLong __request,
java.lang.Object... objects)
Perform the I/O control operation specified by REQUEST on FD. |
void |
printf(java.lang.String format,
java.lang.Object... objects)
Write formatted output to stdout. |
int |
read(int __fd,
java.lang.Object __buf,
int __nbytes)
Read NBYTES into BUF from FD. |
int |
select(int __nfds,
CLibrary.fd_set.ByReference __readfds,
CLibrary.fd_set.ByReference __writefds,
CLibrary.fd_set.ByReference __exceptfds,
CLibrary.timeval.ByReference __timeout)
Check the first NFDS descriptors each in READFDS (if not NULL) for read readiness, in WRITEFDS (if not NULL) for write readiness, and in EXCEPTFDS (if not NULL) for exceptional conditions. |
int |
socket(int __domain,
int __type,
int __protocol)
Create a new socket of type TYPE in domain DOMAIN, using protocol PROTOCOL. |
java.lang.String |
strcpy(byte[] __dest,
java.lang.String __src)
Copy SRC to DEST. |
java.lang.String |
strerror(int errnum)
Return a string describing the meaning of the 'errno' code in ERRNUM. |
int |
write(int __fd,
java.lang.Object __buf,
int __nbytes)
Write N bytes of BUF to FD. |
Field Detail |
---|
static final CLibrary INSTANCE
static final int PF_CAN
static final int SOCK_RAW
static final int CAN_RAW
static final int AF_CAN
static final com.sun.jna.NativeLong SIOCGIFINDEX
static final int IFNAMESIZE
static final int FD_SETSIZE
static final int F_DUPFD
static final int F_GETFD
static final int F_SETFD
static final int F_GETFL
static final int F_SETFL
static final int O_NONBLOCK
static final int EAGAIN
static final int EWOULDBLOCK
static final int ENODEV
static final int ENETDOWN
Method Detail |
---|
int socket(int __domain, int __type, int __protocol)
__domain
- DOMAIN__type
- TYPE__protocol
- PROTOCOL If PROTOCOL is zero, one is chosen automatically.
int ioctl(int __fd, com.sun.jna.NativeLong __request, java.lang.Object... objects)
__fd
- File descriptor__request
- REQUEST Specifies the operationobjects
- Varargs
int bind(int __fd, com.sun.jna.Structure.ByReference __addr, int __len)
__fd
- File descriptor__addr
- The local address ADDR.__len
- The size of ADDR in bytes.
int close(int __fd)
__fd
- File descriptor
int select(int __nfds, CLibrary.fd_set.ByReference __readfds, CLibrary.fd_set.ByReference __writefds, CLibrary.fd_set.ByReference __exceptfds, CLibrary.timeval.ByReference __timeout)
__nfds
- NFDS__readfds
- READFDS__writefds
- WRITEFDS__exceptfds
- EXCEPTFDS__timeout
- TIMEOUT
int fcntl(int __fd, int __cmd, java.lang.Object... objects)
__fd
- File descriptor__cmd
- CMDobjects
- Varargs
int write(int __fd, java.lang.Object __buf, int __nbytes)
__fd
- File descriptor__buf
- BUF__nbytes
- Bytes to be written.
int read(int __fd, java.lang.Object __buf, int __nbytes)
__fd
- File descriptor__buf
- BUF__nbytes
- Bytes to be read.
void printf(java.lang.String format, java.lang.Object... objects)
format
- Formatted string.objects
- Varargs to be written.java.lang.String strerror(int errnum)
errnum
- errno
java.lang.String strcpy(byte[] __dest, java.lang.String __src)
__dest
- DEST__src
- SRC
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |