public ReadoutViewModel( PumpController pumpController, ElementController elementController, Hardware hardware, HardwareInitializer hardwareInitializer ) { _hardwareInitializer = hardwareInitializer; PumpController = pumpController; ElementController = elementController; Hardware = hardware; // When the PumpController changes state, so should our text, so notify of that change. Hardware.PumpOutputConnection.PropertyChanged += (s, e) => NotifyOfPropertyChange(() => PumpStateText); Hardware.ElementOutputConnection.PropertyChanged += (s, e) => NotifyOfPropertyChange(() => ElementStateText); Hardware.RoofTemperatureReader.PropertyChanged += (s, e) => NotifyOfPropertyChange(() => RoofDegC); Hardware.InletTemperatureReader.PropertyChanged += (s, e) => NotifyOfPropertyChange(() => InletDegC); Hardware.TankTemperatureReader.PropertyChanged += (s, e) => NotifyOfPropertyChange(() => TankDegC); }
public HardwareInitializer(IAnalogToDigitalConvertor adc, SensorPoller sensorPoller, Hardware hardware) { _adc = adc; _sensorPoller = sensorPoller; _hardware = hardware; }
public SensorPoller(Hardware hardware, IEventAggregator eventAggregator) { _hardware = hardware; _eventAggregator = eventAggregator; }