/// <summary> /// 创建ThroughputMeasured新实例 /// </summary> /// <param name="scope">示波器接口</param> /// <param name="plc">PLC接口</param> public InputOutputMeasurement(IScopeBase scope, IPLC plc) { if (scope?.IsConnect != true) { throw new ArgumentException("scope invalid"); } if (plc?.IsConnect != true) { throw new ArgumentException("plc invalid"); } Scope = scope; PLC = plc; }
/// <summary> /// 创建ThroughputMeasured新实例 /// </summary> /// <param name="scope">示波器接口</param> /// <param name="plc">PLC接口</param> public ThroughputMeasurementViewModel2(IScopeBase scope, IPLC plc) { if (scope == null) { throw new ArgumentException("scope invalid"); } if (plc == null) { throw new ArgumentException("plc invalid"); } Scope = scope; PLC = plc; }
public FrequencyMeasurementViewModel(IScopeBase scope, IPower power, IPLC plc, IPWM pwm) : this() { if (scope == null) { throw new ArgumentException("scope invalid"); } if (power == null) { throw new ArgumentException("power invalid"); } if (plc == null) { throw new ArgumentException("plc invalid"); } if (pwm == null) { throw new ArgumentException("pwm invalid"); } Scope = scope; Power = power; PLC = plc; PWM = pwm; if (!IsHardwareValid) { RunningStatus = "硬件无效"; } else { RunningStatus = "就绪"; } }