Open FKD13 opened 7 months ago
So roughly like this:
Detection{...} ------ MAC -------> Baton{MAC, LABEL} <--------- LABEL --------- BatonSwitchover{Prev: Label, Next: Label}
Detection{Mac: 00:00:00:00:00:00}
Detection{Mac: 00:00:00:00:00:01}
Baton{Mac: 00:00:00:00:00:00, Label: 'A'}
Baton{Mac: 00:00:00:00:00:01, Label: 'B'}
BatonSwitchover{Team: 'LeTeam', Prev: 'A', Next: 'B'}
The Mac is enough to identify a baton. Having a BatonId only adds complexity in this case.
The fetcher needs to keep a map in memory of the mac to batonId mapping. This should not be needed. For the batonswitchovers the batonId is also used. Using a MAC here would not be more usefull, but here we can switch to batonLabel (which should also be unique) and this would be an improvement, as it is very clear which physical baton is assigned to the team from the switchover
This change can be difficult becouse the batonId is used in a couple of places outside telraam as well. Currently in https://github.com/12urenloop/Loxsi and https://github.com/12urenloop/DeDenker