Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
sbl::control::PanelReport< Target, N, LINE > Class Template Reference

The values of the parameters a panel shows, as #PANEL lines. More...

Detailed Description

template<typename Target, size_t N, size_t LINE = 128>
class sbl::control::PanelReport< Target, N, LINE >

The values of the parameters a panel shows, as #PANEL lines.

Template Parameters
TargetThe app's parameter enum (sbl::app::Param)
NNumber of parameters on the panel
LINELine buffer size; a longer #PANEL line is split over several lines

Definition at line 53 of file panel_report.hpp.

#include <panel_report.hpp>

Public Member Functions

template<size_t COUNT>
 PanelReport (const Target(&params)[N], const char *const (&names)[COUNT])
 
void set_interval_ms (uint32_t ms)
 
void set_threshold (float threshold)
 
void set_decimals (uint8_t decimals)
 
void update (Target target, float value)
 
template<typename Output >
bool poll (uint32_t now_ms)
 
void force ()
 

Constructor & Destructor Documentation

◆ PanelReport()

template<typename Target , size_t N, size_t LINE = 128>
template<size_t COUNT>
sbl::control::PanelReport< Target, N, LINE >::PanelReport ( const Target(&)  params[N],
const char *const (&)  names[COUNT] 
)
inline
Parameters
paramsThe parameters on the panel, in page order (PANEL_PARAMS)
namesEvery parameter's key, indexed by Target (PARAM_NAMES)

Definition at line 60 of file panel_report.hpp.

Member Function Documentation

◆ set_interval_ms()

template<typename Target , size_t N, size_t LINE = 128>
void sbl::control::PanelReport< Target, N, LINE >::set_interval_ms ( uint32_t  ms)
inline

Definition at line 67 of file panel_report.hpp.

◆ set_threshold()

template<typename Target , size_t N, size_t LINE = 128>
void sbl::control::PanelReport< Target, N, LINE >::set_threshold ( float  threshold)
inline

Definition at line 68 of file panel_report.hpp.

◆ set_decimals()

template<typename Target , size_t N, size_t LINE = 128>
void sbl::control::PanelReport< Target, N, LINE >::set_decimals ( uint8_t  decimals)
inline

Definition at line 69 of file panel_report.hpp.

◆ update()

template<typename Target , size_t N, size_t LINE = 128>
void sbl::control::PanelReport< Target, N, LINE >::update ( Target  target,
float  value 
)
inline

Take a parameter's current value; one the panel does not show is ignored.

Definition at line 72 of file panel_report.hpp.

◆ poll()

template<typename Target , size_t N, size_t LINE = 128>
template<typename Output >
bool sbl::control::PanelReport< Target, N, LINE >::poll ( uint32_t  now_ms)
inline

Write #PANEL if a value moved and the interval has passed; true if it wrote.

Definition at line 83 of file panel_report.hpp.

◆ force()

template<typename Target , size_t N, size_t LINE = 128>
void sbl::control::PanelReport< Target, N, LINE >::force ( )
inline

Write every value at the next poll, moved or not: for a reader that just connected.

Definition at line 88 of file panel_report.hpp.


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