/***************************************************************************************************************************************** * GetSettings * * Function: Reads from the settings.xml file, collects the system configurations. Collects the specs This list is the tests that will * run during a full functional test. * * Arguments: None * * Returns: None - Update the class variable Tests * *********************************************************************************************************************************************/ private void ConnectDevices() { this.HERC = new Programmer(ProgrammerType.HERCULES); if (this.HERC.Connected) { this.Button_Jtag_Herc.BackColor = System.Drawing.Color.FromArgb(128, 255, 128); this.Button_Jtag_Herc.Enabled = false; } this.CPLD = new Programmer(ProgrammerType.CPLD); if (this.CPLD.Connected) { this.Button_Jtag_CPLD.BackColor = System.Drawing.Color.FromArgb(128, 255, 128); this.Button_Jtag_CPLD.Enabled = false; } this.SOM = new Programmer(ProgrammerType.SOM, "COM16"); if (this.SOM.Connected) { this.Button_SOM.BackColor = System.Drawing.Color.FromArgb(128, 255, 128); this.Button_SOM.Enabled = false; } this.DMM = new Test_Equip("DMM", "FLUKE", "RS232", "COM15"); if (this.DMM.Connected) { this.Button_DMM.BackColor = System.Drawing.Color.FromArgb(128, 255, 128); this.Button_DMM.Enabled = false; } this.PPS = new Test_Equip("PPS", "sdfsdf", "RS232", "COM14"); if (this.PPS.Connected) { this.Button_PPS.BackColor = System.Drawing.Color.FromArgb(128, 255, 128); this.Button_PPS.Enabled = false; } this.GPIO = new MccDaq_GPIO(); if (this.GPIO.Connected) { this.Button_GPIO.BackColor = System.Drawing.Color.FromArgb(128, 255, 128); this.Button_GPIO.Enabled = false; } else { this.GPIO = null; } }
public FunctionalTest(ConcurrentQueue <string> _rx, Hashtable Parameters) { //This constructor is used for production this.log_data = true; try { this.GPIO = (MccDaq_GPIO)Parameters["gpio"]; this.DMM = (Test_Equip)Parameters["dmm"]; this.PPS = (Test_Equip)Parameters["pps"]; this.SOM = (Programmer)Parameters["som"]; } catch { } //Create the queue used for passing messages between threads this.Rx_Queue = _rx; }
/***************************************************************************************************************************************** * ConnectDevices * * Function: Connects to all peripheral devices that are used in this test fixture * * Arguments: None * * Returns: None - Creates new class object instances and updates the displayed connections * *********************************************************************************************************************************************/ private bool CheckDeviceConnections(string device) { bool connected = false; if (device == "hercules") { this.HERC.ConnectProgrammer(); if (this.HERC.Connected) { this.Button_Jtag_Herc.BackColor = System.Drawing.Color.FromArgb(128, 255, 128); this.Button_Jtag_Herc.Enabled = false; connected = true; } } else if (device == "cpld") { this.CPLD.ConnectProgrammer(); if (this.CPLD.Connected) { this.Button_Jtag_CPLD.BackColor = System.Drawing.Color.FromArgb(128, 255, 128); this.Button_Jtag_CPLD.Enabled = false; connected = true; } } else if (device == "som") { this.SOM.ConnectProgrammer(); if (this.SOM.Connected) { this.Button_SOM.BackColor = System.Drawing.Color.FromArgb(128, 255, 128); this.Button_SOM.Enabled = false; connected = true; } } else if (device == "dmm") { this.DMM.ConnectDevice(); if (this.DMM.Connected) { this.Button_DMM.BackColor = System.Drawing.Color.FromArgb(128, 255, 128); this.Button_DMM.Enabled = false; connected = true; } } else if (device == "pps") { this.PPS.ConnectDevice(); if (this.PPS.Connected) { this.Button_PPS.BackColor = System.Drawing.Color.FromArgb(128, 255, 128); this.Button_PPS.Enabled = false; connected = true; } } else if (device == "gpio") { this.GPIO = new MccDaq_GPIO(); if (this.GPIO.Connected) { this.Button_GPIO.BackColor = System.Drawing.Color.FromArgb(128, 255, 128); this.Button_GPIO.Enabled = false; connected = true; } else { this.GPIO = null; } } return(connected); }