using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO.Ports;
using Microsoft.SqlServer.Server;
namespace SerialPortHelperLib
{
/// <summary>
/// general serialport class
/// </summary>
public class SerialPortHelper
{
/// <summary>
/// create operation of serialport object
/// </summary>
private SerialPort SerialPort;
public SerialPort SerialPortObj
{
get {
return this.SerialPort; }
}
/// <summary>
/// get the available serialport names on this conputer into array
/// </summary>
public string[] SerialPortName
{
get {
return System.IO.Ports.SerialPort.GetPortNames(); }
}
public SerialPortHelper()
{
SerialPort = new SerialPort();
//serialport parameter initialized
this.SerialPort.BaudRate =
一个简单的串口发送动态链接库
最新推荐文章于 2021-04-20 22:38:25 发布