ebusd
ebusd copied to clipboard
--pollinterval and poll cycles not working as intended?
Either I still don't understand polling, or this does currently not work as intended.
Setting --pollintervall=10
and running ebusctl r -p 9 mymeasurement
I would expect a measurement / poll every 90 seconds. Instead, from the log I can see a poll-read every about 11-12 seconds. If, instead, I run ebusctl r -p 3 mymeasurement
, there is no difference, still a read every 11-12 seconds. (I am restarting ebusd between both commands)
Tested on ebusd 21.2 running on Raspian with eBUS Adapter 3.
it is a priority value, not a factor to be applied on the interval.
Understood, thank you. I guess I got tripped up by this description in the message definition section of the Wiki. I read that as the regular interval being --pollinterval times poll priority.
"r1"-"r9": poll When appending a digit 1-9 to the normal "read" type, the master-slave read message will be polled in regular intervals. The appended digit is the polling priority, i.e. messages with priority 1 are polled in each poll cycle, priority 2 messages only in every second poll cycle and so on.
What is a "poll cycle" then? (given in my above observation changing the poll priority did not make any change to the duration of the polling interval...)
the idea behind it is that the bus is penetrated only once every pollinterval seconds. so every pollinterval seconds another message gets picked from the priority queue of messages to be polled. a poll cycle would be complete after cycling through all messages having the same lowest priority (usually 1). e.g. when having 2 messages A and B in poll prio 1 and another message C in prio 3, A and B get polled in every poll cycle whereas C gets polled in every third cycle only, so the sequence would look like ABABABC and then repeat itself.
closed due to inactivity