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
panel_report.hpp File Reference

An app's parameter values as #PANEL lines, for bench frontends. More...

Detailed Description

An app's parameter values as #PANEL lines, for bench frontends.

Which parameters are on the panel, and their names, come from the app's params manifest: sloth generates PANEL_PARAMS and PARAM_NAMES in sbl/app/params.hpp and writes the rest of the declaration (controls, CCs, groups) into the SHIM, where a bench reads it. The app prints only values, as tagged-output lines:

#PANEL tune=0.512 fine=0.500 wave=0.250 shape=0.500

update() takes a parameter's current value and ignores a parameter the panel does not show. poll() writes the panel's values, in PANEL_PARAMS order, when one has moved, at a capped rate (log/tagged.hpp TaggedValues).

Context
Main loop only: the report writes to the log sink.

Usage:

#include <sbl/app/params.hpp>
sbl::control::PanelReport panel{sbl::app::PANEL_PARAMS, sbl::app::PARAM_NAMES};
while (true) { // main loop
for (uint8_t i = 0; i < sbl::app::PARAM_COUNT; ++i) {
const auto p = static_cast<sbl::app::Param>(i);
panel.update(p, merged(p));
}
panel.poll<SBL_LOG_OUTPUT>(sbl::system::timer::millis());
}
The values of the parameters a panel shows, as #PANEL lines.
void update(Target target, float value)
uint32_t millis()
Definition timer.hpp:65

Definition in file panel_report.hpp.

#include <cstddef>
#include <cstdint>
#include <sbl/common/log/tagged.hpp>

Go to the source code of this file.

Classes

class  sbl::control::PanelReport< Target, N, LINE >
 The values of the parameters a panel shows, as #PANEL lines. More...
 

Namespaces

namespace  sbl
 Root namespace for all Sound Byte Libs code.
 
namespace  sbl::control
 The control stack: scheduler, event queue, merge, CC mapping, calibration.
 

Functions

template<typename Target , size_t N, size_t COUNT>
 sbl::control::PanelReport (const Target(&)[N], const char *const (&)[COUNT]) -> PanelReport< Target, N >