コード例 #1
0
ファイル: SimpleReadPlan.cs プロジェクト: haogitcc/FuURADemo
 /// <summary>
 ///  Create a SimpleReadPlan
 /// </summary>
 /// <param name="antennaList">List of antenna numbers.  May be null.</param>
 /// <param name="protocol">Protocol identifier</param>
 /// <param name="filter">Tag filter.  May be null.</param>
 /// <param name="op">Operation mode</param>
 /// <param name="weight">Relative scheduling weight</param>
 public SimpleReadPlan(ICollection <int> antennaList, TagProtocol protocol, TagFilter filter, TagOp op, int weight)
     : base(weight)
 {
     Antennas = (antennaList != null) ? CollUtil.ToArray(antennaList) : null;
     Protocol = protocol;
     Filter   = filter;
     Op       = op;
 }
コード例 #2
0
ファイル: SimpleReadPlan.cs プロジェクト: tosog/mercury
 /// <summary>
 /// Create simple read plan with custom Antenna Configurations
 /// </summary>
 /// <param name="antennaList">List of antenna numbers.  May be null.</param>
 /// <param name="protocol">Protocol identifier</param>
 /// <param name="op">Operation mode</param>
 /// <param name="customAntConfig">Custom Antenna Configuration class</param>
 public SimpleReadPlan(ICollection <int> antennaList, TagProtocol protocol, TagOp op, CustomAntConfig customAntConfig)
     : base(DEFAULT_WEIGHT)
 {
     Antennas      = (antennaList != null) ? CollUtil.ToArray(antennaList) : null;
     Protocol      = protocol;
     Op            = op;
     CustAntConfig = customAntConfig;
 }
コード例 #3
0
ファイル: SimpleReadPlan.cs プロジェクト: haogitcc/FuURADemo
 /// <summary>
 ///  Create a SimpleReadPlan
 /// </summary>
 /// <param name="antennaList">List of antenna numbers.  May be null.</param>
 /// <param name="protocol">Protocol identifier</param>
 /// <param name="filter">Tag filter.  May be null.</param>
 /// <param name="op">Operation mode</param>
 /// <param name="useFastSearch">Enable fast search</param>
 public SimpleReadPlan(ICollection <int> antennaList, TagProtocol protocol, TagFilter filter, TagOp op, bool useFastSearch)
     : base(DEFAULT_WEIGHT)
 {
     Antennas      = (antennaList != null) ? CollUtil.ToArray(antennaList) : null;
     Protocol      = protocol;
     Filter        = filter;
     Op            = op;
     UseFastSearch = useFastSearch;
 }
コード例 #4
0
ファイル: MultiReadPlan.cs プロジェクト: haogitcc/FuURADemo
        /// <summary>
        /// Create MultiReadPlan
        /// </summary>
        /// <param name="plans">List of read plans</param>
        /// <param name="weight">Relative weight of MultiReadPlan</param>
        public MultiReadPlan(ICollection <ReadPlan> plans, int weight)
            : base(weight)
        {
            Plans       = CollUtil.ToArray(plans);
            TotalWeight = 0;

            foreach (ReadPlan rp in plans)
            {
                TotalWeight += rp.Weight;
            }
        }
コード例 #5
0
            /// <summary>
            /// Select constructor.
            /// </summary>
            /// <param name="invert">invert the selection</param>
            /// <param name="op">select options</param>
            /// <param name="address">starting mask address</param>
            /// <param name="mask">the select mask</param>
            /// <param name="data">the data for comparison</param>
            public Select(bool invert, SelectOp op, byte address, byte mask, ICollection <byte> data)
            {
                Invert  = invert;
                Op      = op;
                Address = address;
                Mask    = mask;
                Data    = CollUtil.ToArray(data);

                if (Data.Length != 8)
                {
                    throw new ArgumentException("ISO180006B select data must be 8 bytes");
                }
            }
コード例 #6
0
ファイル: ByteConv.cs プロジェクト: haogitcc/FuURADemo
        /// <summary>
        /// Convert byte array to u16 array
        /// </summary>
        /// <param name="bytes">Input bytes</param>
        /// <returns>Output words</returns>
        public static UInt16[] ToU16s(ICollection <byte> bytes)
        {
            if (0 != (bytes.Count % 1))
            {
                throw new ArgumentException("Byte array length must be even");
            }

            byte[]   byteArray = CollUtil.ToArray(bytes);
            UInt16[] words     = new UInt16[byteArray.Length / 2];
            for (int i = 0; i < words.Length; i++)
            {
                words[i]   = (UInt16)byteArray[2 * i];
                words[i] <<= 8;
                words[i]  |= byteArray[2 * i + 1];
            }

            return(words);
        }
コード例 #7
0
 /// <summary>
 /// Create TagData
 /// </summary>
 /// <param name="epcBytes">EPC value</param>
 /// <param name="crcBytes">CRC value</param>
 /// <param name="pcBytes">PC value</param>
 public TagData(ICollection <byte> epcBytes, ICollection <byte> crcBytes, ICollection <byte> pcBytes)
     : base(epcBytes, crcBytes)
 {
     _pc = (null != pcBytes) ? CollUtil.ToArray(pcBytes) : null;
 }
コード例 #8
0
ファイル: TagData.cs プロジェクト: haogitcc/FuURADemo
 /// <summary>
 /// Create TagData
 /// </summary>
 /// <param name="epcBytes">EPC value</param>
 /// <param name="crcBytes">CRC value</param>
 public TagData(ICollection <byte> epcBytes, ICollection <byte> crcBytes)
 {
     _epc = (null != epcBytes) ? CollUtil.ToArray(epcBytes) : null;
     _crc = (null != crcBytes) ? CollUtil.ToArray(crcBytes) : null;
 }
コード例 #9
0
ファイル: MultiFilter.cs プロジェクト: junerod/RFIDProject
 /// <summary>
 /// Create ordered sequence of filters
 /// </summary>
 /// <param name="filters">List of filters</param>
 public MultiFilter(ICollection <TagFilter> filters)
 {
     this.filters = CollUtil.ToArray(filters);
 }