Closed faceless2 closed 2 years ago
Hi @faceless2
Actually, paxcounter did use a linked list to store mac addresses. The reason to switch away from that is to improve performance (a lot) as well as reducing RAM usage.
Replacing the current implementation with a linked list won't be accepted due to performance and RAM usage implication. So the only way I see is to make it, is a compile-time option. Not sure if that is feasible or if we would better of implementing that in a fork.
@faceless2 Prior using this library, paxcounter had own code for collecting and storing MACs in a std::map container, which is probably more handy for your use case. You could use an older paxcounter version (pre v3) to grab the code from there.
We decided to intentionally not have any kind of fingerprinting MACs in the code, e.g. storing timestamps, to keep maximum privacy and compliance of the code with GDPR. It depends on your use case and the law of the country where you plan to run your code, if this is a reason also for you.
Thanks both of you. It seemed the obvious approach to me so I had a feeling it it had been tried and rejected.
General question, not a specific issue.
I'm working on a change to this library (and paxcounter) which uses a linked list of mac address records, rather than a bitmask. This allows me to record the time a MAC was first seen; this allows the paxcounter to make a distinction between devices walking past, devices in the area for a few minutes and devices there permanently (eg a wifi router).
Before I go too far down this route I was wondering if it was a) an idea you've tried and already rejected and b) if not, would it be of interest as a pull request? It's a fairly large change and involves changing the count_payload_t structure to add various fields so this information can be reported to the upstream application.