Ejemplo n.º 1
0
        // ReSharper disable once InconsistentNaming
        private void Tag18K6CQT(int radioHandle)
        {
            var program = new Rfiddler(options);

            QTParms qtParms = new QTParms();


            logger.Information($"Starting basic QT test, limiting of {options.PacketCount} MAC packets");

            qtParms.common.tagStopCount = 0;
            qtParms.common.callback     = program.PacketCallback;
            qtParms.common.context      = IntPtr.Zero;
            qtParms.common.callbackCode = IntPtr.Zero;

            qtParms.optCmdType = OptType.OPT_READ;

            ReadCmdParms readCmdParms = new ReadCmdParms();

            readCmdParms.bank   = MemoryBank.EPC;
            readCmdParms.offset = 2;
            readCmdParms.count  = 6;

            qtParms.accessParms = readCmdParms;

            qtParms.qtCmdParms.qtMemoryMap   = QTMemMapType.PRIVATE;
            qtParms.qtCmdParms.qtPersistence = QTPersistenceType.PERMANENT;
            qtParms.qtCmdParms.qtReadWrite   = QTCtrlType.READ;
            qtParms.qtCmdParms.qtShortRange  = QTShortRangeType.DISABLE;

            qtParms.accessPassword = 0x0;

            var result = link.Tag18K6CQT(radioHandle, qtParms, 0);

            logger.Information("link.Tag18K6CQT => {Result}", result);
        }
Ejemplo n.º 2
0
            public QTParms( )
            {
                WriteRandomParms     tempRandom     = new WriteRandomParms();
                WriteSequentialParms tempSequential = new WriteSequentialParms();
                ReadCmdParms         tempRead       = new ReadCmdParms();
                UInt32 max = 0;

                // arbitrarily default to one of the lengths
                max = tempSequential.length;

                // account for randomParms being larger
                if (tempRandom.length > max)
                {
                    max = tempRandom.length;
                }

                // account for readParms being larger
                if (tempRead.length > max)
                {
                    max = tempRead.length;
                }

                this.length_ = this.length_ + max;
            }
Ejemplo n.º 3
0
            public QTParms( )
            {
                WriteRandomParms     tempRandom     = new WriteRandomParms();
                WriteSequentialParms tempSequential = new WriteSequentialParms();
                ReadCmdParms         tempRead       = new ReadCmdParms();
                UInt32               max            = 0;

                // arbitrarily default to one of the lengths
                max = tempSequential.length;

                // account for randomParms being larger
                if (tempRandom.length > max)
                {
                    max = tempRandom.length;
                }

                // account for readParms being larger
                if (tempRead.length > max)
                {
                    max = tempRead.length;
                }

                this.length_ = this.length_ + max;
            }
Ejemplo n.º 4
0
            private void BuildParams_QT(ref QTParms parameters, ref UInt32 accessPassword)
            {
                parameters = new QTParms();

                switch (_tagAccessData.type)
                {
                    case TagAccessType.QT_Read:
                        ReadCmdParms readParameters = new ReadCmdParms();
                        BuildParams_ReadCmd(ref readParameters, ref parameters.accessPassword);
                        parameters.accessParms = readParameters;
                        parameters.optCmdType = OptType.OPT_READ;
                        break;
                    case TagAccessType.QT_Write:
                        WriteSequentialParms writeParameters = new WriteSequentialParms();
                        BuildParams_WriteCmd(ref writeParameters, ref parameters.accessPassword);
                        parameters.accessParms = writeParameters;
                        parameters.optCmdType = OptType.OPT_WRITE_TYPE_SEQUENTIAL;
                        break;
                    case TagAccessType.QT_None:
                        parameters.optCmdType = OptType.OPT_NONE;
                        break;
                    default:
                        System.Diagnostics.Debug.Assert(false, "Tag Acces Type"); 
                        break;
                }

                parameters.qtCmdParms.qtReadWrite   = _tagAccessData.qtReadWrite;
                parameters.qtCmdParms.qtPersistence = _tagAccessData.qtPersistence;
                parameters.qtCmdParms.qtShortRange  = _tagAccessData.qtShortRange;
                parameters.qtCmdParms.qtMemoryMap   = _tagAccessData.qtMemoryMap;

                accessPassword = _tagAccessData.accessPassword;
            }
Ejemplo n.º 5
0
 private void BuildParams_ReadCmd(ref ReadCmdParms parameters, ref UInt32 accessPassword)
 {
     parameters.bank   = _tagAccessData.bank;
     parameters.offset = _tagAccessData.offset;
     parameters.count  = _tagAccessData.count;
     accessPassword    = _tagAccessData.accessPassword;
 }