Xenomai API
2.6.5
|
Files | |
file | rtdm.h |
Real-Time Driver Model for Xenomai, user API header. | |
Functions | |
int | rt_dev_open (const char *path, int oflag,...) |
Open a device. More... | |
int | rt_dev_socket (int protocol_family, int socket_type, int protocol) |
Create a socket. More... | |
int | rt_dev_close (int fd) |
Close a device or socket. More... | |
int | rt_dev_ioctl (int fd, int request,...) |
Issue an IOCTL. More... | |
ssize_t | rt_dev_read (int fd, void *buf, size_t nbyte) |
Read from device. More... | |
ssize_t | rt_dev_write (int fd, const void *buf, size_t nbyte) |
Write to device. More... | |
ssize_t | rt_dev_recvmsg (int fd, struct user_msghdr *msg, int flags) |
Receive message from socket. More... | |
ssize_t | rt_dev_recvfrom (int fd, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen) |
Receive message from socket. More... | |
ssize_t | rt_dev_recv (int fd, void *buf, size_t len, int flags) |
Receive message from socket. More... | |
ssize_t | rt_dev_sendmsg (int fd, const struct user_msghdr *msg, int flags) |
Transmit message to socket. More... | |
ssize_t | rt_dev_sendto (int fd, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) |
Transmit message to socket. More... | |
ssize_t | rt_dev_send (int fd, const void *buf, size_t len, int flags) |
Transmit message to socket. More... | |
int | rt_dev_bind (int fd, const struct sockaddr *my_addr, socklen_t addrlen) |
Bind to local address. More... | |
int | rt_dev_connect (int fd, const struct sockaddr *serv_addr, socklen_t addrlen) |
Connect to remote address. More... | |
int | rt_dev_listen (int fd, int backlog) |
Listen for incomming connection requests. More... | |
int | rt_dev_accept (int fd, struct sockaddr *addr, socklen_t *addrlen) |
Accept a connection requests. More... | |
int | rt_dev_shutdown (int fd, int how) |
Shut down parts of a connection. More... | |
int | rt_dev_getsockopt (int fd, int level, int optname, void *optval, socklen_t *optlen) |
Get socket option. More... | |
int | rt_dev_setsockopt (int fd, int level, int optname, const void *optval, socklen_t optlen) |
Set socket option. More... | |
int | rt_dev_getsockname (int fd, struct sockaddr *name, socklen_t *namelen) |
Get local socket address. More... | |
int | rt_dev_getpeername (int fd, struct sockaddr *name, socklen_t *namelen) |
Get socket destination address. More... | |
This is the upper interface of RTDM provided to application programs both in kernel and user space. Note that certain functions may not be implemented by every device. Refer to the Device Profiles for precise information.
int rt_dev_accept | ( | int | fd, |
struct sockaddr * | addr, | ||
socklen_t * | addrlen | ||
) |
Accept a connection requests.
[in] | fd | File descriptor as returned by rt_dev_socket() |
[out] | addr | Buffer for remote address |
[in,out] | addrlen | Address buffer size |
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
accept()
in IEEE Std 1003.1, http://www.opengroup.org/onlinepubs/009695399 int rt_dev_bind | ( | int | fd, |
const struct sockaddr * | my_addr, | ||
socklen_t | addrlen | ||
) |
Bind to local address.
[in] | fd | File descriptor as returned by rt_dev_socket() |
[in] | my_addr | Address buffer |
[in] | addrlen | Address buffer size |
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
bind()
in IEEE Std 1003.1, http://www.opengroup.org/onlinepubs/009695399 int rt_dev_close | ( | int | fd | ) |
Close a device or socket.
[in] | fd | File descriptor as returned by rt_dev_open() or rt_dev_socket() |
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
close()
in IEEE Std 1003.1, http://www.opengroup.org/onlinepubs/009695399 int rt_dev_connect | ( | int | fd, |
const struct sockaddr * | serv_addr, | ||
socklen_t | addrlen | ||
) |
Connect to remote address.
[in] | fd | File descriptor as returned by rt_dev_socket() |
[in] | serv_addr | Address buffer |
[in] | addrlen | Address buffer size |
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
connect()
in IEEE Std 1003.1, http://www.opengroup.org/onlinepubs/009695399 int rt_dev_getpeername | ( | int | fd, |
struct sockaddr * | name, | ||
socklen_t * | namelen | ||
) |
Get socket destination address.
[in] | fd | File descriptor as returned by rt_dev_socket() |
[out] | name | Address buffer |
[in,out] | namelen | Address buffer size |
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
getpeername()
in IEEE Std 1003.1, http://www.opengroup.org/onlinepubs/009695399 int rt_dev_getsockname | ( | int | fd, |
struct sockaddr * | name, | ||
socklen_t * | namelen | ||
) |
Get local socket address.
[in] | fd | File descriptor as returned by rt_dev_socket() |
[out] | name | Address buffer |
[in,out] | namelen | Address buffer size |
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
getsockname()
in IEEE Std 1003.1, http://www.opengroup.org/onlinepubs/009695399 int rt_dev_getsockopt | ( | int | fd, |
int | level, | ||
int | optname, | ||
void * | optval, | ||
socklen_t * | optlen | ||
) |
Get socket option.
[in] | fd | File descriptor as returned by rt_dev_socket() |
[in] | level | Addressed stack level |
[in] | optname | Option name ID |
[out] | optval | Value buffer |
[in,out] | optlen | Value buffer size |
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
getsockopt()
in IEEE Std 1003.1, http://www.opengroup.org/onlinepubs/009695399 int rt_dev_ioctl | ( | int | fd, |
int | request, | ||
... | |||
) |
Issue an IOCTL.
[in] | fd | File descriptor as returned by rt_dev_open() or rt_dev_socket() |
[in] | request | IOCTL code |
... | Optional third argument, depending on IOCTL function (void * or unsigned long ) |
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
ioctl()
in IEEE Std 1003.1, http://www.opengroup.org/onlinepubs/009695399 int rt_dev_listen | ( | int | fd, |
int | backlog | ||
) |
Listen for incomming connection requests.
[in] | fd | File descriptor as returned by rt_dev_socket() |
[in] | backlog | Maximum queue length |
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
lsiten()
in IEEE Std 1003.1, http://www.opengroup.org/onlinepubs/009695399 int rt_dev_open | ( | const char * | path, |
int | oflag, | ||
... | |||
) |
Open a device.
[in] | path | Device name |
[in] | oflag | Open flags |
... | Further parameters will be ignored. |
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
open()
in IEEE Std 1003.1, http://www.opengroup.org/onlinepubs/009695399 ssize_t rt_dev_read | ( | int | fd, |
void * | buf, | ||
size_t | nbyte | ||
) |
Read from device.
[in] | fd | File descriptor as returned by rt_dev_open() |
[out] | buf | Input buffer |
[in] | nbyte | Number of bytes to read |
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
read()
in IEEE Std 1003.1, http://www.opengroup.org/onlinepubs/009695399 ssize_t rt_dev_recv | ( | int | fd, |
void * | buf, | ||
size_t | len, | ||
int | flags | ||
) |
Receive message from socket.
[in] | fd | File descriptor as returned by rt_dev_socket() |
[out] | buf | Message buffer |
[in] | len | Message buffer size |
[in] | flags | Message flags |
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
recv()
in IEEE Std 1003.1, http://www.opengroup.org/onlinepubs/009695399 ssize_t rt_dev_recvfrom | ( | int | fd, |
void * | buf, | ||
size_t | len, | ||
int | flags, | ||
struct sockaddr * | from, | ||
socklen_t * | fromlen | ||
) |
Receive message from socket.
[in] | fd | File descriptor as returned by rt_dev_socket() |
[out] | buf | Message buffer |
[in] | len | Message buffer size |
[in] | flags | Message flags |
[out] | from | Buffer for message sender address |
[in,out] | fromlen | Address buffer size |
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
recvfrom()
in IEEE Std 1003.1, http://www.opengroup.org/onlinepubs/009695399 ssize_t rt_dev_recvmsg | ( | int | fd, |
struct user_msghdr * | msg, | ||
int | flags | ||
) |
Receive message from socket.
[in] | fd | File descriptor as returned by rt_dev_socket() |
[in,out] | msg | Message descriptor |
[in] | flags | Message flags |
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
recvmsg()
in IEEE Std 1003.1, http://www.opengroup.org/onlinepubs/009695399 ssize_t rt_dev_send | ( | int | fd, |
const void * | buf, | ||
size_t | len, | ||
int | flags | ||
) |
Transmit message to socket.
[in] | fd | File descriptor as returned by rt_dev_socket() |
[in] | buf | Message buffer |
[in] | len | Message buffer size |
[in] | flags | Message flags |
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
send()
in IEEE Std 1003.1, http://www.opengroup.org/onlinepubs/009695399 ssize_t rt_dev_sendmsg | ( | int | fd, |
const struct user_msghdr * | msg, | ||
int | flags | ||
) |
Transmit message to socket.
[in] | fd | File descriptor as returned by rt_dev_socket() |
[in] | msg | Message descriptor |
[in] | flags | Message flags |
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
sendmsg()
in IEEE Std 1003.1, http://www.opengroup.org/onlinepubs/009695399 ssize_t rt_dev_sendto | ( | int | fd, |
const void * | buf, | ||
size_t | len, | ||
int | flags, | ||
const struct sockaddr * | to, | ||
socklen_t | tolen | ||
) |
Transmit message to socket.
[in] | fd | File descriptor as returned by rt_dev_socket() |
[in] | buf | Message buffer |
[in] | len | Message buffer size |
[in] | flags | Message flags |
[in] | to | Buffer for message destination address |
[in] | tolen | Address buffer size |
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
sendto()
in IEEE Std 1003.1, http://www.opengroup.org/onlinepubs/009695399 int rt_dev_setsockopt | ( | int | fd, |
int | level, | ||
int | optname, | ||
const void * | optval, | ||
socklen_t | optlen | ||
) |
Set socket option.
[in] | fd | File descriptor as returned by rt_dev_socket() |
[in] | level | Addressed stack level |
[in] | optname | Option name ID |
[in] | optval | Value buffer |
[in] | optlen | Value buffer size |
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
setsockopt()
in IEEE Std 1003.1, http://www.opengroup.org/onlinepubs/009695399 int rt_dev_shutdown | ( | int | fd, |
int | how | ||
) |
Shut down parts of a connection.
[in] | fd | File descriptor as returned by rt_dev_socket() |
[in] | how | Specifies the part to be shut down (SHUT_xxx ) |
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
shutdown()
in IEEE Std 1003.1, http://www.opengroup.org/onlinepubs/009695399 int rt_dev_socket | ( | int | protocol_family, |
int | socket_type, | ||
int | protocol | ||
) |
Create a socket.
[in] | protocol_family | Protocol family (PF_xxx ) |
[in] | socket_type | Socket type (SOCK_xxx ) |
[in] | protocol | Protocol ID, 0 for default |
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
socket()
in IEEE Std 1003.1, http://www.opengroup.org/onlinepubs/009695399 ssize_t rt_dev_write | ( | int | fd, |
const void * | buf, | ||
size_t | nbyte | ||
) |
Write to device.
[in] | fd | File descriptor as returned by rt_dev_open() |
[in] | buf | Output buffer |
[in] | nbyte | Number of bytes to write |
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
write()
in IEEE Std 1003.1, http://www.opengroup.org/onlinepubs/009695399