• C#串口官方库


    public const int InfiniteTimeout = -1;        只读 -1值

    public SerialPort();        串口默认构造

    public SerialPort(IContainer container);        接口

    SerialPort(串口名, 波特率, 校验, 数据位, 停止位);        96N81

    // 属性

    public Handshake Handshake        硬件流控制

    public Encoding Encoding         文本编码

    public bool DtrEnable                终端就绪 (DTR) 信号。

    public bool CtsHolding                可以发送

    public bool DiscardNull         忽略 Null 字节

    public int DataBits         数据位长度。

    public bool IsOpen        串行端口已打开

    public bool DsrHolding        获取数据设置就绪 (DSR) 信号的状态。

    public string NewLine        表示行尾的值。默认值为换行符

    public int ReadBufferSize       字节 默认值为 4096;

    public byte ParityReplace        奇偶校验错误时替换数据流中的无效字节。

    public string PortName

    public bool CDHolding        载波检测

    public int ReadTimeout        毫秒数

    public int ReceivedBytesThreshold        事件发生前内部输入缓冲区中的字节数。

    public bool RtsEnable                请求发送 (RTS) 信号

    public StopBits StopBits

    public int WriteBufferSize

    public int WriteTimeout

    public Parity Parity

    public int BytesToRead

    public int BaudRate

    public bool BreakState

    public Stream BaseStream 

    public int BytesToWrite

    public event SerialErrorReceivedEventHandler ErrorReceived;

    public event SerialDataReceivedEventHandler DataReceived;

    public event SerialPinChangedEventHandler PinChanged;

    static string[] GetPortNames();

    void Close();

    void DiscardInBuffer();

    void DiscardOutBuffer();

    void Open();

    int Read(byte[] buffer, int offset, int count);

    int Read(char[] buffer, int offset, int count);

    int ReadByte();

    int ReadChar();

    string ReadExisting();

    string ReadLine();

    string ReadTo(string value);

    void Write(byte[] buffer, int offset, int count);

    void Write(string text);

    void Write(char[] buffer, int offset, int count);

    void WriteLine(string text);

    override void Dispose(bool disposing);

  • 相关阅读:
    R语言—向量
    【宠物用品】宠物饮水机方案
    计算机毕业设计Java影音娱乐销售管理系统(系统+程序+mysql数据库+Lw文档)
    Scala数据结构
    408王道操作系统强化——文件管理及大题解构
    C++11 - 3 - lambda表达式
    LED点灯
    【数据结构】顺序表的概念及实现
    阿里云python训练营-Python基础学习01
    脉冲神经网络原理及应用,脉冲神经网络编码方式
  • 原文地址:https://blog.csdn.net/cfqq1989/article/details/126275125