Esempio n. 1
0
 public Simulator2Port(DeviceSimulator owner, string name, IIDGenerator gen)
 {
     _state    = DevicePortStatus.Idle;
     Id        = gen.GetID();
     Owner     = owner;
     Name      = name;
     Frequency = 50;
 }
Esempio n. 2
0
        public bool Start(DeviceSimulator device)
        {
            if (Recording)
            {
                return(false);
            }

            _device = device;

            if (_precTimer == null)
            {
                _precTimer                       = new PrecisionTimer();
                _precTimer.Elapsed              += _precTimer_Elapsed;
                _precTimer.Milliseconds          = PeriodMs;
                _precTimer.ToleranceMilliseconds = 10;
            }

            _precTimer.Enabled = true;
            Recording          = true;

            return(true);
        }