⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 com.hxx

📁 Pelco_p协议c++实现
💻 HXX
字号:
#ifndef _COM_H_
#define _COM_H_

#include <stdio.h>      /*标准输入输出定义*/
#include <stdlib.h>     /*标准函数库定义*/
#include <unistd.h>     /*Unix 标准函数定义*/
#include <sys/types.h>  
#include <sys/stat.h>   
#include <fcntl.h>      /*文件控制定义*/
#include <termios.h>    /*PPSIX 终端控制定义*/
#include <errno.h>      /*错误号定义*/
#include <pthread.h>    /*线程库定义*/

class CCOM
{
    private:
    int fd;
    public:
    CCOM();
    ~CCOM();
    void OpenCOM();
    void set_speed(int speed);
    bool set_Parity(int databits,int stopbits,int parity);
    int SendData(void *buffer,int Len);
    int ReadData(void *buffer,int Len);
    void CloseCOM();
};
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -