Exemplo n.º 1
0
 public EosBusInterfaceSerial(string port, int baudRate)
     : base(port, baudRate, 64)
 {
     _stats           = new EosBusStatistics();
     _devices         = new List <EosDevice>();
     _externalDevices = new EosDeviceCollection(_devices);
 }
Exemplo n.º 2
0
        public EosBusMaster(string port, int baudRate)
            : base(port, baudRate, 64)
        {
            _stats       = new EosBusStatistics();
            _masterState = BusMasterState.IDLE;
            State        = EosBusState.IDLE;

            _parser              = new EosParser(150);
            _parser.PacketReady += new EosPacketEventHandler(Parser_PacketReady);
            _parser.ParseError  += new EosParserErrorEventHandler(Parser_ParseError);

            _busTimer           = new Timer(100);
            _busTimer.AutoReset = false;
            _busTimer.Elapsed  += TimerEvent;

            _scanned = false;

            _devices         = new List <EosDevice>();
            _externalDevices = new EosDeviceCollection(_devices);
            _sendPackets     = new ConcurrentQueue <EosPacket>();
        }