public MyOxygenSensor(int hubPort, string type, string hubName, double minThreshold, double maxThreshold, bool wireless) : base(hubPort, type, hubName, minThreshold, maxThreshold, wireless) { device = new VoltageInput(); device.HubPort = hubPort; device.IsHubPortDevice = true; device.VoltageChange += Device_VoltageChange; }
IPhidgetViewModel CreateViewModel(VoltageInput phidget) { if (phidget.ChannelClass == ChannelClass.VoltageInput && phidget.Parent.DeviceID == DeviceID.PN_TMP1101) { return(new ThermocoupleVoltageInputViewModel(phidget)); } return(new VoltageInputViewModel(phidget)); }
public override void SetSimulationProp(Circuit sim) { VoltageInput voltageInput = sim.Create <VoltageInput>(Voltage.WaveType.DC); voltageInput.maxVoltage = _batteryEntity.MaxVoltage; Ground ground = sim.Create <Ground>(); Connectors[0].DllConnector = voltageInput.leadPos; Connectors[1].DllConnector = ground.leadIn; }