Ejemplo n.º 1
0
        private static void JBC_NewStationConnected(long stationID)
        {
            station_id = stationID;
            features   = jbc_api.GetStationFeatures(station_id);
            port_count = jbc_api.GetPortCount(station_id);

            jbc_api.SetControlMode(station_id, ControlModeConnection.CONTROL);

            _autoResetEvent.Set();
            //Assert.AreEqual("NewStation", "");
        }
Ejemplo n.º 2
0
 public void PrintStationFeatures(CFeaturesData features)
 {
     Debug.WriteLine("STATION ID: " + station_id);
     Debug.WriteLine("Alarms: " + features.Alarms);
     Debug.WriteLine("AllToolsSamePortSettings:" + features.AllToolsSamePortSettings);
     Debug.WriteLine("Cartridges:" + features.Cartridges);
     Debug.WriteLine("DelayWithStatus: " + features.DelayWithStatus);
     Debug.WriteLine("DisplaySettings: " + features.DisplaySettings);
     Debug.WriteLine("Ethernet: " + features.Ethernet);
     Debug.WriteLine("FirmwareUpdate: " + features.FirmwareUpdate);
     Debug.WriteLine("MaxTemp: " + features.MaxTemp.UTI);
     Debug.WriteLine("MinTemp: " + features.MinTemp.UTI);
     Debug.WriteLine("MaxPowerLimit: " + features.MaxPowerLimit.ToString());
     Debug.WriteLine("PartialCounters: " + features.PartialCounters);
     Debug.WriteLine("Peripherals: " + features.PartialCounters);
     Debug.WriteLine("Robot: " + features.Robot);
     Debug.WriteLine("SubStations: " + features.SubStations);
     Debug.WriteLine("TempLevelsWithStatus: " + features.TempLevelsWithStatus);
     Debug.WriteLine("TempLevels: " + features.TempLevels);
 }
 public static void CopyData(CFeaturesData features,
                             dc_Features dcFeatures)
 {
     features.Alarms = dcFeatures.Alarms;
     features.AllToolsSamePortSettings = dcFeatures.AllToolsSamePortSettings;
     features.Cartridges           = dcFeatures.Cartridges;
     features.DelayWithStatus      = dcFeatures.DelayWithStatus;
     features.DisplaySettings      = dcFeatures.DisplaySettings;
     features.Ethernet             = dcFeatures.Ethernet;
     features.FirmwareUpdate       = dcFeatures.FirmwareUpdate;
     features.MaxTemp.UTI          = dcFeatures.MaxTemp.UTI;
     features.MinTemp.UTI          = dcFeatures.MinTemp.UTI;
     features.ExtTCMaxTemp.UTI     = dcFeatures.ExtTCMaxTemp.UTI;
     features.ExtTCMinTemp.UTI     = dcFeatures.ExtTCMinTemp.UTI;
     features.MaxFlow              = dcFeatures.MaxFlow;
     features.MinFlow              = dcFeatures.MinFlow;
     features.PartialCounters      = dcFeatures.PartialCounters;
     features.Peripherals          = dcFeatures.Peripherals;
     features.Robot                = dcFeatures.Robot;
     features.TempLevelsWithStatus = dcFeatures.TempLevelsWithStatus;
     features.TempLevels           = dcFeatures.TempLevels;
 }
Ejemplo n.º 4
0
        public void GetStationFeatures()
        {
            CFeaturesData features = jbc_api.GetStationFeatures(station_id);

            Assert.IsNotNull(features);
        }
Ejemplo n.º 5
0
        private void updateParams()
        {
            //if a station is selected updating all of its parametters
            if (curStation != long.MaxValue)
            {
                // get features supported by the station
                curFeatures = JBC.GetStationFeatures(curStation);

                //updating station parametters
                lblModel.Text = JBC.GetStationModel(curStation);
                lblSW.Text    = JBC.GetStationSWversion(curStation);
                lblError.Text = JBC.GetStationError(curStation).ToString();
                lblName.Text  = JBC.GetStationName(curStation);
                CTemperature.TemperatureUnit units = JBC.GetStationTempUnits(curStation);

                // if station supports display settings changes
                butUnits.Enabled = curFeatures.DisplaySettings;
                butN2.Enabled    = curFeatures.DisplaySettings;
                butHelp.Enabled  = curFeatures.DisplaySettings;
                butBeep.Enabled  = curFeatures.DisplaySettings;
                if (curFeatures.DisplaySettings)
                {
                    lblUnits.Text = units.ToString();
                    lblN2.Text    = System.Convert.ToString(JBC.GetStationN2Mode(curStation).ToString().Replace("_", ""));
                    lblHelp.Text  = System.Convert.ToString(JBC.GetStationHelpText(curStation).ToString().Replace("_", ""));
                    lblBeep.Text  = System.Convert.ToString(JBC.GetStationBeep(curStation).ToString().Replace("_", ""));
                }
                else
                {
                    lblUnits.Text = "N/A";                  // not supported
                    lblN2.Text    = "N/A";                  // not supported
                    lblHelp.Text  = "N/A";                  // not supported
                    lblBeep.Text  = "N/A";                  // not supported
                }
                if (units == CTemperature.TemperatureUnit.Celsius)
                {
                    lblTrafoError.Text = JBC.GetStationTransformerErrorTemp(curStation).ToCelsius().ToString() + " ºC";
                    lblMOSerror.Text   = JBC.GetStationMOSerrorTemp(curStation).ToCelsius().ToString() + " ºC";
                    lblTrafo.Text      = JBC.GetStationTransformerTemp(curStation).ToCelsius().ToString() + " ºC";
                    lblMaxTemp.Text    = JBC.GetStationMaxTemp(curStation).ToRoundCelsius().ToString() + " ºC";
                    lblMinTemp.Text    = JBC.GetStationMinTemp(curStation).ToRoundCelsius().ToString() + " ºC";
                }
                else if (units == CTemperature.TemperatureUnit.Fahrenheit)
                {
                    lblTrafoError.Text = JBC.GetStationTransformerErrorTemp(curStation).ToFahrenheit().ToString() + " ºF";
                    lblMOSerror.Text   = JBC.GetStationMOSerrorTemp(curStation).ToFahrenheit().ToString() + " ºF";
                    lblTrafo.Text      = JBC.GetStationTransformerTemp(curStation).ToFahrenheit().ToString() + " ºF";
                    lblMaxTemp.Text    = JBC.GetStationMaxTemp(curStation).ToRoundFahrenheit().ToString() + " ºF";
                    lblMinTemp.Text    = JBC.GetStationMinTemp(curStation).ToRoundFahrenheit().ToString() + " ºF";
                }

                //clearing all the ports labels and disabling the ports group boxes
                for (int cnt = JBC.GetPortCount(curStation) + 1; cnt <= 4; cnt++)
                {
                    Control gbx = this.Controls.Find("gbxPort" + System.Convert.ToString(cnt), true)[0];
                    foreach (Control ctrl in gbx.Controls)
                    {
                        if (ctrl.Name.Contains("lbl"))
                        {
                            ctrl.Text = "";
                        }
                    }
                    gbx.Enabled = false;
                }

                //updating the ports parametters
                for (int cnt = 1; cnt <= JBC.GetPortCount(curStation); cnt++)
                {
                    Control  port      = this.Controls.Find("gbxPort" + System.Convert.ToString(cnt), true)[0];
                    Control  tool      = this.Controls.Find("lblPort" + System.Convert.ToString(cnt) + "Tool", true)[0];
                    Control  err       = this.Controls.Find("lblPort" + System.Convert.ToString(cnt) + "Error", true)[0];
                    Control  actual    = this.Controls.Find("lblPort" + System.Convert.ToString(cnt) + "ActualTemp", true)[0];
                    Control  selec     = this.Controls.Find("lblPort" + System.Convert.ToString(cnt) + "SelecTemp", true)[0];
                    CheckBox sleep     = (CheckBox)(this.Controls.Find("cbxPort" + System.Convert.ToString(cnt) + "Sleep", true)[0]);
                    CheckBox hiber     = (CheckBox)(this.Controls.Find("cbxPort" + System.Convert.ToString(cnt) + "Hibernation", true)[0]);
                    CheckBox extractor = (CheckBox)(this.Controls.Find("cbxPort" + System.Convert.ToString(cnt) + "Extractor", true)[0]);
                    tool.Text = JBC.GetPortToolID(curStation, (Port)(cnt - 1)).ToString();
                    if (tool.Text != "")
                    {
                        port.Enabled = true;
                        ToolError aux = JBC.GetPortToolError(curStation, (Port)(cnt - 1));
                        if (aux == ToolError.NO_TOOL)
                        {
                            err.Text = ToolError.NO_ERROR.ToString();
                        }
                        else
                        {
                            err.Text = JBC.GetPortToolError(curStation, (Port)(cnt - 1)).ToString();
                        }
                        if (units == CTemperature.TemperatureUnit.Celsius)
                        {
                            actual.Text = JBC.GetPortToolActualTemp(curStation, (Port)(cnt - 1)).ToRoundCelsius().ToString() + " ºC";
                            selec.Text  = JBC.GetPortToolSelectedTemp(curStation, (Port)(cnt - 1)).ToRoundCelsius().ToString() + " ºC";
                        }
                        else if (units == CTemperature.TemperatureUnit.Fahrenheit)
                        {
                            actual.Text = JBC.GetPortToolActualTemp(curStation, (Port)(cnt - 1)).ToRoundFahrenheit().ToString() + " ºF";
                            selec.Text  = JBC.GetPortToolSelectedTemp(curStation, (Port)(cnt - 1)).ToRoundFahrenheit().ToString() + " ºF";
                        }
                        sleep.Checked     = JBC.GetPortToolSleepStatus(curStation, (Port)(cnt - 1)) == OnOff._ON;
                        hiber.Checked     = JBC.GetPortToolHibernationStatus(curStation, (Port)(cnt - 1)) == OnOff._ON;
                        extractor.Checked = JBC.GetPortToolExtractorStatus(curStation, (Port)(cnt - 1)) == OnOff._ON;
                    }
                }
            }
        }