/// <summary> /// The constructor method. /// </summary> /// <param name="fuzzyModel">A instance of the FuzzyModel class</param> public FuzzyModelUtilityVC(FuzzyModel fuzzyModel) { this.View = new FuzzyModelUtilityView(this); this.fuzzyModel = fuzzyModel; setupOutlets(); // Setup the combobox string[] portNames = SerialPort.GetPortNames(); View.HRSensorComboBox.Items.AddRange(portNames); View.HRSensorComboBox.SelectedIndex = 0; subscribe(); hrValueLabel.Text = View.hrTrackBar.Value.ToString(); gsrValueLabel.Text = View.gsrTrackBar.Value.ToString(); // Set the default sensor types fuzzyModel.hrSensor.type = HRSensor.Type.ManualInput; fuzzyModel.gsrSensor.type = GSRSensor.Type.ManualInput; // Makes sure that from the start a value is present (not being 0). fuzzyModel.hrSensor.sensorValue = View.hrTrackBar.Value; fuzzyModel.gsrSensor.sensorValue = View.gsrTrackBar.Value; sensorController = null; TimerCallback timerCallback = sensorTimerCallback; sensorTimer = new Timer(timerCallback, null, 1000, 1000); this.currentState = State.Uncalibrated; }
public void setUp() { mockedHRSensor = new Mock<HRSensor>(); mockedGSRSensor = new Mock<GSRSensor>(); model = new FuzzyModel(); model.hrSensor.type = HRSensor.Type.ManualInput; model.gsrSensor.type = GSRSensor.Type.ManualInput; }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); XMLParser parser = new XMLParser(); PRLDomain prlDomain = new PRLDomain(); CTLModel ctlModel = new CTLModel(parser, prlDomain); FuzzyModel fuzzyModel = new FuzzyModel(); // Main viewcontroller setup var controller = new MainViewController(ctlModel,fuzzyModel); // Cognitive Load setup CTLModelUtilityVC ctlUtilityVC = new CTLModelUtilityVC(ctlModel, parser); controller.clUtilityView = ctlUtilityVC.View; // Emotional State setup FuzzyModelUtilityVC esUtilityVC = new FuzzyModelUtilityVC(fuzzyModel); controller.esUtilityView = esUtilityVC.View; Application.Run(controller.View); }
public void tearDown() { model = null; }