public csjSerialPort(csjSerialPortDataReceivedStr _DataReceived, string _com = "com5", int _maxLen = 500000, int _rate = 9600, Parity _parity = Parity.None, int _bit = 8, StopBits _sb = StopBits.One) : base(_com, _rate, _parity, _bit, _sb) { if (_DataReceived != null) { DataReceivedStr += _DataReceived; } ReadTimeout = 500; WriteTimeout = -1; thread = null; _keepReading = false; readBuffer = new byte[_maxLen]; //不知道起点在哪里 dataStart = -1; //数据结尾 dataEnd = 0; bufferLen = _maxLen; }