GithubHelp home page GithubHelp logo

Comments (3)

gotthardp avatar gotthardp commented on May 29, 2024

Are you sure this is a bug in the python library? Have you tried doing the same with the mercuryapi binaries?
The read_count is directly provided by mercuryapi. If you are getting 1, perhaps the interrogation period is too short, the tag is too far or faulty. Or it could be a problem of the reader.

from python-mercuryapi.

DanWehr avatar DanWehr commented on May 29, 2024

I suspect this isn't actually an issue given the use of continuous mode. I think the Mercury API treats the read_count value as "how many reads of this tag does this object represent," not "how many times have I read this tag since continuous reading began," which @haroutisonfire may be wanting.

If it's not continous, multiple tag reads may be combined before being returned to your code and so you may see a read count higher than 1. You would expect to see this with a long read timeout and tags that respond often. If you're doing continuous reads each read may be reported to you immediately with your code being able to receive and process it before the next read comes in, so it never has the chance to combine reads of the same tag.

You'll likely have to sum the read_count yourself, e.g.:

from collections import defaultdict
tag_totals = defaultdict(int)
reader.start_reading(lambda tag: tag_totals[tag.epc] += tag.read_count)
time.sleep(1)
reader.stop_reading()

from python-mercuryapi.

gotthardp avatar gotthardp commented on May 29, 2024

Thanks, @DanWehr. I am closing this now as it doesn't sound like an issue.

from python-mercuryapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.