Exemple #1
0
        void StartInventoryClick()
        {
            if (_startInventory)
            {
                EPCData.Clear();
                TagData.Clear();

                _startInventoryButtonText = "Stop Scan";

                BleMvxApplication._reader.BARCODEPowerOn();
            }
            else
            {
                _startInventory           = true;
                _startInventoryButtonText = "Start Scan";

                BleMvxApplication._reader.BARCODEPowerOff();
            }

            RaisePropertyChanged(() => startInventoryButtonText);
        }
Exemple #2
0
        protected void ResetData()
        {
            tagExists  = false;
            tagVersion = 0;

            if (null == tagData)
            {
                tagData = new TagData();
            }
            else
            {
                tagData.Clear();
            }
            if (null == pictureTokens)
            {
                pictureTokens = new List <PictureInfo>();
            }
            else
            {
                pictureTokens.Clear();
            }
            if (null == picturePositions)
            {
                picturePositions = new List <KeyValuePair <string, int> >();
            }
            else
            {
                picturePositions.Clear();
            }
            if (null == structureHelper)
            {
                structureHelper = new FileStructureHelper(isLittleEndian);
            }
            else
            {
                structureHelper.Clear();
            }
        }
        void StartInventoryClick()
        {
            if (_startInventory)
            {
                EPCData.Clear();
                TagData.Clear();

                StartTagCount();
                if (BleMvxApplication._config.RFID_OperationMode == CSLibrary.Constants.RadioOperationMode.CONTINUOUS)
                {
                    _startInventory           = false;
                    _startInventoryButtonText = "Stop Inventory";
                }

                // Setting 1
                BleMvxApplication._reader.rfid.SetInventoryTimeDelay((uint)BleMvxApplication._config.RFID_InventoryDelayTime);
                BleMvxApplication._reader.rfid.SetInventoryDuration((uint)BleMvxApplication._config.RFID_DWellTime);
                BleMvxApplication._reader.rfid.SetPowerLevel((uint)BleMvxApplication._config.RFID_Power);

                // Setting 2
                BleMvxApplication._reader.rfid.SetOperationMode(BleMvxApplication._config.RFID_OperationMode);
                BleMvxApplication._reader.rfid.SetTagGroup(BleMvxApplication._config.RFID_TagGroup);
                BleMvxApplication._reader.rfid.SetCurrentSingulationAlgorithm(BleMvxApplication._config.RFID_Algorithm);
                BleMvxApplication._reader.rfid.SetCurrentLinkProfile(BleMvxApplication._config.RFID_Profile);

                // Setting 3
                BleMvxApplication._reader.rfid.SetDynamicQParms(BleMvxApplication._config.RFID_DynamicQParms);

                // Setting 4
                BleMvxApplication._reader.rfid.SetFixedQParms(BleMvxApplication._config.RFID_FixedQParms);

                // Select Criteria filter

                /*
                 * BleMvxApplication._reader.rfid.Options.TagSelected.epcMask = new CSLibrary.Structures.S_MASK("709999");
                 *
                 * CSLibrary.Structures.SelectCriterion[] critlist = new CSLibrary.Structures.SelectCriterion[1];
                 * critlist[0] = new CSLibrary.Structures.SelectCriterion();
                 * critlist[0].mask = new CSLibrary.Structures.SelectMask(CSLibrary.Constants.MemoryBank.EPC, 0x20, 24, BleMvxApplication._reader.rfid.Options.TagSelected.epcMask.ToBytes());
                 * critlist[0].action = new CSLibrary.Structures.SelectAction(CSLibrary.Constants.Target.SELECTED, CSLibrary.Constants.Action.ASLINVA_DSLINVB, 0);
                 *
                 * BleMvxApplication._reader.rfid.SetSelectCriteria(critlist);
                 */

                // Post Match Criteria filter
                BleMvxApplication._reader.rfid.Options.TagSelected.epcMask = new CSLibrary.Structures.S_MASK(BleMvxApplication._config.MASK_EPC);

                CSLibrary.Structures.SingulationCriterion[] sel = new CSLibrary.Structures.SingulationCriterion[1];
                sel[0]       = new CSLibrary.Structures.SingulationCriterion();
                sel[0].match = BleMvxApplication._config.MASK_Enable ? 0U : 1U;
                sel[0].mask  = new CSLibrary.Structures.SingulationMask(BleMvxApplication._config.MASK_Offset, (uint)(BleMvxApplication._config.MASK_EPC.Length * 4), BleMvxApplication._reader.rfid.Options.TagSelected.epcMask.ToBytes());
                BleMvxApplication._reader.rfid.SetPostMatchCriteria(sel);

                // Start Inventory
                BleMvxApplication._reader.rfid.StartOperation(CSLibrary.Constants.Operation.TAG_RANGING);
            }
            else
            {
                _startInventory           = true;
                _startInventoryButtonText = "Start Inventory";

                _tagCount = false;
                BleMvxApplication._reader.rfid.StopOperation();
            }

            RaisePropertyChanged(() => startInventoryButtonText);
        }
 private void ClearClick()
 {
     EPCData.Clear();
     TagData.Clear();
 }