<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<div style="font-size: 10pt; font-family: Verdana,Geneva,sans-serif;">
<div style="font-size: 10pt; font-family: Verdana,Geneva,sans-serif;">
<div style="font-size: 10pt; font-family: Verdana,Geneva,sans-serif;">
<div style="font-size: 10pt; font-family: Verdana,Geneva,sans-serif;">
<p>Hi everyone</p>
<p>While trying to resolve the Leaf's poll state management, I find myself needing to understand the different levels of poller state that exist in the main (non-vehicle-specific) code.</p>
<p>What is the semantic difference between these?</p>
<p>OvmsVehicle::m_poll_state</p>
<p>OvmsPollers::m_poll_state</p>
<p>OvmsPoller::m_poll_state</p>
<p>To me it appears the first two duplicate each other, and I'm not sure why.</p>
<p>The third one is a little different as it's per poller (i.e. per bus).</p>
<p><br /></p>
<p>If I follow how changes are propagated to these for my car, I see:</p>
<p>OvmsVehicle::PollSetState(state)</p>
<p>This immediately sets OvmsVehicle::m_poll_state = state, and calls:</p>
<p>OvmsPollers::PollSetState(state)</p>
<p>This immediately sets OvmsPollers::m_poll_state = state, and queues a request to set the lowest level states.</p>
<p>When the request is processed, it loops through the buses. For each it calls:</p>
<p>OvmsPoller::Do_PollSetState(state)</p>
<p>This sets this instance's OvmsPoller::m_poll_state = state, and updates some associated variables.</p>
<p><br /></p>
<p>What is the logic behind having so many poll states?</p>
<p>Chris</p>
<p><br /></p>
<p><br /></p>
<div id="v1v1v1v1_rc_sig"></div>
</div>
</div>
</div>
</div>
</body></html>