<div dir="ltr">OH, and also,<div><br></div><div>What do you think of treating the O<span style="font-family:monospace">vmsPoller.Times.GetStatus() </span><font face="arial, sans-serif">items as an associative array - or should I treat it as a normal array?</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">//.ichael</font></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 3 Jul 2024 at 14:24, Michael Geddes <<a href="mailto:frog@bunyip.wheelycreek.net">frog@bunyip.wheelycreek.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I figured I may as well add an OvmsPoller object to DukTape for Ovms. I'm waiting to get back to my OVMS so that I can test it.. but this is the documentation I have for the stuff I have coded. Thoughts on this?<div><br></div><div>What do people think of OvmsPoller.Times sub-object? I've added a general mechanism for this. </div><div><br></div><div>Also should I have OvmsPoller.Pause() or OvmsPoller.SetUserPaused(true) ?</div><div>//.</div><div><br></div><div><br></div><div><font face="monospace">OvmsPoller<br>^^^^^^^^^^<br>The Ovms Poller object represents the poller sub-system. It contains the following methods:<br><br>- ``ispaused = OvmsPoller.GetPaused()``: Return true if the poller is paused by the system/user.<br>- ``ispaused = OvmsPoller.GetUserPaused()``: Return true if the poller is paused by the user.<br>- ``OvmsPoller.Pause()``: Pause the poller (adds User poller pause)<br>- ``OvmsPoller.Resume()``: Remove the User poller pause.<br><br>- ``tracemode = OvmsPoller.GetTrace()``: Return the current trace mode.<br>- ``OvmsPoller.SetTrace(tracemode)``: Set the current trace mode.<br><br> The Traces still require that 'Verbose' and 'Debug' levels (depending) for the 'vehicle-poll'<br> debug tag are set.<br> Trace modes for verbose logging can be one of:<br> - ``on``: On for poller loop<br> - ``txrx``: On for txrx queue (this can be hazardous for some cars)<br> - ``all``: On for both poller loop and txrx queuing<br> - ``off``: Logging Off<br> Note that only ``on`` and ``off`` are recommended.<br><br>The poller object also contains a ``Times`` property for the OBD Poll-Time tracing<br>which contains the following methods:<br>- ``isrunning = OvmsPoller.Times.GetEnabled()``: Returns true if the time-tracing is enabled<br>- ``OvmsPoller.Times.SetEnabled(isrunning)``: Sets the enabled status of the timer-tracing<br>- ``OvmsPoller.Times.Reset()``: Reset the timers (doesn't affect their current state).<br>- ``OvmsPoller.Times.GetStatus()``: Gets the status of the various times. This returns an object<br> of this format:<br> .. code-block:: javascript<br> return_value = {<br> "items": {<br> "Poll:PRI" : {<br> "count_hz": 1,<br> "avg_util_pm": 0.529,<br> "peak_util_pm":0.652,<br> "avg_time_ms": 0.052,<br> "peak_time_ms":1.516<br> },<br> "Poll:SRX": {<br> "count_hz": 1.47,<br> "avg_util_pm": 0.302,<br> "peak_util_pm":0.44,<br> "avg_time_ms": 0.02,<br> "peak_time_ms":0.573<br> },<br> "RxCan1[778]": {<br> "count_hz": 0.74,<br> "avg_util_pm": 0.427,<br> "peak_util_pm":0.826,<br> "avg_time_ms": 0.063,<br> "peak_time_ms":1.872<br> },<br> "RxCan1[7a8]": {<br> "count_hz": 0.35,<br> "avg_util_pm": 0.183,<br> "peak_util_pm":0.355,<br> "avg_time_ms": 0.052,<br> "peak_time_ms":1.382<br> },<br> "TxCan1[7b3]": {<br> "count_hz": 0.07,<br> "avg_util_pm": 0.005,<br> "peak_util_pm":0.01,<br> "avg_time_ms": 0.007,<br> "peak_time_ms":0.099<br> },<br> "TxCan1[7c6]": {<br> "count_hz": 0,<br> "avg_util_pm": 0,<br> "peak_util_pm":0.009,<br> "avg_time_ms": 0.004,<br> "peak_time_ms":0.098<br> },<br> "Cmd:State": {<br> "count_hz": 0,<br> "avg_util_pm": 0,<br> "peak_util_pm":0,<br> "avg_time_ms": 0.011,<br> "peak_time_ms":0.109<br> }<br> },<br><br> "tot_count_hz": 11.76,<br> "tot_util_pm": 6.247,<br> "tot_time_ms": 4.628<br> };</font><br></div></div>
</blockquote></div>