Xenomai 3 Programmer's Reference Manual

所需积分/C币:50 2017-01-05 11:23:54 2.02MB PDF
24
收藏 收藏
举报

Xenomai 3 Programmer's Reference Manual
Contents 1 API service tags 2 Deprecated List 3 Module index 3.1 Modules 4 Data structure Index 4.1 Data structures 5 File Inder 5.1 File List 6 Module documentation 6. 1 Channels and ranges 6.1.1 Detailed Description 22 6.2 Big dual 6. 2. 1 Detailed Description 24 6.2.2 Macro Definition Documentation 24 6.2.2.1 cobalt atomic enter 24 6.2.2.2 cobalt atomic leave 6.2.2.3 RTDM EXECUTE ATOMICALLY 25 6.3 Spinlock with preemption deactivate 27 6.3. 1 Detailed descript 27 6.3.2 Macro Definition Documentation 27 6.3.2.1 tdm lock get ir 6.3.2.2 tdm lock irgrestore 29 6.3.2.3 tdm lock irgsave 6.3.3 Function Documentation 6.3.3.1 tdm_lock_get(rtdm_lock_t+lo 29 6.3.3.2 tdm_lock_init(rtdm_lock_t +lock) 29 6.3.3.3 tdm lock put(tdm lock t*lock 30 6.3.3.4 tdm lock put irgrestore(tdm lock t*lock, rtdm lockctx t context) CONTENTS 6.4 User-space driver core 3 6.4.1 Detailed Description 32 6.4.2 Macro Definition Documentation 32 6.4.2.1 UDD IRQ CUSTOM 32 6.4.2.2 UDD IRQ NONE 32 6.4.2.3 UDD MEM LOGICAL 6.4.2.4∪ DD MEM N○ONE. 33 6.4.2.5 UDD MEM PHYS 33 6.4.2.6 UDD MEM VIRTUAL 33 6.4.2.7 UDD RTIOC IRQDIS 33 6.4.2.8 UDD RTIOC IRQEN 6.4.2.9 UDD RTIOC IRQSIG 34 6.4.3 Function Documentation 34 6.4.3.1 udd disable irqlstruct udd device *udd, rtdm event t *done) 6.4.3.2 udd enable ira(struct udd device *udd, rtdm event t *done 34 6.4.3.3 udd get device(struct tdm fd *fd 35 6.4.3.4 udd notify_event(struct udd device *udd) 35 6.4.3.5 udd_register__device(struct udd_device *udd) 6 6. 4.3.6 udd_ unregister_device(struct udd_ device *udd) 36 6.5 Thread state flags 37 6.5.1 Detailed Description 38 6.5.2 Macro Definition Documentation 6.5.2.1 XNHELD 38 6.5.2.2 XNMIGRATE 6.5.2.3 XNPEND.,,,,, 38 6.5.2. 4 XNREADY 38 6.5.2.5 XNSUSP 38 6.5.2.6 XNTRAPLB 38 6.6 Thread information flags 39 6.6.1 Detailed Description 39 6.7 CAN Devices 6.7.1 Detailed Description 46 6.7.2 Macro Definition Documentation 50 6.7.2.1 CAN CTRLMODE 3 SAMPLES 50 6.7.2.2 CAN CTRLMODE LISTENONLY 50 6.7.2. 3 CAN CTRLMODE LOOPBACK 50 6.7.2.4 CAN ERR LOSTARB UNSPEC 50 6.7.2.5 CAN RAW ERR FILTER 50 6.7.2.6 CAN RAW FILTER 5 6.7.2.7 CAN RAW LOOPBACK Generated by doxygen CONTENTS 6.7.2. 8 CAN RAW RECV OWN MSGS 52 6.7.2.9 RTCAN RTIOC RCV TIMEOUT 52 6.7.2.10 RTCAN RTIOC SND TIMEOUT 53 6.7.2.11 RTCAN RTIOC TAKE TIMESTAMP 6.7.2.12 SIOCGCANBAUDRATE 54 6.7.2.13 SIOCGCANCTRLMODE 6.7.2. 14 SIOCGCANCUSTOMBITTIME 54 6.7.2.15 SIOCGCANSTATE 55 6.7.2.16 SIOCGIFINDEX 55 6.7.2.17 SIOCSCANBAUDRATE 56 6.7.2.18 SIOCSCANCTRLMODE 6.7.2.19 SIOCSCANCUSTOMBITTIME 6.7.2.20 SIOCSCANMODE 58 6.7.2.21 SOL CAN RAW 58 6.7.3 Typedef Documentation 58 6.7.3.1 can filter t 58 6.7.3.2 can frame t 59 6.7.4 Enumeration Type Documentation 59 6.74.1 CAN BITTIME TYPE 59 6.7.4.2 CAN MODE 59 6.7.4.3 CAN STATE 59 6. 8 RTDM 6.8.1 Detailed Description 62 6.8.2 Macro Definition Documentation 62 6.8.2.1 RTDM TIMEOUT INFINITE 2 6.8.2.2 RTDM TIMEOUT NONE 62 6.8.3 Typedef Documentation 6.8.3.1 nanosec abs t 62 6.8.3.2 nanosec rel t 62 6.9 RTDM User API 6.9.1 Detailed Description 63 6.10 Serial Devices 64 6.11 Testing devices 6 6.12 Real-time IPC 67 6. 12.1 Detailed Description 69 6.12.2 Macro definition documentation 6.12.2.1 BUFP BUFSZ 69 6.12.2.2 BUFP LABEL 70 6.12.2.3 IDDP LABEL 71 6.12.2.4 IDDP POOLSZ Generated by Doxygen CONTENTS 6.12.2.5 SO RCVTIMEO 6.12.2.6 SO SNDTIMEO 72 6.12.2.7 XDDP BUFSZ 6.12.2.8 XDDP EVTDOWN 73 6.12.2.9 XDDP EVTIN 6.12.2.10XDDP EVTNOBUF 74 6.12.2.11XDDP EVTOUT 74 6.12.2.12XDDP LABEL 74 6.12.2.13XDDP MONITOR 75 6.12.2.14XDDP POOLSZ 6. 12.3 Enumeration Type Documentation 6. 12.3.1 anonymous enum 76 6.12. 4 Function documentation 6. 12.4.1 bind AF_ RTiPc(int sockfd, const struct sockaddr_ipc * addr, socklen_t addrlen) 6. 12.4.2 close AF_RTIPC(int sockfd) 78 6. 12.4.3 connect AF RTIPC(int socktd, const struct sockaddr ipc *addr socklen t addrlen) 78 6. 12.4.4 getpeername AF_ RTIPC(int sockfd, struct sockaddr_ipc *addr, socklen t*addrlen) 79 6. 4.5 getsockname AF_RTIPC(int sockfd, struct sockaddr_ipc +addr, socklen t*addrlen 6. 12.4.6 getsockopt AF RTiPC(int sockfd, int level, int optname, void *optval, socklen t*optlen) 6. 12. 4.7 recvmsg. AF_RTIPC(int sockfd, struct msghdr +msg, int flags) 80 6. 12.4.8 sendmsg_AF_RTIPC(int sockfd, const struct msghdr +msg, int flags 80 6. 12.4.9 setsockopt AF RTIPC(int socktd, int level, int optname, const void *optval, socklen t optlen) 8 6.12.4.10socket AF RTiPC(int domain=AF RTIPC, int type=SOCK DGRAM nt protocol) 8 6. 13 Asynchronous Procedure Calls 83 6. 13.1 Detailed Description 83 6.13.2 Function Documentation 83 6. 13.2.1 xnapc_alloc(const char *name, void(*handler)(void *cookie), void * cookie)83 6. 13.2.2 xnapc free (int apc) 84 6. 13.2.3 xnapc_schedule(int apc) 84 6.14 In-kernel arithmetics 85 6. 14.1 Detailed Description 85 6.14.2 Function Documentation 85 6. 14.2.1 xnarch_generic_full_divmod64( unsigned longlong a, unsigned longlong b, unsigned longlong *rem) 6. 15 Buffer descriptor 86 Generated by doxygen CONTENTS vii 6. 15.1 Detailed Description 86 6.15.2 Function documentation 88 6. 15.2.1 xnbufd copy_ from kmem(struct xnbufd +bund, void +from, size t len) 88 6. 15.2.2 xnbutd copy to kmem(void *ptr, struct xnbutd *but, size t len 6. 15.2.3 xnbutd invalidate(struct xnbutd *butd) 90 6. 15.2.4 xnbutd map kread(struct xnbutd *butd, const void *ptr, size t len) 90 6. 15.2.5 xnbutd map kwrite(struct xnbufd *bufo, void *ptr, size t len 90 6.15. 2.6 xnbufd_map_uread (struct xnbufd *bud, const void _user xptr, size_ t len) 91 6. 15. 2.7 Xnbufd_map_uwrite(struct xnbufd *bufd, void__user *ptr, size_t len)... 91 6. 15.2.8 xnbufd reset(struct xnbufd *bufd 6. 15.2. 9 xnbufd_unmap kread(struct xnbufd +bufd) 6. 15.2. 10xnbufd_unmap_kwrite(struct xnbufd +bufd 92 6. 15.2. 1 1xnbutd unmap uread(struct xnbutd *butd 92 6. 15.2. 12xnbufd unmap write struct xnbufd *bufd 93 6.16 Clock services 94 6.16.1 Detailed Description 94 6.16.2 Function Documentation 94 6. 16.2. 1 nclock_ adjust(struct xclock * clock, xnsticks t delta) 94 6. 16.2.2 xclock_deregister(struct xclock *clock) 6. 16.2.3 xclock_register(struct xnclock +clock, const cpumask_t *affinity) 6 6. 4 xclock tick(struct xclock *clock, 96 6. 17 Debugging services 97 6. 17.1 Detailed Description 97 6. 18 Dynamic memory allocation services 98 6. 18.1 Detailed Description 98 6.18.2 Function Documentation 99 6. 18.2.1 Xnheap_alloc(struct xnheap *heap, u32 size 6.18.2.2 Xnheap_destroy(struct xnheap *heap) 6. 18.2.3 xnheap free(struct xnheap *heap, void +block) 99 6. 18.2.4 xnheap init(struct xnheap *heap, void *membase, u 32 size 100 6.18.2.5 xnheap set name(struct xnheap*heap, const char *name, 100 6.19 Cobalt 101 6.19.1 Detailed Description 101 6.20 Cobalt kernel 2 6. 20.1 Detailed Description 103 6. 20.1.1 Dual kernel service tags 103 6.21 Interrupt management 105 6.21.1 Detailed Description 105 6.21.2 Function Documentation 105 6. 21.2.1 nintr affinity(struct xnintr *intr, cpumask t cpumask) 105 Generated by Doxygen CONTENTS 6.21.2.2 xnintr attach(struct xnintr *intr, void *cookie) 106 6. 21. 2. 3 xnintr_destroy(struct xnintr *intr) 106 6.21.2. 4 xnintr_ detach (struct xnintr intr 106 6. 21.2.5 xnintr_ disable(struct xnintr *intr) 107 6.21.2.6 Xnintr enable(struct xnintr *intr) ..107 6.21. 2.7 xnintr init(struct xnintr *intr, const char *name, unsigned int irg, xnisr_ t isr, xniack t iack, int flags 107 6.22 Locking services .109 6. 22.1 Detailed Description 109 6.22.2 Macro Definition Documentation Q 6.22.2. 1 splexit 109 6. 22.2.2 splhigh 110 6.22.2.3 spltest 110 6.23 Lightweight key-to-object mapping service 111 6. 23.1 Detailed Description 111 6.23.2 Function Documentation 6. 23.2.1 nmap create(int nkeys, int reserve, int offset 6. 23. 2.2 nmap_delete(struct nmap * map 112 6. 23. 2.3 nmap_enter(struct nmap *map, int key, void objaddr 112 6. 23. 2.4 nmap_fetch(struct nmap *map, int key) 113 6. 23.2.5 nmap_fetch_nocheck(struct nmap +map, int key .113 6. 23.2.6 Nmap remove( struct nmap*map, int key) 114 6. 24 Registry services 116 6. 24.1 Detailed Description .116 6.24.2 Function Documentation .116 6. 1 xnregistry bind(const char *key, xnticks t timeout, int timeout mode, xnhandle t *phandle 16 6.24.2.2 Xnregistry-_enter(const char *key, void wobjaddr, xnhandle t *phandle,117 struct xnpnode +pnode) 6. 24.2.3 Xnregistry_lookup(xnhandle_ t handle, unsigned long stamp_r) .118 6. 24.2. 4 registry remove(xnhandle t handle) 119 6.24.2.5 xnregistry unlink(const char *key) 119 6.25 Driver programming interface 6. 25.1 Detailed Description .120 6.26 Driver to driver services 121 6.26.1 Detailed Description 122 6.26.2 Function documentation 122 6.26.2.1 rtdm accept(int fd, struct sockaddr +addr, socklen t * addrlen) 122 6. 26. 2.2 rtdm_ bind(int fd, const struct sockaddr +my_ addr, socklen_t addrlen) 6.26.2.3 tdm close(int fd 123 6.26.2. 4 rtdm connect(int fd, const struct sockaddr *serv addr, socklen t addrlen)124 Generated by doxygen CONTENTS i 6. 26.2.5 rtdm_ getpeername (int fd, struct sockaddr *name, socklen_ t+namelen ). 124 6. 26.2.6 rtdm getsockname(int fd, struct sockaddr * name, socklen t *namelen). 125 6. 26. 2.7 rtdm getsockopt(int fd, int level, int optname, void *optval, socklen_+ t *optlen) ..125 6. 26.2.8 tdm_ioctl(int fd. int request,. 126 6. 9 rtdm listen(int fd, int backlog 127 6. 26. 2. 1Ortdm_open(const char*path, int oflag, .. ,,,,127 6. 26.2.1 rtdm_read(int fd, void *buf, size_t nbyte 128 6. 26.2.12rtdm recv(int fd, void *buf, size t len, int flags) 128 6. 26. 2. 1 3rtdm recvfrom(int fd, void *buf, size_t len, int flags, struct sockaddr *from socklen t*fromlen) .129 6.26.2.14rtdm recvmsg(int fd, struct user_ msghdr +msg, int flags) 129 6. 26.2. 5rtdm send(int fd, const void *buf, size t len, int flags) 130 6. 26. 2. 1 6rtdm_sendmsg(int fd, const struct user_msghdr *msg, int flags) 130 6. 26.2.1 7rtdm_sendto(int fd, const void +buf, size_t len, int flags, const struct sock addr *to, socklen t tolen) 131 6. 26. 2. 18rtdm_setsockopt(int fd, int level, int optname, const void *optval socklen_t optlen) ,,,,132 6.26.2.1 9rtdm shutdown(int td, int how) 132 6. 26.2.2Ortdm socket(int protocol family, int socket type, int protocol) 133 6. 26.2.2irtdm_write(int fd, const void Mbuf, size t mbyte 133 6.27 Device Profiles 134 6. 27.1 Detailed Description .135 6.27.2 Macro definition documentation 136 6.27.2.1 RTIOC DEVICE INFO 136 6.27.2.2 RTIOC PURGE 137 6.28 Device Registration Services 138 6. 28.1 Detailed Description 139 6.28.2 Macro Definition Documentation 139 6.28,2.1 RTDM DEVICE TYPE MASK 139 6.28.2.2 RTDM EXCLUSIVE 6.28.2. 3 RTDM FIXED MINOR 139 6.28.2. 4 RTDM MAX MINOR 139 6.28.2.5 RTDM NAMED DEVICE 140 6.28.2.6 RTDM PROTOCOL DEVICE 140 6.28. 3 Function Documentation 140 6. 28.3.1 rtdm close handler(struct rtdm fd *fd) 140 6. 28. 3.2 rtdm_dev_register(struct rtdm_device *dev) 140 6. 28.3.3 rtdm_dev_unregister(struct rtdm_device +dev) 141 6.28.3.4 tdm drv set sysclass(struct tdm driver *drv, struct class cls) 141 Generated by Doxygen CONTENTS 6. 28.3.5 rtdm_get_unmapped area handler (struct tdm fd *fd, unsigned long len, unsigned long pgoff, unsigned long flags) 141 6. 28.3.6 rtdm_ioctl_ handler(struct tdm_fd +fd, unsigned int request, void_user g) 142 6.28.3. tdm mmap handler(struct tdm fd td, struct vm area struct *vma).. 142 6. 28.3.8 tdm open handler(struct rtdm fd *fd, int oflags) 143 6. 28.3.9 tdm read handler(struct rtdm fd *fd, void user *buf, size t size)... 143 6. 28.3. 1Ortdm_recvmsg_ handler(struct tdm_ fd *fd, struct user_ msghdr *msg, int flags) 6.28.3. 1 1rtdm select handler(struct rtdm fd *fd, struct xnselector selector, un signed int type, unsigned int index) 144 6. 28.3. 12rtdm sendmsg handler(struct tdm fd *fd, const struct user_ msghdr *msg, int flags 144 6. 28.3.13rtdm socket handler(struct rtdm fd *fd, int protocol) 145 6. 3. 14rtdm write handler(struct rtdm fd *td, const void user *buf, size t size)145 6.29 Clock Services 146 6.29.1 Detailed Description .146 6.29.2 Function Documentation 146 6. 29. 2.1 tdm_clock_ read(void) 146 6. 29.2.2 rtdm_clock_read_ monotonic(void) 146 6.30 Task Services 148 6.30.1 Detailed Description .149 6.30.2 Typedef Documentation 149 6.30.2.1 tdm task proc t 149 6.30.3 Function Documentation 149 6.30.3. 1 tdm task busy sleep(nanosec rel t delay) 149 6. 3.2 tdm task busy wait (bool condition, nanosec_rel t spin_ns, nanosec. el t sleep ns 150 6.30.3. 3 rtdm_task_current(void) 150 6.30.3. 4 rtdm_task_destroy(rtdm_task_t *task ..150 6.30.3.5 tdm task init(rtdm task t +task, const char *name, rtdm task_proc t task_proc, void arg, int priority, nanosec_rel_ t period) 151 6.30.3.6 tdm task join(tdm task t *task 151 6.30.3.7 tdm task set period(rtdm task t *task, nanosec abs t start date, nanosec rel t period) 152 6.30.3.8 tdm_task_set_priority(rtdm_task_t +task, int priority) 153 6.30.3. 9 rtdm_task_should_ stop(void) 153 6.30.3. 1Ortdm task sleep(nanosec_rel t delay) 153 6.30.3. 1 irtdm_ task sleep abs(nanosec_ abs t wakeup time, enum rtdm timer mode mode) 154 6.30.3. 12rtdm_task_sleep_until(nanosec_abs_t wakeup_time) 154 6.30.3. 13rtdm task unblock(tdm task t*task 155 6.30.3. 1 4rtdm task wait period( unsigned long *overruns r) 155 Generated by doxygen

...展开详情
试读 127P Xenomai 3 Programmer's Reference Manual
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
  • 领英

    绑定领英第三方账户获取
  • GitHub

    绑定GitHub第三方账户获取
  • 签到新秀

    累计签到获取,不积跬步,无以至千里,继续坚持!
关注 私信 TA的资源
上传资源赚积分or赚钱
    最新推荐
    Xenomai 3 Programmer's Reference Manual 50积分/C币 立即下载
    1/127
    Xenomai 3 Programmer's Reference Manual第1页
    Xenomai 3 Programmer's Reference Manual第2页
    Xenomai 3 Programmer's Reference Manual第3页
    Xenomai 3 Programmer's Reference Manual第4页
    Xenomai 3 Programmer's Reference Manual第5页
    Xenomai 3 Programmer's Reference Manual第6页
    Xenomai 3 Programmer's Reference Manual第7页
    Xenomai 3 Programmer's Reference Manual第8页
    Xenomai 3 Programmer's Reference Manual第9页
    Xenomai 3 Programmer's Reference Manual第10页
    Xenomai 3 Programmer's Reference Manual第11页
    Xenomai 3 Programmer's Reference Manual第12页
    Xenomai 3 Programmer's Reference Manual第13页
    Xenomai 3 Programmer's Reference Manual第14页
    Xenomai 3 Programmer's Reference Manual第15页
    Xenomai 3 Programmer's Reference Manual第16页
    Xenomai 3 Programmer's Reference Manual第17页
    Xenomai 3 Programmer's Reference Manual第18页
    Xenomai 3 Programmer's Reference Manual第19页
    Xenomai 3 Programmer's Reference Manual第20页

    试读结束, 可继续阅读

    50积分/C币 立即下载 >