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

📄 rs232com.h

📁 RS232串口通信编程
💻 H
📖 第 1 页 / 共 2 页
字号:
// *========================================================================*
// * (c) Copyright KYLINK COMMUNICATIONS CORP. 1998                         *
// * Edited by Banjars Shen, 1998/07/01~1998/07/07                          *
// *========================================================================*
// * Header: RS232Com.h                                                     *
// *========================================================================*
// * [Inherit RelationShip]                                                 *
// * TObject --- TComponent --- RS232Com                                    *
// *========================================================================*
// * Description : RS232Com is the class for RS232 Communication Control.   *
// *========================================================================*
// * [Properties]                                                           *
// *========================================================================*
// *  Property              Visibility      Default                         *
// *------------------------------------------------------------------------*
// *  PortNumber            public          COM_2                           *
// *  Baudrate              public          B_9600                          *
// *  DataBits              public          8                               *
// *  StopBits              public          One                             *
// *  Parity                public          No                              *
// **************************************************************************
// * PortNumber                                                             *
// *------------------------------------------------------------------------*
// * Description: __property COMPORT PortNumber;                            *
// *              Indicate which RS232 Port to use.                         *
// *              ----------------------------------------------------------*
// *              Port        Meaning                                       *
// *              ----------------------------------------------------------*
// *              COM_1       RS232 COM 1                                   *
// *              COM_2       RS232 COM 2                                   *
// *              COM_3       RS232 COM 3                                   *
// *              COM_4       RS232 COM 4                                   *
// *              ----------------------------------------------------------*
// *              Reference to enum COMPORT.                                *
// **************************************************************************
// * BaudRate                                                               *
// *------------------------------------------------------------------------*
// * Description: __property BAUDRATE BaudRate;                             *
// *              RS232 BaudRate.                                           *
// *              ----------------------------------------------------------*
// *              BaudRate      Meaning                                     *
// *              ----------------------------------------------------------*
// *              B_9600        9600 Bits/Sec                               *
// *              B_14400       14400 Bits/Sec                              *
// *              B_19200       19200 Bits/Sec                              *
// *              B_38400       38400 Bits/Sec                              *
// *              B_56000       56000 Bits/Sec                              *
// *              B_57600       57600 Bits/Sec                              *
// *              ----------------------------------------------------------*
// *              Reference to enum BAUDRATE.                               *
// **************************************************************************
// * StopBits                                                               *
// *------------------------------------------------------------------------*
// * Description: __property char DataBits;                                 *
// *              RS232 Data Bits                                           *
// *              ----------------------------------------------------------*
// *              DataBits      Meaning                                     *
// *              ----------------------------------------------------------*
// *              5             5 Data Bits                                 *
// *              6             6 Data Bits                                 *
// *              7             7 Data Bits                                 *
// *              8             8 Data Bits                                 *
// *              ----------------------------------------------------------*
// **************************************************************************
// * Parity                                                                 *
// *------------------------------------------------------------------------*
// * Description: __property PARITY Parity;                                 *
// *              RS232 Parity                                              *
// *              ----------------------------------------------------------*
// *              Parity        Meaning                                     *
// *              ----------------------------------------------------------*
// *              EvenParity    Even Parity                                 *
// *              MarkParity    Mark Parity                                 *
// *              NoParity      No Parity                                   *
// *              OddParity     Odd Parity                                  *
// *              ----------------------------------------------------------*
// *              Reference to enum PARITY.                                 *
// *========================================================================*
// * [Methods]                                                                *
// *========================================================================*
// * Method                 Visibility                                      *
// *------------------------------------------------------------------------*
// * RS232Com               public                                          *
// * ~RS232Com              public                                          *
// * SetPort                protected                                       *
// * GetPort                protected                                       *
// * SetBaudRate            protected                                       *
// * GetBaudRate            protected                                       *
// * SetDataBits            protected                                       *
// * GetDataBits            protected                                       *
// * SetParity              protected                                       *
// * GetParity              protected                                       *
// * SetStopBits            protected                                       *
// * GetStopBits            protected                                       *
// * Open                   public                                          *
// * IsOpen                 public                                          *
// * IsRxData            public                                             *
// * Read                   public                                          *
// * Write                  public                                          *
// * Flush                  public                                          *
// * Close                  public                                          *
// **************************************************************************
// * RS232Com                                                               *
// *------------------------------------------------------------------------*
// * Description: __fastcall RS232Com(TComponent* Owner);                   *
// *              Set RS232 COM default parameter.                          *
// * Parameter  : Not used Here(Don't care).
// * Return     : None.                                                     *
// **************************************************************************
// * ~RS232Com                                                              *
// *------------------------------------------------------------------------*
// * Description: __fastcall ~RS232Com();                                   *
// *              Close RS232 COM port.                                     *

⌨️ 快捷键说明

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