Xenomai  3.0.5
rtdm.h
Go to the documentation of this file.
1 
23 #ifndef _RTDM_UAPI_RTDM_H
24 #define _RTDM_UAPI_RTDM_H
25 
35 #define RTDM_API_VER 9
36 
38 #define RTDM_API_MIN_COMPAT_VER 9
39 
43 typedef uint64_t nanosecs_abs_t;
44 
49 typedef int64_t nanosecs_rel_t;
50 
56 #define RTDM_TIMEOUT_INFINITE 0
57 
59 #define RTDM_TIMEOUT_NONE (-1)
60 
72 #define RTDM_CLASS_PARPORT 1
73 #define RTDM_CLASS_SERIAL 2
74 #define RTDM_CLASS_CAN 3
75 #define RTDM_CLASS_NETWORK 4
76 #define RTDM_CLASS_RTMAC 5
77 #define RTDM_CLASS_TESTING 6
78 #define RTDM_CLASS_RTIPC 7
79 #define RTDM_CLASS_COBALT 8
80 #define RTDM_CLASS_UDD 9
81 #define RTDM_CLASS_MEMORY 10
82 #define RTDM_CLASS_GPIO 11
83 #define RTDM_CLASS_SPI 12
84 
85 #define RTDM_CLASS_MISC 223
86 #define RTDM_CLASS_EXPERIMENTAL 224
87 #define RTDM_CLASS_MAX 255
88 
90 #define RTDM_SUBCLASS_GENERIC (-1)
91 
92 #define RTIOC_TYPE_COMMON 0
93 
99 #define RTDM_MAX_DEVNAME_LEN 31
100 
105 typedef struct rtdm_device_info {
108 
111 
116 
120 
125 #define RTDM_PURGE_RX_BUFFER 0x0001
126 #define RTDM_PURGE_TX_BUFFER 0x0002
127 
139 #define RTIOC_DEVICE_INFO \
140  _IOR(RTIOC_TYPE_COMMON, 0x00, struct rtdm_device_info)
141 
146 #define RTIOC_PURGE _IOW(RTIOC_TYPE_COMMON, 0x10, int)
147 
150 /* Internally used for mapping socket functions on IOCTLs */
151 struct _rtdm_getsockopt_args {
152  int level;
153  int optname;
154  void *optval;
155  socklen_t *optlen;
156 };
157 
158 struct _rtdm_setsockopt_args {
159  int level;
160  int optname;
161  const void *optval;
162  socklen_t optlen;
163 };
164 
165 struct _rtdm_getsockaddr_args {
166  struct sockaddr *addr;
167  socklen_t *addrlen;
168 };
169 
170 struct _rtdm_setsockaddr_args {
171  const struct sockaddr *addr;
172  socklen_t addrlen;
173 };
174 
175 #define _RTIOC_GETSOCKOPT _IOW(RTIOC_TYPE_COMMON, 0x20, \
176  struct _rtdm_getsockopt_args)
177 #define _RTIOC_SETSOCKOPT _IOW(RTIOC_TYPE_COMMON, 0x21, \
178  struct _rtdm_setsockopt_args)
179 #define _RTIOC_BIND _IOW(RTIOC_TYPE_COMMON, 0x22, \
180  struct _rtdm_setsockaddr_args)
181 #define _RTIOC_CONNECT _IOW(RTIOC_TYPE_COMMON, 0x23, \
182  struct _rtdm_setsockaddr_args)
183 #define _RTIOC_LISTEN _IOW(RTIOC_TYPE_COMMON, 0x24, \
184  int)
185 #define _RTIOC_ACCEPT _IOW(RTIOC_TYPE_COMMON, 0x25, \
186  struct _rtdm_getsockaddr_args)
187 #define _RTIOC_GETSOCKNAME _IOW(RTIOC_TYPE_COMMON, 0x26, \
188  struct _rtdm_getsockaddr_args)
189 #define _RTIOC_GETPEERNAME _IOW(RTIOC_TYPE_COMMON, 0x27, \
190  struct _rtdm_getsockaddr_args)
191 #define _RTIOC_SHUTDOWN _IOW(RTIOC_TYPE_COMMON, 0x28, \
192  int)
193 
194 /* Internally used for mmap() */
195 struct _rtdm_mmap_request {
196  __u64 offset;
197  size_t length;
198  int prot;
199  int flags;
200 };
201 
202 #endif /* !_RTDM_UAPI_RTDM_H */
struct rtdm_device_info rtdm_device_info_t
Device information.
int64_t nanosecs_rel_t
RTDM type for representing relative intervals.
Definition: rtdm.h:49
int device_sub_class
Device sub-class, either RTDM_SUBCLASS_GENERIC or a RTDM_SUBCLASS_xxx definition of the related Devic...
Definition: rtdm.h:115
uint64_t nanosecs_abs_t
RTDM type for representing absolute dates.
Definition: rtdm.h:43
int profile_version
Supported device profile version.
Definition: rtdm.h:118
int device_flags
Device flags, see Device Flags for details.
Definition: rtdm.h:107
Device information.
Definition: rtdm.h:105
int device_class
Device class ID, see RTDM_CLASS_xxx.
Definition: rtdm.h:110