Skip to content

control-edge/cppmodel

v0.35.0MIT

Build, run, and query CppModel simulations and their Workspace API results

gprintf

Print any value from running C, C++, Python or Node code (a bench program, a HIL rig, a real-time loop, a script, an algorithm being debugged) and get it back as a chart image (PNG) to look at, a table (CSV), the series (JSON), and a live graph for the user in the workspace. gprintf (SDK 0.18.0+) is CppModel's "visual printf": one call per value, no simulation loop. It replaces printf debugging, dumping values to a CSV or log file, and plotting scripts. Covers adding the calls, naming the stream, reading it back via the cppmodel MCP server (list_streams, get_stream, export_signals with stream), and turning it off for production and CI. Use when asked to print, log, dump, trace, plot, chart or watch values from code that isn't a CppModel simulation; when you need to see how a value evolves over time in such code; to export a program's values to PNG, CSV or JSON; to look at or export a stream; or about gprintf, gp_init or streams.

Read SKILL.md at the source

Pinned to revision aa75fbf7cc90, so it is the text this page describes rather than whatever the author pushed since.

Files

Every link opens the file at its source, pinned to the revision this page describes.