📄 ptz_rs232ctrl.h
字号:
/* set tabstop=4 *//******************************************************************************** * * * Copyright(C) 2004 Penta-Micro * * * * ALL RIGHT RESERVED * * * * This software is the property of Penta-Micro and is furnished under * * license by Penta-Micro. This software may be used only in accordance * * with the terms of said license. This copyright notice may not be * * removed, modified or obliterated without the prior written permission * * of Penta-Micro. * * * * This software may not be copyed, transmitted, provided to or otherwise * * made available to any other person, company, corporation or other entity * * except as specified in the terms of said license. * * * * No right, title, ownership or other interest in the software is hereby * * granted or transferred. * * * * The information contained herein is subject to change without notice and * * should not be construed as a commitment by Penta-Micro. * * * ******************************************************************************** MODULE NAME: ptz_rs232ctrl.h REVISION HISTORY: Date Ver Name Description ---------- --- --------------------- ----------------------------------------- 07/09/2003 1.0 Mhpark Created 02/01/2005 1.1 JiGwanKang(xchannel) Modify(arrangement) ............................................................................... DESCRIPTION: This Module contains definition for ptz contol(rs232/422/485). ...............................................................................*/ #ifndef __PTZ_RS232CTRL_H#define __PTZ_RS232CTRL_H/** ************************************************************************* ** ** includes ** ************************************************************************* **/#include <sys/termios.h>#include "typedef.h" /** ************************************************************************* ** ** defines ** ************************************************************************* **/#define MAXREADCHARS 64#define MAXFILECHARS 16/** ************************************************************************* ** ** typedefs ** ************************************************************************* **/typedef struct { char *device; int baudrate; int databits; char parity; int stopbits; int xonxoff; int rtscts;} tCommParms;typedef struct { int write; int read; int readlength; int mdln; float wait; float pause; int msec;} tCmdParms;typedef struct { int dtr; int rts;} tMdLines;typedef int tRS232; /* serial device handle *//** ************************************************************************* ** ** function prototypes ** ************************************************************************* **/RETURN rs232_init (tRS232, tCommParms *);tRS232 rs232_open (char const *);RETURN rs232_close (tRS232);RETURN rs232_send (tRS232, char *, unsigned short int);UNS8 *rs232_read (tRS232, char *, int);void rs232_wait (float, int);void Abort (tRS232);void sighandler (int whatever );RETURN setBaudRate (struct termios *rs232_attr, int baudrate);RETURN setDataBits (struct termios *rs232_attr, int databits);RETURN setParity (struct termios *rs232_attr, char parity);RETURN setStopBits (struct termios *rs232_attr, int stopbits);RETURN setFlowCtl (struct termios *rs232_attr, int xonxoff, int rtscts);void modemLine (int *mdlns, int enabled, int mask);RETURN rs232_mdlns (tRS232 rs232, tMdLines *mdLine);RETURN SendComm (unsigned char *buff_sg, int size, unsigned int model_id);void Get_PTZ_Params(unsigned int vendor , tCommParms *commParm);void rs232_main (tCommParms *, tCmdParms *, unsigned char *, unsigned short int);#endif /* __PTZ_RS232CTRL_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -