AceRoutine  1.5.0
A low-memory, fast-switching, cooperative multitasking library using stackless coroutines on Arduino platforms.
Public Types | Static Public Member Functions | List of all members
ace_routine::LogBinJsonRendererTemplate< T_COROUTINE > Class Template Reference

Print the LogBinProfiler bins as a JSON array. More...

#include <LogBinJsonRenderer.h>

Public Types

using Profiler = LogBinProfilerTemplate< T_COROUTINE >
 Typedef of the LogBinProfiler supported by this class.
 

Static Public Member Functions

static void printTo (Print &printer, uint8_t startBin, uint8_t endBin, bool clear=true, bool rollup=true)
 Loop over all coroutines and print the bin counts as JSON. More...
 

Detailed Description

template<typename T_COROUTINE>
class ace_routine::LogBinJsonRendererTemplate< T_COROUTINE >

Print the LogBinProfiler bins as a JSON array.

For example, here is the output from examples/SoundManager:

* {
* "soundManager":[1411,0,2,0,0,0,0,0,0,0],
* "soundRoutine":[1411,0,1,1,0,0,0,0,0,0]
* }
* 

Definition at line 48 of file LogBinJsonRenderer.h.

Member Function Documentation

◆ printTo()

template<typename T_COROUTINE >
static void ace_routine::LogBinJsonRendererTemplate< T_COROUTINE >::printTo ( Print &  printer,
uint8_t  startBin,
uint8_t  endBin,
bool  clear = true,
bool  rollup = true 
)
inlinestatic

Loop over all coroutines and print the bin counts as JSON.

Parameters
printerdestination of output, usually Serial
startBinstart index of the bins (0-31)
endBinend index (exclusive) of the bins (0-32)
clearcall LogBinProfiler::clear() after printing (default true)
rolluproll-up exterior bins into the first and last bins (default true)

Definition at line 64 of file LogBinJsonRenderer.h.


The documentation for this class was generated from the following file: