Periodically logs the output of a callback function by calling it at a certain rate and gathering up the results into a list. More...
Public Member Functions | |
| def | __init__ |
| initializes the logger but doesn't start it | |
| def | get_ret_vals |
| If max_calls sets to automatically terminate, return the ret vals. | |
| def | start |
| begins the logger | |
| def | stop |
| stops the monitor | |
Public Attributes | |
| args | |
| beg_time | |
| cb | |
| is_running | |
| max_calls | |
| num_calls | |
| rate | |
| ret | |
| thread | |
Private Member Functions | |
| def | _run |
Periodically logs the output of a callback function by calling it at a certain rate and gathering up the results into a list.
Definition at line 100 of file src/kelsey_sandbox/perception_monitor.py.
| def kelsey_sandbox.perception_monitor.PeriodicLogger.__init__ | ( | self, | |
| callback, | |||
rate = 0.01, |
|||
args = None |
|||
| ) |
initializes the logger but doesn't start it
| callback | the function to be called each time |
| rate | the rate in seconds at which to call the callback |
| args | the function arguments to pass into the callback |
Definition at line 107 of file src/kelsey_sandbox/perception_monitor.py.
| def kelsey_sandbox.perception_monitor.PeriodicLogger._run | ( | self | ) | [private] |
Definition at line 131 of file src/kelsey_sandbox/perception_monitor.py.
If max_calls sets to automatically terminate, return the ret vals.
Definition at line 165 of file src/kelsey_sandbox/perception_monitor.py.
| def kelsey_sandbox.perception_monitor.PeriodicLogger.start | ( | self, | |
max_calls = None |
|||
| ) |
begins the logger
| max_calls | the maximum number of times to call the callback |
Definition at line 121 of file src/kelsey_sandbox/perception_monitor.py.
stops the monitor
Definition at line 156 of file src/kelsey_sandbox/perception_monitor.py.
Definition at line 107 of file src/kelsey_sandbox/perception_monitor.py.
Definition at line 107 of file src/kelsey_sandbox/perception_monitor.py.
Definition at line 107 of file src/kelsey_sandbox/perception_monitor.py.
Definition at line 107 of file src/kelsey_sandbox/perception_monitor.py.
Definition at line 107 of file src/kelsey_sandbox/perception_monitor.py.
Definition at line 107 of file src/kelsey_sandbox/perception_monitor.py.
Definition at line 107 of file src/kelsey_sandbox/perception_monitor.py.
Definition at line 107 of file src/kelsey_sandbox/perception_monitor.py.
Definition at line 107 of file src/kelsey_sandbox/perception_monitor.py.