基于 C# 的串口操作库:Windup.SerialTalker

jopen 9年前

Windup.SerialTalker 是基于 C# 的串口操作库,简洁的声明,方便的应用协议扩展。

示例代码:

var talker = new Talker () {      PortName = "COM3",      BaudRate = 9600,      LineBreak = new LineBreak () { //set linebreak type          Type = "nt",      },      Proc = list => { // data arrived process method(important)          var str = string.Empty;                  foreach (var i in list) {          var ch = (char)i;              str += ch;          }          Console.WriteLine ("echo str: {0}", str);      }  };

项目主页:http://www.open-open.com/lib/view/home/1434268869097