private void RadCntrlButton_Click(object sender, EventArgs e) { if (current_reactor != null) { current_reactor.setControlStatus(1, !current_reactor.getControlStatus(1)); if (current_reactor.getControlStatus(1)) { RadCntrlButton.Text = "Unload Control Program"; } else { RadCntrlButton.Text = "Load Control Program"; } SensorIF radisensor = current_reactor.getSensors()[1]; if (current_reactor.getControlStatus(1)) { // load control program radisensor.setControlProgram((AbstractSensorControlProgram) new RadiationControlProgram(radisensor)); } else { // do not load control program radisensor.setControlProgram(null); } } }
private void PresCntrlButton_Click(object sender, EventArgs e) { if (current_reactor != null) { current_reactor.setControlStatus(2, !current_reactor.getControlStatus(2)); if (current_reactor.getControlStatus(2)) { PresCntrlButton.Text = "Unload Control Program"; } else { PresCntrlButton.Text = "Load Control Program"; } SensorIF pressensor = current_reactor.getSensors()[2]; if (current_reactor.getControlStatus(2)) { // load control program pressensor.setControlProgram((AbstractSensorControlProgram) new PressureControlProgram(pressensor)); } else { // do not load control program pressensor.setControlProgram(null); } } }
private void TempCntrlButton_Click(object sender, EventArgs e) { if (current_reactor != null) { current_reactor.setControlStatus(0, !current_reactor.getControlStatus(0)); if (current_reactor.getControlStatus(0)) { TempCntrlButton.Text = "Unload Control Program"; } else { TempCntrlButton.Text = "Load Control Program"; } SensorIF tempsensor = current_reactor.getSensors()[0]; if (current_reactor.getControlStatus(0)) { // load control program tempsensor.setControlProgram((AbstractSensorControlProgram) new TempControlProgram(tempsensor)); } else { // do not load control program tempsensor.setControlProgram(null); } } }
public void recordMax(bool start, SensorIF sif) { if (start) { // start thread to track max sensor value cmt = new CalcMaxThread(sif); tTrackMax = new Thread(cmt.run); tTrackMax.Start(); } else { // abort thread to track max sensor value tTrackMax.Abort(); } }
public CalcMaxThread(SensorIF sif) { this.sif = sif; }
public TempControlProgram(SensorIF sif) : base(sif) { }
public SetDataThread(SensorIF sif, int timeout) { this.sif = sif; this.timeout = timeout; }
public SetDataThread(SensorIF sif) { this.sif = sif; this.timeout = 1000; }
public AbstractSensorControlProgram(SensorIF sif) { this.sif = sif; }
public PressureControlProgram(SensorIF sif) : base(sif) { }
public RadiationControlProgram(SensorIF sif) : base(sif) { }