public ConfigureAntenna(LakeChabotReader reader) { if (null == reader) { throw new ArgumentNullException("reader", "Null reader passed to ConfigureAntenna CTOR()"); } if (reader.Mode != rfidReader.OperationMode.BoundToReader) { throw new ArgumentOutOfRangeException("reader", "Unbound reader passed to ConfigureAntenna()"); } InitializeComponent( ); //applyAtStartupCheckBox.Checked = !String.IsNullOrEmpty( RFID_Explorer.Properties.Settings.Default.antennaSettings ); this.reader = reader; this.timer = new Timer( ); this.timer.Interval = 5000; this.timer.Tick += new EventHandler(timer_Tick); //clark not sure. Wait firmware support this function. #if (LBT) //RfPowerThreshold Clark 2011.2.10 Cpoied from R1000 Tracer UInt32 oem_Data = 0; reader.MacReadOemData ( (ushort)enumOEM_ADDR.ENUM_OEM_ADDR_RF_REVPWR_THRESHOLD, //0x000000AE, ref oem_Data ); numericUpDownRfPowerThreshold.Value = oem_Data; #endif }
public RFChannelEditForm( LakeChabotReader reader, Source_FrequencyBand channel ) { this.reader = reader; this.channelMaster = channel; this.channelActive = new Source_FrequencyBand( channel ); InitializeComponent( ); channelSlotNumber.Text = String.Format( "RF Channel Slot {0}", this.channelActive.Band ); foreach (Source_FrequencyBand.BandState item in Enum.GetValues(typeof(Source_FrequencyBand.BandState))) { this.state.Items.Add(item); } this.state.Items.Remove(Source_FrequencyBand.BandState.UNKNOWN); state.SelectedIndex = channelActive.State == Source_FrequencyBand.BandState.DISABLED ? 0 : 1; state.SelectedValueChanged += state_SelectedValueChanged; this.multiplyRatio.DataBindings.Add( "Value", this.channelActive, "MultiplyRatio" ); this.divideRatio.DataBindings.Add( "Value", this.channelActive, "DivideRatio" ); this.minimumDAC.DataBindings.Add( "Value", this.channelActive, "MinimumDACBand" ); this.affinityBand.DataBindings.Add( "Value", this.channelActive, "AffinityBand" ); this.maximumDAC.DataBindings.Add( "Value", this.channelActive, "MaximumDACBand" ); this.guardBand.DataBindings.Add( "Value", this.channelActive, "GuardBand" ); }
public ConfigurePostSingulation_Display(LakeChabotReader reader) : this() { this.setReader(reader); this.loadButton_Click(this.loadButton, null); }
public ConfigureSelect_Display(LakeChabotReader reader) : this() { this.setReader(reader); this.loadButton_Click(this.loadButton, null); }
public ConfigureSelect_Edit(LakeChabotReader reader, SelectCriteria criteria) { InitializeComponent( ); configureSelect_Display.setReader(reader); configureSelect_Display.setSource(criteria); configureSelect_Display.Mode = ConfigureSelect_Display.EDIT_MODE; // edit on }
public ConfigureAlgorithm_Display(LakeChabotReader reader) : this() { this.setReader(reader); this.setSource(new Source_QueryParms( )); this.retrieveData( ); }
public ConfigurePostSingulation_Edit( LakeChabotReader reader, SingulationCriteria criteria ) { InitializeComponent( ); configurePostSingulation_Display.setReader( reader ); configurePostSingulation_Display.setSource( criteria ); configurePostSingulation_Display.Mode = ConfigurePostSingulation_Display.EDIT_MODE; // edit on }
private void BUTTON_RegsiterAccess_Click(object sender, EventArgs e) { LakeChabotReader reader = MainForm.ActiveReader; if (reader != null) { using (FORM_RegisterAccess dlg = new FORM_RegisterAccess(reader)) { dlg.ShowDialog(); } } }
private void BUTTON_ConfigureReader_Click(object sender, EventArgs e) { LakeChabotReader reader = MainForm.ActiveReader; if (reader != null) { using (ConfigureForm frm = new ConfigureForm(reader)) { frm.ShowDialog(); } } }
public ConfigureAlgorithm_Edit(LakeChabotReader reader, Source_QueryParms parms) { InitializeComponent( ); // The algorithmDisplay is the obj that needs the zero arg constructor // so it works via the gui builder in VS... and so needs secondary // calls to set the reader and parms... algorithmDisplay.setReader(reader); algorithmDisplay.setSource(parms); algorithmDisplay.MasterEnabled = true; // edit on algorithmDisplay.displayData( ); }
public AntennaSenseThresholdEdit(LakeChabotReader reader, uint activeThresholdValue) { this.reader = reader; this.activeThresholdValue = activeThresholdValue; InitializeComponent( ); activeThreshold.Text = activeThresholdValue.ToString( ); activeThreshold.Enabled = false; newThreshold.Minimum = 0; newThreshold.Maximum = 0x000FFFFF; newThreshold.Value = activeThresholdValue; }
// This MUST be called prior to any accessors etc. and // each and every call here will reset all data causing // a re-read of info from the radio... public void setReader(LakeChabotReader reader) { if (null == reader) { throw new ArgumentNullException("reader", "Null reader passed to Algorithm_Display( )"); } if (rfidReader.OperationMode.BoundToReader != reader.Mode) { throw new ArgumentOutOfRangeException("reader", "Unbound reader passed to Algorithm_Display( )"); } this.reader = reader; }
private void inventoryOnceButton_Click(object sender, EventArgs e) { LakeChabotReader reader = MainForm.ActiveReader; //clark 2011.4.25 Set tag access flag to inventory structure Global.TagAccessFlag strcTagFlag; strcTagFlag.PostMatchFlag = MainForm.IsPostSingulationEnable; strcTagFlag.SelectOpsFlag = MainForm.IsSelectCriteriaEnable; strcTagFlag.RetryCount = MainForm.GetRetryCount(); strcTagFlag.bErrorKeepRunning = false; reader.strcTagFlag = strcTagFlag; MainForm.StartInventoryOnce(); }
public AboutReaderControl(LakeChabotReader reader) { if (null == reader) { throw new ArgumentNullException("reader", "Null reader passed to ConfigureGeneral CTOR()"); } if (reader.Mode != rfidReader.OperationMode.BoundToReader) { throw new ArgumentOutOfRangeException("reader", "Unbound reader passed to ConfigureGeneral()"); } InitializeComponent( ); this.reader = reader; }
public AntennaEditForm(LakeChabotReader reader, Source_Antenna antenna) { this.reader = reader; this.antennaMaster = antenna; this.antennaActive = new Source_Antenna(antenna); InitializeComponent( ); //Logic Port antennaNumberLabel.Text = String.Format("Antenna {0}", antennaActive.Port); //Status foreach (rfid.Constants.AntennaPortState item in Enum.GetValues(typeof(rfid.Constants.AntennaPortState))) { state.Items.Add(item); } state.Items.Remove(rfid.Constants.AntennaPortState.UNKNOWN); state.SelectedIndex = antennaActive.State == rfid.Constants.AntennaPortState.DISABLED ? 0 : 1; state.SelectedValueChanged += state_SelectedValueChanged; //clark. Set the limit of port number Aotomatically PhysicalPort.Minimum = Source_Antenna.PHY_MINIMUM; PhysicalPort.Maximum = Source_Antenna.PHY_MAXIMUM; PhysicalPort.DataBindings.Add("Value", this.antennaActive, "PhysicalPort"); dwellTime.Minimum = 0; dwellTime.Maximum = 1000000; dwellTime.DataBindings.Add("Value", this.antennaActive, "DwellTime"); inventoryCycles.Minimum = 0; inventoryCycles.Maximum = 1000000; inventoryCycles.DataBindings.Add("Value", this.antennaActive, "NumberInventoryCycles"); //Clark 2011.2.21 Cpoied from R1000 Tracer powerLevel.Minimum = Source_Antenna.POWER_MINIMUM; powerLevel.Maximum = Source_Antenna.POWER_MAXIMUM; powerLevel.DataBindings.Add("Value", this.antennaActive, "PowerLevel"); }
//End by FJ for implement the script command test function, 2017-01-13 public CommandTest(RFID_Explorer.mainForm r_form, LakeChabotReader rm_reader) { InitializeComponent(); backgroundWorker1.WorkerReportsProgress = true; pictureBox.Visible = false; //Add by FJ for implement the script command test function, 2017-01-13 backgroundWorker2.WorkerReportsProgress = true; pictureBox1.Visible = false; ButtonExecute.Enabled = false; //End by FJ for implement the script command test function, 2017-01-13 m_mainForm = r_form; m_reader = rm_reader; errCount = 0; errSize = 0; textBoxDeviceID.Select(); }
public ConfigureTroubleControl(LakeChabotReader reader) { if (reader == null) { throw new ArgumentNullException("reader", "Null reader passed to ConfigureGeneral CTOR()"); } if (reader.Mode != rfidReader.OperationMode.BoundToReader) { throw new ArgumentOutOfRangeException("reader", "Unbound reader passed to ConfigureGeneral()"); } InitializeComponent( ); _reader = reader; _timer = new Timer( ); _timer.Interval = 5000; _timer.Tick += new EventHandler(timer_Tick); _errorList = new MacErrorList( ); // errorPanel errorPanel.BackColor = System.Drawing.Color.Silver; errorPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; errorPanel.Name = "errorPanel"; errorPanel.Size = new System.Drawing.Size(227, 114); errorPanel.TabIndex = 15; errorPanel.Visible = false; // errorTextBox errorTextBox.BackColor = System.Drawing.SystemColors.Info; errorTextBox.Location = new System.Drawing.Point(-1, -1); errorTextBox.Multiline = true; errorTextBox.Name = "errorTextBox"; errorTextBox.Size = new System.Drawing.Size(226, 113); errorTextBox.TabIndex = 0; errorPanel.Controls.Add(this.errorTextBox); this.Controls.Add(this.errorPanel); }
private void BUTTON_TagAccess_Click(object sender, EventArgs e) { LakeChabotReader reader = MainForm.ActiveReader; if (reader != null) { using (FORM_TagAccess dlg = new FORM_TagAccess(reader, reader.TagAccessDataSet)) { if (DialogResult.OK == dlg.ShowDialog( )) { reader.TagAccessDataSet = dlg.TagAccessDataSet; MainForm.StartTagAccess(); } else { return; } } } }
public ConfigureGPIO(LakeChabotReader reader) { if (null == reader) { throw new ArgumentNullException("reader", "Null reader passed to ConfigureGeneral CTOR()"); } if (reader.Mode != rfidReader.OperationMode.BoundToReader) { throw new ArgumentOutOfRangeException("reader", "Unbound reader passed to ConfigureGeneral()"); } InitializeComponent( ); _reader = reader; _timer = new Timer(); _timer.Interval = 5000; _timer.Tick += new EventHandler(timer_Tick); errorTextBox.Visible = false; }
private int tagErrorCode = 19, moduleErrorCode1 = 20, moduleErrorCode2 = 21; //Reference the "MTI RFID Module Command Reference Manual-Table 3.10 - ISO 18000-6C Tag-Access Packet Fields" public NXPAuthentication(RFID_Explorer.mainForm r_form, LakeChabotReader rm_reader) { InitializeComponent(); m_mainForm = r_form; m_reader = rm_reader; int i; comboBoxMemBank.Items.Add("EPC"); comboBoxMemBank.Items.Add("TID"); comboBoxMemBank.Items.Add("USER"); comboBoxMemBank.SelectedIndex = 0; comboBoxBlockCount.Items.Add("One 64-bit Block"); comboBoxBlockCount.Items.Add("Two 64-bit Block"); comboBoxBlockCount.SelectedIndex = 0; retryCount = r_form.GetRetryCount(); btnInsertKey.Enabled = false; btnActivateKey.Enabled = false; }
public RFTest(RFID_Explorer.mainForm r_form, LakeChabotReader rm_reader) { InitializeComponent(); m_mainForm = r_form; m_reader = rm_reader; //Initial value ckboxErrorKeepRunning.Checked = m_mainForm.bErrorKeepRunning; //Read Data from module m_reader.API_TestGetAntennaPortConfiguration(ref m_btPhysicalPort, ref m_usPowerLevel); m_reader.API_TestGetFrequencyConfiguration(ref m_btChannelFlag, ref m_uiExactFrequecny); m_reader.API_TestGetRandomDataPulseTime(ref m_uiPulseOnTime, ref m_uiPulseOffTime); //regionComboBox try { m_macRegion = m_reader.RegulatoryRegion; } catch (rfidReaderException exp) { cmbBoxRegion.Text = exp.Message; } cmbBoxRegion.Items.Add(m_macRegion); cmbBoxRegion.SelectedIndex = 0; //Frequency switch (m_macRegion) { case MacRegion.US: foreach (ENUM_RF_US item in Enum.GetValues(typeof(ENUM_RF_US))) { cmbBoxFreq.Items.Add(String.Format("{0:000.000}", (float)item / 1000)); } break; case MacRegion.EU: foreach (ENUM_RF_EU item in Enum.GetValues(typeof(ENUM_RF_EU))) { cmbBoxFreq.Items.Add(String.Format("{0:000.000}", (float)item / 1000)); } break; case MacRegion.JP: foreach (ENUM_RF_JP item in Enum.GetValues(typeof(ENUM_RF_JP))) { cmbBoxFreq.Items.Add(String.Format("{0:000.000}", (float)item / 1000)); } break; case MacRegion.EU2: foreach (ENUM_RF_EU2 item in Enum.GetValues(typeof(ENUM_RF_EU2))) { cmbBoxFreq.Items.Add(String.Format("{0:000.000}", (float)item / 1000)); } break; case MacRegion.TW: foreach (ENUM_RF_TW item in Enum.GetValues(typeof(ENUM_RF_TW))) { cmbBoxFreq.Items.Add(String.Format("{0:000.000}", (float)item / 1000)); } break; case MacRegion.CN: foreach (ENUM_RF_CN item in Enum.GetValues(typeof(ENUM_RF_CN))) { cmbBoxFreq.Items.Add(String.Format("{0:000.000}", (float)item / 1000)); } break; case MacRegion.KR: foreach (ENUM_RF_KR item in Enum.GetValues(typeof(ENUM_RF_KR))) { cmbBoxFreq.Items.Add(String.Format("{0:000.000}", (float)item / 1000)); } break; case MacRegion.AU: foreach (ENUM_RF_AU item in Enum.GetValues(typeof(ENUM_RF_AU))) { cmbBoxFreq.Items.Add(String.Format("{0:000.000}", (float)item / 1000)); } break; case MacRegion.BR: foreach (ENUM_RF_BR item in Enum.GetValues(typeof(ENUM_RF_BR))) { cmbBoxFreq.Items.Add(String.Format("{0:000.000}", (float)item / 1000)); } break; case MacRegion.HK: foreach (ENUM_RF_HK item in Enum.GetValues(typeof(ENUM_RF_HK))) { cmbBoxFreq.Items.Add(String.Format("{0:000.000}", (float)item / 1000)); } break; case MacRegion.MY: foreach (ENUM_RF_MY item in Enum.GetValues(typeof(ENUM_RF_MY))) { cmbBoxFreq.Items.Add(String.Format("{0:000.000}", (float)item / 1000)); } break; case MacRegion.SG: foreach (ENUM_RF_SG item in Enum.GetValues(typeof(ENUM_RF_SG))) { cmbBoxFreq.Items.Add(String.Format("{0:000.000}", (float)item / 1000)); } break; case MacRegion.TH: foreach (ENUM_RF_TH item in Enum.GetValues(typeof(ENUM_RF_TH))) { cmbBoxFreq.Items.Add(String.Format("{0:000.000}", (float)item / 1000)); } break; case MacRegion.IL: foreach (ENUM_RF_IL item in Enum.GetValues(typeof(ENUM_RF_IL))) { cmbBoxFreq.Items.Add(String.Format("{0:000.000}", (float)item / 1000)); } break; case MacRegion.RU: foreach (ENUM_RF_RU item in Enum.GetValues(typeof(ENUM_RF_RU))) { cmbBoxFreq.Items.Add(String.Format("{0:000.000}", (float)item / 1000)); } break; case MacRegion.IN: foreach (ENUM_RF_IN item in Enum.GetValues(typeof(ENUM_RF_IN))) { cmbBoxFreq.Items.Add(String.Format("{0:000.000}", (float)item / 1000)); } break; case MacRegion.SA: foreach (ENUM_RF_SA item in Enum.GetValues(typeof(ENUM_RF_SA))) { cmbBoxFreq.Items.Add(String.Format("{0:000.000}", (float)item / 1000)); } break; case MacRegion.JO: foreach (ENUM_RF_JO item in Enum.GetValues(typeof(ENUM_RF_JO))) { cmbBoxFreq.Items.Add(String.Format("{0:000.000}", (float)item / 1000)); } break; case MacRegion.MX: foreach (ENUM_RF_MX item in Enum.GetValues(typeof(ENUM_RF_MX))) { cmbBoxFreq.Items.Add(String.Format("{0:000.000}", (float)item / 1000)); } break; //clark 2011.9.13 case MacRegion.CUSTOMER: //Set cmbBoxFreq's type to Non-ReadOnly. cmbBoxFreq.DropDownStyle = ComboBoxStyle.DropDown; cmbBoxFreq.Items.Add("000.000"); string strCustomerRegion = ""; Result result = m_reader.API_MacGetCustomerRegion(ref strCustomerRegion); cmbBoxRegion.Items.Clear(); switch (result) { case Result.OK: //Show customer config name cmbBoxRegion.Items.Add(strCustomerRegion); break; case Result.NOT_SUPPORTED: cmbBoxRegion.Items.Add("Not support customer"); btnRfOn.Enabled = false; btnRfOff.Enabled = false; btnRF.Enabled = false; //btnRF Combine btnInventory.Enabled = false; btnPulse.Enabled = false; btnClear.Enabled = false; break; case Result.FAILURE: default: cmbBoxRegion.Items.Add("Get customer fail"); btnRfOn.Enabled = false; btnRfOff.Enabled = false; btnRF.Enabled = false; //btnRF Combine btnInventory.Enabled = false; btnPulse.Enabled = false; btnClear.Enabled = false; break; } cmbBoxRegion.SelectedIndex = 0; break; case MacRegion.UNKNOWN: default: cmbBoxFreq.Items.Add(MacRegion.UNKNOWN); btnRfOn.Enabled = false; btnRfOff.Enabled = false; btnRF.Enabled = false;//btnRF Combine btnInventory.Enabled = false; btnPulse.Enabled = false; btnClear.Enabled = false; break; } cmbBoxFreq.SelectedIndex = 0; //RF Channel Radio Button if (m_btChannelFlag == 0) { rdoBtnMultiChannel.Checked = true; } else { rdoBtnSingleChannel.Checked = true; } //Port Radio Button if (AddAntPort() == false) { cmbBoxFreq.Items.Add(MacRegion.UNKNOWN); btnRfOn.Enabled = false; btnRfOff.Enabled = false; btnRF.Enabled = false;//btnRF Combine btnInventory.Enabled = false; btnPulse.Enabled = false; cmbAntPort.Items.Add(ENUM_ANT_PORT.UNKNOWN); cmbAntPort.SelectedIndex = cmbAntPort.Items.IndexOf(ENUM_ANT_PORT.UNKNOWN); return; } //Pulse Time numPulseOnTime.Maximum = PULSE_TIME_MAX / 1000; numPulseOnTime.Minimum = PULSE_TIME_MIN / 1000; numPulseOffTime.Maximum = PULSE_TIME_MAX / 1000; numPulseOffTime.Minimum = PULSE_TIME_MIN / 1000; numPulseOnTime.Value = (m_uiPulseOnTime > 0) ? m_uiPulseOnTime / 1000 : numPulseOnTime.Minimum; //us to ms numPulseOffTime.Value = (m_uiPulseOffTime > 0) ? m_uiPulseOffTime / 1000 : numPulseOffTime.Minimum; //us to ms //Set Event m_mainForm.CurrentContextChanged += new EventHandler(CurrentContextChanged); m_mainForm.BindAllFunctionControlers(FunctionStateChanged, true); }
public ConfigureSettingsControl(LakeChabotReader reader) { if (reader == null) { throw new ArgumentNullException("reader", "Null reader passed to ConfigureGeneral CTOR()"); } if (reader.Mode != rfidReader.OperationMode.BoundToReader) { throw new ArgumentOutOfRangeException("reader", "Unbound reader passed to ConfigureGeneral()"); } InitializeComponent( ); this.reader = reader; _timer = new Timer( ); _timer.Interval = 5000; _timer.Tick += new EventHandler(timer_Tick); string startupPowerState = Properties.Settings.Default.startupPowerState; string startupOpMode = Properties.Settings.Default.startupOperationalMode; int startupAlgorithmNumber = Properties.Settings.Default.startupInventoryAlgorithm; rfid.Constants.Result result = rfid.Constants.Result.OK; //Interface radiobutton============================================================= UInt32 oemData = 0; rfid.Constants.Result status = reader.MacReadOemData((ushort)enumOEM_ADDR.HOST_IF_SEL, ref oemData); if (oemData == (uint)enumPORT.ENUM_PORT_USB) { rBtn_USB.Checked = true; rBtn_UART.Checked = false; } else { rBtn_USB.Checked = false; rBtn_UART.Checked = true; } // regionComboBox============================================================= ENUM_REGION_RESULT enumMatch = ENUM_REGION_RESULT.FAIL; this.macRegion = new Source_MacRegion(); result = macRegion.load(LakeChabotReader.MANAGED_ACCESS, this.reader.ReaderHandle); do { if (rfid.Constants.Result.OK != result) { enumMatch = ENUM_REGION_RESULT.FAIL; break; } UInt32 shift = 1; foreach (rfid.Constants.MacRegion item in Enum.GetValues(typeof(rfid.Constants.MacRegion))) { do { if ((this.macRegion.MacRegionSupport & shift) <= 0) { break; } //Add support region to regionComboBox. if (item == rfid.Constants.MacRegion.CUSTOMER)//Customer region uses string. { result = reader.API_MacGetCustomerRegion(ref strCustomerRegion); switch (result) { case rfid.Constants.Result.OK: regionComboBox.Items.Add(strCustomerRegion); if (item == this.macRegion.MacRegion) { enumMatch = ENUM_REGION_RESULT.CUSTOMER_OK; } break; case rfid.Constants.Result.NOT_SUPPORTED: //Only hide the option. if (item == this.macRegion.MacRegion) { enumMatch = ENUM_REGION_RESULT.CUSTOMER_NON_SUPPORTED; } break; case rfid.Constants.Result.FAILURE: default: enumMatch = ENUM_REGION_RESULT.CUSTOMER_FAIL; break; } } else { //Other region uses enum. regionComboBox.Items.Add(item); //Check match region between support and current region setting. if (item == this.macRegion.MacRegion) { enumMatch = ENUM_REGION_RESULT.OK; } } }while(false); shift <<= 0x01; } }while(false); switch (enumMatch) { case ENUM_REGION_RESULT.OK: regionComboBox.SelectedIndex = regionComboBox.Items.IndexOf(this.macRegion.MacRegion); break; case ENUM_REGION_RESULT.FAIL: RegionError("Read region unsuccessfully"); break; case ENUM_REGION_RESULT.CUSTOMER_OK: //Customer region uses string. regionComboBox.SelectedIndex = regionComboBox.Items.IndexOf(strCustomerRegion); break; case ENUM_REGION_RESULT.CUSTOMER_NON_SUPPORTED: RegionError("Not support customer region"); break; case ENUM_REGION_RESULT.CUSTOMER_FAIL: RegionError("Get customer region fail"); break; case ENUM_REGION_RESULT.NOT_MATCH: RegionError("Region deosn't match \"RegionSupport\"."); break; } // profileComboBox============================================================= this.profileList = new Source_LinkProfileList(LakeChabotReader.MANAGED_ACCESS, this.reader.ReaderHandle); this.profileList.load( ); int count = 0; foreach (Source_LinkProfile linkProfile in profileList) { profileComboBox.Items.Add(count + " : " + linkProfile.ToString( )); ++count; } profileComboBox.SelectedIndex = ( int )profileList.getActiveProfileIndex( ); this.profileComboBox.SelectedIndexChanged += new System.EventHandler(this.profileComboBox_SelectedIndexChanged); // Currently out of sync with 'new' model ~ no explicit read done // here or source provided ~ done via reader call... foreach (rfid.Constants.SingulationAlgorithm item in Enum.GetValues(typeof(rfid.Constants.SingulationAlgorithm))) { algorithmComboBox.Items.Add(item); } algorithmComboBox.Items.Remove(rfid.Constants.SingulationAlgorithm.UNKNOWN); // skipping err checking on these shortcut methods... Source_QueryParms queryParms = new Source_QueryParms( ); queryParms.load(LakeChabotReader.MANAGED_ACCESS, reader.ReaderHandle); algorithmComboBox.SelectedIndex = algorithmComboBox.Items.IndexOf ( queryParms.SingulationAlgorithm ); algorithmComboBox.SelectedIndexChanged += new System.EventHandler(this.algorithmComboBox_SelectedIndexChanged); }
public void setReader(LakeChabotReader reader) { this.reader = reader; }
// Attempt to get the state of all GPIO pins and place // results into the list public rfid.Constants.Result load ( rfid.Linkage transport, UInt32 readerHandle ) { //Mod by FJ for change caption of "Antenna Ports" and "GPIO" GUI for HP SiP, 2015-01-22 this.Clear( ); string[] Str = { "PIN_1", "PIN_2", "PIN_3", "PIN_4" }; int temp = 0; // We do each pin ( though could be done by group ) just so we // can tell if individual pin op fails ~ slower but safer... //Mod by FJ for fix model name judgement bug, 2015-02-02 //rfid.Constants.Result m_result = rfid.Constants.Result.OK; LakeChabotReader reader = new LakeChabotReader(); if (rfid.Constants.Result.OK != reader.result_major) { throw new Exception(reader.result_major.ToString()); //throw new Exception(result.ToString()); //End by FJ for fix model name judgement bug, 2015-02-02 } if (reader.uiModelNameMAJOR != 0x4D303358)//0x4D303358==M03X { foreach ( rfid.Constants.GpioPin nativePin in Enum.GetValues(typeof(rfid.Constants.GpioPin)) ) { Source_GPIO gpio = new Source_GPIO(nativePin, Source_GPIO.OpAccess.GET); gpio.Pin = nativePin.ToString(); // Errs set in individual gpio objs if they occur gpio.load(transport, readerHandle); this.Add(gpio); } } else { foreach ( rfid.Constants.GpioPin nativePin in Enum.GetValues(typeof(rfid.Constants.GpioPin)) ) { Source_GPIO gpio = new Source_GPIO(nativePin, Source_GPIO.OpAccess.GET); gpio.Pin = Str[temp]; // Errs set in individual gpio objs if they occur gpio.load(transport, readerHandle); this.Add(gpio); temp++; } } // For now always consider success... user can look thru list // to check what pin failures may have occurred... return(rfid.Constants.Result.OK); /* * this.Clear(); * * // We do each pin ( though could be done by group ) just so we * // can tell if individual pin op fails ~ slower but safer... * foreach * ( * rfid.Constants.GpioPin nativePin in * Enum.GetValues(typeof(rfid.Constants.GpioPin)) * ) * { * * Source_GPIO gpio = new Source_GPIO(nativePin, Source_GPIO.OpAccess.GET); * // Errs set in individual gpio objs if they occur * gpio.load(transport, readerHandle); * * this.Add(gpio); * temp++; * } * * // For now always consider success... user can look thru list * // to check what pin failures may have occurred... * * return rfid.Constants.Result.OK; */ //End by FJ for change caption of "Antenna Ports" and "GPIO" GUI for HP SiP, 2015-01-22 }
private bool OpenDevice( ) { if (true == m_clsInterface.API_OpenDevice()) { if (Result.OK != GetVersion(AskMode())) { m_clsInterface.API_Shutdown(); return(false); } ControlItem(ENUM_ITEM_TYPE.TEXT_STATUS, "Connected"); //Add by Wayne for improve FW upgrade feature for integrate M03X model, 2015-03-31 ControlItem(ENUM_ITEM_TYPE.TEXT_KEY, "No data"); if (m_Mode == DEV_MODE.AP) { reader = new LakeChabotReader(); if (rfid.Constants.Result.OK != reader.result_major) { throw new Exception(reader.result_major.ToString()); } //Mod by FJ for model category, 2016/05/31 if ((reader.uiModelNameMAJOR & 0xFF) == 88) // ASCII 88 = 'X' { if (((reader.uiModelNameMAJOR >> 24) & 0xFF) == 77) // ASCII 77 = 'M' { ControlItem(ENUM_ITEM_TYPE.TEXT_MODEL, String.Format("RU00-{0}{1}{2}-{3}", (char)((reader.uiModelNameMAJOR >> 24) & 0xFF), (char)((reader.uiModelNameMAJOR >> 16) & 0xFF), (char)((reader.uiModelNameMAJOR >> 8) & 0xFF), (char)(reader.uiModelNameMAJOR & 0xFF))); } else { ControlItem(ENUM_ITEM_TYPE.TEXT_MODEL, String.Format("RU-{0}{1}{2}-{3}", (char)((reader.uiModelNameMAJOR >> 24) & 0xFF), (char)((reader.uiModelNameMAJOR >> 16) & 0xFF), (char)((reader.uiModelNameMAJOR >> 8) & 0xFF), (char)(reader.uiModelNameMAJOR & 0xFF))); } } else if (((reader.uiModelNameMAJOR >> 16) & 0xFF) == 56)// ASCII 56 = '8' { ControlItem(ENUM_ITEM_TYPE.TEXT_MODEL, String.Format("RU-{0}{1}{2}", (char)((reader.uiModelNameMAJOR >> 16) & 0xFF), (char)((reader.uiModelNameMAJOR >> 8) & 0xFF), (char)((reader.uiModelNameMAJOR) & 0xFF))); } /* * if ((reader.uiModelNameMAJOR == 0x383234) || (reader.uiModelNameMAJOR == 0x383631)) * { * ControlItem(ENUM_ITEM_TYPE.TEXT_MODEL, String.Format("RU-{0}{1}{2}", * (char)((reader.uiModelNameMAJOR >> 16) & 0xFF), * (char)((reader.uiModelNameMAJOR >> 8) & 0xFF), * (char)((reader.uiModelNameMAJOR) & 0xFF))); * } * else if (reader.uiModelNameMAJOR == 0x38323458) * { * ControlItem(ENUM_ITEM_TYPE.TEXT_MODEL, String.Format("RU-{0}{1}{2}-{3}", * (char)((reader.uiModelNameMAJOR >> 24) & 0xFF), * (char)((reader.uiModelNameMAJOR >> 16) & 0xFF), * (char)((reader.uiModelNameMAJOR >> 8) & 0xFF), * (char)(reader.uiModelNameMAJOR & 0xFF))); * } * else if ((reader.uiModelNameMAJOR == 0x4D303258) || (reader.uiModelNameMAJOR == 0x4D303358)) * { * ControlItem(ENUM_ITEM_TYPE.TEXT_MODEL, String.Format("RU00-{0}{1}{2}-{3}", * (char)((reader.uiModelNameMAJOR >> 24) & 0xFF), * (char)((reader.uiModelNameMAJOR >> 16) & 0xFF), * (char)((reader.uiModelNameMAJOR >> 8) & 0xFF), * (char)(reader.uiModelNameMAJOR & 0xFF))); * } */ //End by FJ for model category, 2016/05/31 else { ControlItem(ENUM_ITEM_TYPE.TEXT_MODEL, "Error"); } } else { ControlItem(ENUM_ITEM_TYPE.TEXT_MODEL, "No data"); } //End by Wayne for improve FW upgrade feature for integrate M03X model, 2015-03-31 return(true); } else { ControlItem(ENUM_ITEM_TYPE.TEXT_STATUS, "Disconnected"); return(false); } }
public ConfigureForm(LakeChabotReader reader) { _reader = reader; InitializeComponent(); //Clark 2011.7.25. Clear Memory data. Avoid many invenory or //other to full in memory and can't catch corrent packet. LakeChabotReader.MANAGED_ACCESS.API_RadioEnterConfigMenu(); this.Text = String.Format("{0} Module Configuration", AssemblyTitle); _generalControl = new ConfigureSettingsControl(Reader); _generalControl.Visible = true; _generalControl.Name = "_generalControl"; configureToolStripContainer.ContentPanel.Controls.Add(_generalControl); _antennaControl = new ConfigureAntenna(Reader); _antennaControl.Visible = false; _antennaControl.Name = "_antennaControl"; configureToolStripContainer.ContentPanel.Controls.Add(_antennaControl); _selectCriteriaControl = new ConfigureSelect_Display(Reader); _selectCriteriaControl.Visible = false; _selectCriteriaControl.Name = "_selectCriteriaControl"; configureToolStripContainer.ContentPanel.Controls.Add(_selectCriteriaControl); _algorithmControl = new ConfigureAlgorithm_Display(Reader); _algorithmControl.Visible = false; _algorithmControl.Name = "_algorithmControl"; configureToolStripContainer.ContentPanel.Controls.Add(_algorithmControl); _postSingulationControl = new ConfigurePostSingulation_Display(Reader); _postSingulationControl.Visible = false; _postSingulationControl.Name = "_postSingulationControl"; configureToolStripContainer.ContentPanel.Controls.Add(_postSingulationControl); _gpioControl = new ConfigureGPIO(Reader); _gpioControl.Visible = false; _gpioControl.Name = "_gpioControl"; configureToolStripContainer.ContentPanel.Controls.Add(_gpioControl); _rfControl = new ConfigureRFBandForm(Reader); _rfControl.Visible = false; _rfControl.Name = "_rfControl"; configureToolStripContainer.ContentPanel.Controls.Add(_rfControl); _aboutReaderControl = new AboutReaderControl(Reader); _aboutReaderControl.Visible = false; _aboutReaderControl.Name = "_aboutReaderControl"; configureToolStripContainer.ContentPanel.Controls.Add(_aboutReaderControl); _troubleshootControl = new ConfigureTroubleControl(Reader); _troubleshootControl.Visible = false; _troubleshootControl.Name = "_troubleshootControl"; configureToolStripContainer.ContentPanel.Controls.Add(_troubleshootControl); //Clark 2011.2.10 Cpoied from R1000 Tracer. RFBandsToolStripButton.Visible = false; }
public void Init(LakeChabotReader reader) { InitializeComponent(); //clark 2011.5.9 Get this point to get Access Password in module's buffer. _reader = reader; //clark not sure. Hide QT function. Wait FW team to support. //this.COMBOBOX_TagAccess.DataSource = System.Enum.GetValues(typeof(TagAccessType)); foreach (TagAccessType item in Enum.GetValues(typeof(TagAccessType))) { this.COMBOBOX_TagAccess.Items.Add(item); } COMBOBOX_TagAccess.Items.Remove(TagAccessType.QT_None); COMBOBOX_TagAccess.Items.Remove(TagAccessType.QT_Read); COMBOBOX_TagAccess.Items.Remove(TagAccessType.QT_Write); foreach (MemoryBank item in Enum.GetValues(typeof(MemoryBank))) { this.COMBOBOX_TagAccessMemoryBank.Items.Add(item); } this.COMBOBOX_TagAccessMemoryBank.Items.Remove(rfid.Constants.MemoryBank.UNKNOWN); this.COMBOBOX_TagAccessMemoryBank.SelectedIndex = 0; foreach (PasswordPermission item in Enum.GetValues(typeof(PasswordPermission))) { this.COMBOBOX_AccessPasswordPermissions.Items.Add(item); this.COMBOBOX_KillPasswordPermissions.Items.Add(item); } this.COMBOBOX_AccessPasswordPermissions.Items.Remove(PasswordPermission.UNKNOWN); this.COMBOBOX_KillPasswordPermissions.Items.Remove(PasswordPermission.UNKNOWN); this.COMBOBOX_AccessPasswordPermissions.SelectedIndex = 0; this.COMBOBOX_KillPasswordPermissions.SelectedIndex = 0; foreach (MemoryPermission item in Enum.GetValues(typeof(MemoryPermission))) { this.COMBOBOX_EPCBankPermissions.Items.Add(item); this.COMBOBOX_TIDBankPermissions.Items.Add(item); this.COMBOBOX_UserBankPermissions.Items.Add(item); } this.COMBOBOX_EPCBankPermissions.Items.Remove(MemoryPermission.UNKNOWN); this.COMBOBOX_TIDBankPermissions.Items.Remove(MemoryPermission.UNKNOWN); this.COMBOBOX_UserBankPermissions.Items.Remove(MemoryPermission.UNKNOWN); this.COMBOBOX_EPCBankPermissions.SelectedIndex = 0; this.COMBOBOX_TIDBankPermissions.SelectedIndex = 0; this.COMBOBOX_UserBankPermissions.SelectedIndex = 0; foreach (QTCtrlType item in Enum.GetValues(typeof(QTCtrlType))) { this.COMBOBOX_QTCtrlType.Items.Add(item); } this.COMBOBOX_QTCtrlType.Items.Remove(QTCtrlType.UNKNOWN); this.COMBOBOX_QTCtrlType.SelectedIndex = 0; foreach (QTPersistenceType item in Enum.GetValues(typeof(QTPersistenceType))) { this.COMBOBOX_QTPersistence.Items.Add(item); } this.COMBOBOX_QTPersistence.Items.Remove(QTPersistenceType.UNKNOWN); this.COMBOBOX_QTPersistence.SelectedIndex = 0; foreach (QTShortRangeType item in Enum.GetValues(typeof(QTShortRangeType))) { this.COMBOBOX_QTShortRange.Items.Add(item); } this.COMBOBOX_QTShortRange.Items.Remove(QTShortRangeType.UNKNOWN); this.COMBOBOX_QTShortRange.SelectedIndex = 0; foreach (QTMemMapType item in Enum.GetValues(typeof(QTMemMapType))) { this.COMBOBOX_QTMemMap.Items.Add(item); } this.COMBOBOX_QTMemMap.Items.Remove(QTMemMapType.UNKNOWN); this.COMBOBOX_QTMemMap.SelectedIndex = 0; }
public FORM_TagAccess(LakeChabotReader reader) { Init(reader); }
public FORM_TagAccess(LakeChabotReader reader, TagAccessData r_tagAccessData) { Init(reader); _tagAccessData = r_tagAccessData; if (!_tagAccessData.initialized) { _tagAccessData.accessPasswordPermissions = PasswordPermission.NO_CHANGE; _tagAccessData.killPasswordPermissions = PasswordPermission.NO_CHANGE; _tagAccessData.epcMemoryBankPermissions = MemoryPermission.NO_CHANGE; _tagAccessData.tidMemoryBankPermissions = MemoryPermission.NO_CHANGE; _tagAccessData.userMemoryBankPermissions = MemoryPermission.NO_CHANGE; _tagAccessData.offset_text = "0"; _tagAccessData.value1_text = "0"; _tagAccessData.value2_text = "0"; _tagAccessData.accessPassword_text = "0"; _tagAccessData.killPassword_text = "0"; _tagAccessData.count = 1; _tagAccessData.bank = MemoryBank.EPC; _tagAccessReads.ReadWords = 8; _tagAccessReads.ReadWords_text = "8"; _tagAccessReads.TotalReadWords = 3840; _tagAccessReads.TotalReadWords_text = "3840"; _tagAccessData.strcTagFlag.PostMatchFlag = 0; _tagAccessData.strcTagFlag.SelectOpsFlag = 0; _tagAccessData.strcTagFlag.RetryCount = 0; _tagAccessData.strcTagFlag.bErrorKeepRunning = false; _tagAccessData.initialized = true; } //Get Access Password in modeule's buffer. UInt32 Password = 0; if (Result.OK == reader.API_l8K6CTagGetAccessPassword(ref Password)) { _tagAccessData.accessPassword_text = String.Format("{0:X}", Password); _tagAccessData.accessPassword = Password; } this.COMBOBOX_TagAccess.SelectedIndex = (int)_tagAccessData.type; this.COMBOBOX_TagAccessMemoryBank.SelectedIndex = (int)_tagAccessData.bank; this.TEXTBOX_TagAccessOffset.Text = _tagAccessData.offset_text; this.TEXTBOX_TagAccessTotalReadWords.Text = _tagAccessReads.TotalReadWords_text; this.COMBOBOX_TagAccessReadWords.Text = _tagAccessReads.ReadWords_text; this.TEXTBOX_TagAccessValue1.Text = _tagAccessData.value1_text; this.TEXTBOX_TagAccessValue2.Text = _tagAccessData.value2_text; this.NUMERICUPDOWN_TagAccessCount.Value = _tagAccessData.count; this.TEXTBOX_TagAccessAccessPassword.Text = _tagAccessData.accessPassword_text; this.TEXTBOX_TagAccessKillPassword.Text = _tagAccessData.killPassword_text; this.COMBOBOX_AccessPasswordPermissions.SelectedIndex = (int)_tagAccessData.accessPasswordPermissions; this.COMBOBOX_KillPasswordPermissions.SelectedIndex = (int)_tagAccessData.killPasswordPermissions; this.COMBOBOX_EPCBankPermissions.SelectedIndex = (int)_tagAccessData.epcMemoryBankPermissions; this.COMBOBOX_TIDBankPermissions.SelectedIndex = (int)_tagAccessData.tidMemoryBankPermissions; this.COMBOBOX_UserBankPermissions.SelectedIndex = (int)_tagAccessData.userMemoryBankPermissions; this.COMBOBOX_QTCtrlType.SelectedIndex = (int)_tagAccessData.qtReadWrite; this.COMBOBOX_QTPersistence.SelectedIndex = (int)_tagAccessData.qtPersistence; this.COMBOBOX_QTShortRange.SelectedIndex = (int)_tagAccessData.qtShortRange; this.COMBOBOX_QTMemMap.SelectedIndex = (int)_tagAccessData.qtMemoryMap; if (_tagAccessData.strcTagFlag.SelectOpsFlag == 1) { chkPerformSelectOps.Checked = true; } if (_tagAccessData.strcTagFlag.PostMatchFlag == 1) { chkPerformPostMatch.Checked = true; } if (flag == true) { this.TEXTBOX_TagAccessTotalReadWords.Text = SaveTotalReadWords; this.COMBOBOX_TagAccessMemoryBank.SelectedIndex = 3; } if (flag == true && ReadWordsFlag == true) { this.COMBOBOX_TagAccessMemoryBank.SelectedIndex = 3; typenote = 3; //this.TEXTBOX_TagAccessTotalReadWords.Text=SaveTotalReadWords2; } }
public ConfigureRFBandForm(LakeChabotReader reader) { if (null == reader) { throw new ArgumentNullException("reader", "Null reader passed to ConfigureAntenna CTOR()"); } if (reader.Mode != rfidReader.OperationMode.BoundToReader) { throw new ArgumentOutOfRangeException("reader", "Unbound reader passed to ConfigureAntenna()"); } InitializeComponent( ); this.reader = reader; this.timer = new Timer( ); this.timer.Interval = 5000; this.timer.Tick += new EventHandler(timer_Tick); // edit column editColumn.HeaderText = ""; editColumn.Text = "Edit"; editColumn.UseColumnTextForButtonValue = true; editColumn.MinimumWidth = 50; editColumn.Resizable = DataGridViewTriState.False; editColumn.Width = 50; editColumn.Frozen = true; // channel column channelColumn.HeaderText = " Slot"; channelColumn.MinimumWidth = 50; channelColumn.Name = "channelColumn"; channelColumn.ReadOnly = true; channelColumn.Resizable = DataGridViewTriState.False; channelColumn.Width = 50; channelColumn.DataPropertyName = "Band"; channelColumn.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; channelColumn.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; channelColumn.Frozen = true; // state column stateColumn.HeaderText = "Enabled"; stateColumn.MinimumWidth = 100; stateColumn.Name = "stateColumn"; stateColumn.ReadOnly = true; stateColumn.Resizable = DataGridViewTriState.False; stateColumn.Width = 100; stateColumn.DataPropertyName = "State"; stateColumn.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; stateColumn.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; // frequency column frequencyColumn.HeaderText = "Frequency (MHz)"; frequencyColumn.MinimumWidth = 120; frequencyColumn.Name = "frequencyColumn"; frequencyColumn.ReadOnly = true; frequencyColumn.Resizable = DataGridViewTriState.False; frequencyColumn.Width = 100; frequencyColumn.DataPropertyName = "Frequency"; frequencyColumn.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; frequencyColumn.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; // multiplier column multiplierColumn.HeaderText = "Multiply Ratio"; multiplierColumn.MinimumWidth = 100; multiplierColumn.Name = "multiplierColumn"; multiplierColumn.ReadOnly = true; multiplierColumn.Resizable = DataGridViewTriState.False; multiplierColumn.Width = 100; multiplierColumn.DataPropertyName = "MultiplyRatio"; multiplierColumn.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; multiplierColumn.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; // divider column dividerColumn.HeaderText = "Divide Ratio"; dividerColumn.MinimumWidth = 100; dividerColumn.Name = "dividerColumn"; dividerColumn.ReadOnly = true; dividerColumn.Resizable = DataGridViewTriState.False; dividerColumn.Width = 100; dividerColumn.DataPropertyName = "DivideRatio"; dividerColumn.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dividerColumn.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; // min column minColumn.HeaderText = "Minimum DAC Band"; minColumn.MinimumWidth = 100; minColumn.Name = "minColumn"; minColumn.ReadOnly = true; minColumn.Resizable = DataGridViewTriState.False; minColumn.Width = 100; minColumn.DataPropertyName = "MinimumDACBand"; minColumn.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; minColumn.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; // affinity column affinityColumn.HeaderText = "Affinity Band"; affinityColumn.MinimumWidth = 100; affinityColumn.Name = "affinityColumn"; affinityColumn.ReadOnly = true; affinityColumn.Resizable = DataGridViewTriState.False; affinityColumn.Width = 100; affinityColumn.DataPropertyName = "AffinityBand"; affinityColumn.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; affinityColumn.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; // max column maxColumn.HeaderText = "Maximum DAC Band"; maxColumn.MinimumWidth = 100; maxColumn.Name = "maxColumn"; maxColumn.ReadOnly = true; maxColumn.Resizable = DataGridViewTriState.False; maxColumn.Width = 100; maxColumn.DataPropertyName = "MaximumDACBand"; maxColumn.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; maxColumn.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; // guard column guardColumn.HeaderText = "Guard Band"; guardColumn.MinimumWidth = 100; guardColumn.Name = "guardColumn"; guardColumn.ReadOnly = true; guardColumn.Resizable = DataGridViewTriState.False; guardColumn.Width = 100; guardColumn.DataPropertyName = "GuardBand"; guardColumn.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; guardColumn.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; view.RowHeadersVisible = false; }