Exemple #1
0
        public async Task <TagInventoryResult> TagInventory(TagInventoryParams args = null)
        {
            if (args == null)
            {
                args = new TagInventoryParams();
            }
            var responses = await SendReceive(CommandDataPacket.TagInventory(ReaderCommand.TagInventory, args));

            return(new TagInventoryResult(responses));
        }
Exemple #2
0
        public void TagInventoryParams_should_serialize_correctly()
        {
            var res = new TagInventoryParams
            {
                QValue  = 15,
                QFlags  = QFlags.SpecialStrategy | QFlags.ImpinjFastId | QFlags.RequestStatisticsPacket,
                Session = SessionValue.S1,
            }.Serialize();

            TagInventoryParams.BaseSize.Should().Be(2);
            res.Length.Should().Be(TagInventoryParams.BaseSize);
            (res[0] & 0b0001_1111).Should().Be(15);
            ((QFlags)res[0] & QFlags.SpecialStrategy).Should().Be(QFlags.SpecialStrategy);
            ((QFlags)res[0] & QFlags.ImpinjFastId).Should().Be(QFlags.ImpinjFastId);
            ((QFlags)res[0] & QFlags.RequestStatisticsPacket).Should().Be(QFlags.RequestStatisticsPacket);
            ((SessionValue)res[1]).Should().Be(SessionValue.S1);
        }
 public static CommandDataPacket TagInventory(ReaderCommand command, TagInventoryParams args)
 {
     return(new CommandDataPacket(command, args.Serialize()));
 }