Ejemplo n.º 1
0
 public Simulator2Port(DeviceSimulator owner, string name, IIDGenerator gen)
 {
     _state    = DevicePortStatus.Idle;
     Id        = gen.GetID();
     Owner     = owner;
     Name      = name;
     Frequency = 50;
 }
Ejemplo n.º 2
0
 public NidaQmxChannel(NidaQmxDevice2 device, string channel, ChannelDirection direction, IIDGenerator idgen)
 {
     _status    = DevicePortStatus.Idle;
     Id         = idgen.GetID();
     Channel    = channel;
     Device     = device;
     _direction = direction;
 }
Ejemplo n.º 3
0
        private void P_StateChanged(IDevicePort port, DevicePortStatus state)
        {
            var activeCount = _ports.Count(p => p.Status == DevicePortStatus.Active);

            if (activeCount == 0)
            {
                return;
            }
            foreach (var p in _ports)
            {
                p.Samplerate = MaxSamplerate / activeCount;
            }
        }