📄 eibdrv.h
字号:
/* --------------------------------------------------------------------------- eibdrv.h --------------------------------------------------------------------------- eibdrv Version 0.2.1 Copyright (C) 2002, Wolfgang Tumfart Donaustrasse 104/9 A-2344 Maria Enzersdorf Austria (Europe) tumfart@auto.tuwien.ac.at This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. --------------------------------------------------------------------------- */#ifndef EIBDRV_H#define EIBDRV_H// Module parameter#define FT_STANDARDMODE 0 // module operates in standard mode#define FT_SERVERMODE 1 // module operates in server mode#define FT_WRITE_STANDARD 0 // write accesses wo BCU2 acknowledgement#define FT_WRITE_ACKNOWLEDGED 1 // write accesses w BCU2 acknowledgement#define EIB_BUF_ELEMENT_SIZE 23 // maximal message length (in chars)/* --------------------------------------------------------------------------- */// Module method: ioctl (values for argument cmd)#define FT_IOC_MAGIC 100#define FT_GET_OUTBUF_SIZE _IO(FT_IOC_MAGIC,1) #define FT_SET_OUTBUF_SIZE _IO(FT_IOC_MAGIC,2) #define FT_GET_WPBUF_SIZE _IO(FT_IOC_MAGIC,3) #define FT_SET_WPBUF_SIZE _IO(FT_IOC_MAGIC,4)#define FT_GET_RPBUF_SIZE _IO(FT_IOC_MAGIC,5)#define FT_SET_RPBUF_SIZE _IO(FT_IOC_MAGIC,6)#define FT_GET_RPBUF_MSGSIZE _IO(FT_IOC_MAGIC,7)#define FT_SET_RPBUF_MSGSIZE _IO(FT_IOC_MAGIC,8)#define FT_GET_MODE _IO(FT_IOC_MAGIC,9) #define FT_GET_BAUDRATE _IO(FT_IOC_MAGIC,10) #define FT_GET_PORT_LENGTH _IO(FT_IOC_MAGIC,11) #define FT_GET_PORT _IO(FT_IOC_MAGIC,12) #define FT_SET_WRITE_MODE _IO(FT_IOC_MAGIC,13) #define FT_GET_WRITE_MODE _IO(FT_IOC_MAGIC,14) #define FT_ISSERVPROC _IO(FT_IOC_MAGIC,15) #define FT_RESET _IO(FT_IOC_MAGIC,16) #define FT_RESP_STATUS _IO(FT_IOC_MAGIC,17) #define FT_RESET_STAT _IO(FT_IOC_MAGIC,18)#define FT_GET_STAT _IO(FT_IOC_MAGIC,19)#define FT_GETRESET_STAT _IO(FT_IOC_MAGIC,20)/* --------------------------------------------------------------------------- */// Error codes#define ENORESULT 201 // write request not processed yet#define ENOPROC 202 // no process with given id in list#define ESIZE 203 // resize rejected#define EDEVISOPEN 204 // process has already opened device#define ENORESET 205 // reset of ft-protocol failed#define ENORESPSTATUS 206 // request for status of BCU2 failed/* --------------------------------------------------------------------------- */// Statistical information of buffer usage, write success, read retransmissions// and total write time to serial port.typedef struct { unsigned long outbuf_count; // No. messages in outbuf unsigned long wpbuf_count; // No. write processes in wpbuf unsigned long rpbuf_count; // No. read processes that opened device unsigned long write[4]; // No. SEND_UDATA succeeded in first write [1], // second write [2], third write [3] or failed [0] unsigned long read[3]; // SEND_UDATA received without retransmission [0], // with one [1] or two [2] retransmissions struct timeval total_w1time; // total write time for write1-SEND_UDATA int overflow; // 0 ... statistics valid, 1 ... statistics void } Eib_statistics;#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -