public Simulator2Port(DeviceSimulator owner, string name, IIDGenerator gen) { _state = DevicePortStatus.Idle; Id = gen.GetID(); Owner = owner; Name = name; Frequency = 50; }
public NidaQmxChannel(NidaQmxDevice2 device, string channel, ChannelDirection direction, IIDGenerator idgen) { _status = DevicePortStatus.Idle; Id = idgen.GetID(); Channel = channel; Device = device; _direction = direction; }
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; } }