ESPHome 2026.12.0-dev
Loading...
Searching...
No Matches
sendspin_hub.h
Go to the documentation of this file.
1#pragma once
2
4
5#ifdef USE_ESP_IDF
6
13
14#ifdef USE_MDNS_SUPPORTS_ENABLE_DISABLE
16#endif
17#ifdef USE_SENDSPIN_ENABLED_SWITCH
19#endif
20
21#include <sendspin/client.h>
22#include <sendspin/config.h>
23#include <sendspin/types.h>
24
25#ifdef USE_SENDSPIN_ARTWORK
26#include <sendspin/artwork_role.h>
27#endif
28#ifdef USE_SENDSPIN_COLOR
29#include <sendspin/color_role.h>
30#endif
31#ifdef USE_SENDSPIN_CONTROLLER
32#include <sendspin/controller_role.h>
33#endif
34#ifdef USE_SENDSPIN_METADATA
35#include <sendspin/metadata_role.h>
36#endif
37#ifdef USE_SENDSPIN_PLAYER
38#include <sendspin/player_role.h>
39#endif
40#ifdef USE_SENDSPIN_SOURCE
42
43#include <sendspin/source_role.h>
44#endif
45#ifdef USE_SENDSPIN_VISUALIZER
46#include <sendspin/visualizer_role.h>
47#endif
48
49#include <array>
50#include <cstddef>
51#include <cstdint>
52#include <functional>
53#include <memory>
54#include <optional>
55#include <span>
56#include <string>
57#include <string_view> // NOLINT
58#include <utility>
59
60namespace esphome::sendspin_ {
61
67namespace sendspin_priority {
68// AFTER_WIFI so the hub runs after the wifi/ethernet drivers are up and we can read the active
69// interface's MAC address for the device info.
71inline constexpr float CHILD = HUB - 1.0f;
72} // namespace sendspin_priority
73
74// PREFERENCE KEYS: each library persistence key has its own preference, hashed from "sendspin_" + name. Renaming
75// one erases it.
76
78inline constexpr size_t SENDSPIN_RECORD_SLOTS = sendspin::SendspinClientConfig::DEFAULT_MAX_PAIRING_RECORDS;
79
84
101class SendspinHub final : public Component,
102#ifdef USE_SENDSPIN_ARTWORK
103 public sendspin::ArtworkRoleListener,
104#endif
105#ifdef USE_SENDSPIN_COLOR
106 public sendspin::ColorRoleListener,
107#endif
108#ifdef USE_SENDSPIN_CONTROLLER
109 public sendspin::ControllerRoleListener,
110#endif
111#ifdef USE_SENDSPIN_METADATA
112 public sendspin::MetadataRoleListener,
113#endif
114#ifdef USE_SENDSPIN_SOURCE
115 public sendspin::SourceRoleListener,
116#endif
117 public sendspin::SendspinClientListener,
118 public sendspin::SendspinNetworkProvider,
119 public sendspin::SendspinPersistenceProvider {
120 public:
121 SendspinHub();
122
123 float get_setup_priority() const override { return sendspin_priority::HUB; }
124 void setup() override;
125 void loop() override;
126 void on_shutdown() override;
127 void dump_config() override;
128
134 void connect_to_server(const std::string &url);
135
145 void disconnect_from_server(sendspin::SendspinGoodbyeReason reason);
146
151 void leave_group();
152
158
163
164 // --- Configuration setters (called from codegen) ---
165
166 template<typename F> void add_group_state_callback(F &&callback) {
167 this->group_state_callbacks_.add(std::forward<F>(callback));
168 }
169
170 template<typename F> void add_on_open_pairing_window_callback(F &&callback) {
171 this->open_pairing_window_callbacks_.add(std::forward<F>(callback));
172 }
173
174 template<typename F> void add_on_close_pairing_window_callback(F &&callback) {
175 this->close_pairing_window_callbacks_.add(std::forward<F>(callback));
176 }
177
178 template<typename F> void add_on_display_pairing_code_callback(F &&callback) {
179 this->display_pairing_code_callbacks_.add(std::forward<F>(callback));
180 }
181
182 template<typename F> void add_on_clear_pairing_code_callback(F &&callback) {
183 this->clear_pairing_code_callbacks_.add(std::forward<F>(callback));
184 }
185
186 template<typename F> void add_on_pairing_succeeded_callback(F &&callback) {
187 this->pairing_succeeded_callbacks_.add(std::forward<F>(callback));
188 }
189
190 template<typename F> void add_on_pairing_failed_callback(F &&callback) {
191 this->pairing_failed_callbacks_.add(std::forward<F>(callback));
192 }
193
194 void set_task_stack_in_psram(bool task_stack_in_psram) { this->task_stack_in_psram_ = task_stack_in_psram; }
195
202 void set_enabled(bool enabled);
203#ifdef USE_SENDSPIN_ENABLED_SWITCH
204 SUB_SWITCH(enabled)
205#endif
206
209 void set_unpaired_access_enabled(bool enabled);
210
212 bool is_client_running() const { return this->client_ != nullptr && this->client_->is_started(); }
213
215 bool is_disabled() const { return this->enabled_.has_value() && !this->enabled_.value(); }
216
219
221 using PairingToken = std::array<char, sendspin::SendspinClient::PAIRING_TOKEN_LENGTH>;
222
227 std::optional<PairingToken> get_pairing_token() const;
228
233 StringRef get_client_id() const;
234
240 void set_manufacturer(const char *manufacturer) { this->manufacturer_ = manufacturer; }
241 void set_model(const char *model) { this->model_ = model; }
242 void set_firmware_version(const char *firmware_version) { this->firmware_version_ = firmware_version; }
243
244#ifdef USE_MDNS_SUPPORTS_ENABLE_DISABLE
245 void set_mdns(mdns::MDNSComponent *mdns) { this->mdns_ = mdns; }
246#endif
247
249 void set_static_pairing_code(const char *code) { this->static_pairing_code_ = code; }
250
253 void set_pairing_code_display_supported(bool supported) { this->pairing_code_display_supported_ = supported; }
254
255 // --- Sendspin role specific methods ---
256
257#ifdef USE_SENDSPIN_ARTWORK
258 void set_artwork_config(const sendspin::ArtworkRoleConfig &config) { this->artwork_config_ = config; }
259
265 void artwork_frame_done(uint8_t slot);
266
267 template<typename F> void add_image_decode_callback(F &&callback) {
268 this->artwork_image_decode_callbacks_.add(std::forward<F>(callback));
269 }
270 template<typename F> void add_image_display_callback(F &&callback) {
271 this->artwork_image_display_callbacks_.add(std::forward<F>(callback));
272 }
273 template<typename F> void add_image_clear_callback(F &&callback) {
274 this->artwork_image_clear_callbacks_.add(std::forward<F>(callback));
275 }
276#endif
277
278#ifdef USE_SENDSPIN_COLOR
284 template<typename F> void add_color_callback(F &&callback) { this->color_callbacks_.add(std::forward<F>(callback)); }
285#endif
286
287#ifdef USE_SENDSPIN_CONTROLLER
288 void send_client_command(sendspin::SendspinControllerCommand command, std::optional<uint8_t> volume = std::nullopt,
289 std::optional<bool> mute = std::nullopt);
290
292 void switch_client();
293
294 template<typename F> void add_controller_state_callback(F &&callback) {
295 this->controller_state_callbacks_.add(std::forward<F>(callback));
296 }
297
299 template<typename F> void add_controller_state_clear_callback(F &&callback) {
300 this->controller_state_clear_callbacks_.add(std::forward<F>(callback));
301 }
302#endif
303
304#ifdef USE_SENDSPIN_METADATA
305 void set_metadata_config(const sendspin::MetadataRoleConfig &config) { this->metadata_config_ = config; }
306
313 template<typename F> void add_metadata_update_callback(F &&callback) {
314 this->metadata_update_callbacks_.add(std::forward<F>(callback));
315 }
316
319#endif
320
321#ifdef USE_SENDSPIN_PLAYER
322 void set_listener(sendspin::PlayerRoleListener *listener) { this->player_listener_ = listener; }
323 void set_player_config(const sendspin::PlayerRoleConfig &config) { this->player_config_ = config; }
324
326 sendspin::PlayerRole *get_player_role();
327#endif
328
329#ifdef USE_SENDSPIN_SOURCE
330 void set_source_config(const sendspin::SourceRoleConfig &config) { this->source_config_ = config; }
332 this->microphone_source_ = microphone_source;
333 }
334
338 void set_source_signal(bool present);
339
341 bool is_source_streaming() const { return this->source_role_ != nullptr && this->source_role_->is_streaming(); }
342
344 template<typename F> void add_on_source_streaming_started_callback(F &&callback) {
345 this->source_streaming_started_callbacks_.add(std::forward<F>(callback));
346 }
348 template<typename F> void add_on_source_streaming_stopped_callback(F &&callback) {
349 this->source_streaming_stopped_callbacks_.add(std::forward<F>(callback));
350 }
351#endif
352
353#ifdef USE_SENDSPIN_VISUALIZER
360 void set_visualizer(sendspin::VisualizerRoleListener *listener, const sendspin::VisualizerRoleConfig *config) {
361 this->visualizer_listener_ = listener;
362 this->visualizer_config_ = config;
363 }
364#endif
365
366 protected:
368 sendspin::SendspinClientConfig build_client_config_();
369
372 std::pair<ESPPreferenceObject *, size_t> pref_for_key_(StringRef key);
373
375 const char *get_product_name_() const;
376
377 const char *pairing_code_method_() const;
378
381 static const char *get_mac_address_into_buffer(std::span<char, MAC_ADDRESS_PRETTY_BUFFER_SIZE> buf);
382
383#ifdef USE_MDNS_SUPPORTS_ENABLE_DISABLE
386#endif
387
388 // --- SendspinClientListener overrides ---
389 void on_group_state(const sendspin::GroupState &changes) override;
390
391 void on_request_high_performance() override;
392
393 void on_release_high_performance() override;
394
395 void on_open_pairing_window() override;
396
397 void on_close_pairing_window() override;
398
399 void on_pairing_code(std::string_view code, sendspin::SendspinPairingCodeFormat format) override; // NOLINT
400
401 void on_clear_pairing_code() override;
402
403 void on_paired(std::string_view server_id) override; // NOLINT
404
405 void on_pairing_aborted(std::string_view server_id, sendspin::SendspinPairAbortReason reason) override; // NOLINT
406
407 // --- SendspinNetworkProvider override ---
408 bool is_network_ready() override;
409
410 // --- SendspinPersistenceProvider overrides ---
411 // The library calls commit() after writing pairing secrets, so they reach flash right away.
412 // The library's interface fixes these signatures; each converts its key to StringRef on entry.
413 std::optional<size_t> read_blob(std::string_view key_view, std::span<uint8_t> out) override; // NOLINT
414 bool write_blob(std::string_view key_view, std::span<const uint8_t> data) override; // NOLINT
415 bool commit() override;
416
417 // --- Sendspin role specific methods/overrides/member variables ---
418
419#ifdef USE_SENDSPIN_ARTWORK
420 void on_image_decode(uint8_t slot, const uint8_t *data, size_t length, sendspin::SendspinImageFormat format) override;
421
422 void on_image_display(uint8_t slot, uint32_t lateness_ms) override;
423
424 void on_image_clear(uint8_t slot) override;
425
426 sendspin::ArtworkRoleConfig artwork_config_{};
427 sendspin::ArtworkRole *artwork_role_{nullptr};
428
429 // Callback fan-out to child components; they filter by slot as needed.
430 CallbackManager<void(uint8_t, const uint8_t *, size_t, sendspin::SendspinImageFormat)>
434#endif
435
436#ifdef USE_SENDSPIN_COLOR
437 void on_color(const sendspin::ServerColorStateObject &color) override;
438
439 void on_color_clear() override;
440
441 // Callback fan-out to child components; they filter as needed
442 CallbackManager<void(const sendspin::ServerColorStateObject &)> color_callbacks_{};
443#endif
444
445#ifdef USE_SENDSPIN_CONTROLLER
446 sendspin::ControllerRole *controller_role_{nullptr};
447
448 void on_controller_state(const sendspin::ServerStateControllerObject &state) override;
449
450 void on_controller_state_clear() override;
451
452 // Callback fan-out to child components; they filter as needed. Only a media_player subscribes, while the switch
453 // action and the media source enable the controller role without one, so keep the idle cost to a single pointer.
454 LazyCallbackManager<void(const sendspin::ServerStateControllerObject &)> controller_state_callbacks_{};
456#endif
457
458#ifdef USE_SENDSPIN_METADATA
459 sendspin::MetadataRoleConfig metadata_config_{};
460 sendspin::MetadataRole *metadata_role_{nullptr};
461
462 void on_track_metadata(const sendspin::TrackMetadata &metadata) override;
463
464 void on_metadata_clear() override;
465
466 // Callback fan-out to child components; they filter as needed
467 CallbackManager<void(const sendspin::TrackMetadata &)> metadata_update_callbacks_{};
468#endif
469
470#ifdef USE_SENDSPIN_PLAYER
471 sendspin::PlayerRoleListener *player_listener_{nullptr};
472 sendspin::PlayerRoleConfig player_config_{};
473#endif
474
475#ifdef USE_SENDSPIN_SOURCE
476 // The server opens and closes the stream; the microphone runs only while it is open.
477 void on_streaming_started() override;
478 void on_streaming_stopped() override;
479
480 sendspin::SourceRoleConfig source_config_{};
481 sendspin::SourceRole *source_role_{nullptr};
483 // Signal set before setup(), applied once the role exists
484 bool source_signal_{false};
485
486 // Lazy: each is fed by an optional YAML automation.
489#endif
490
491#ifdef USE_SENDSPIN_VISUALIZER
492 sendspin::VisualizerRoleListener *visualizer_listener_{nullptr};
493 const sendspin::VisualizerRoleConfig *visualizer_config_{nullptr};
494#endif
495
496 // --- Core member variables ---
497
498 // Built once in setup(): make_preference() allocates a backend that is never freed.
503 std::array<ESPPreferenceObject, SENDSPIN_RECORD_SLOTS> record_slot_prefs_;
505
506 std::unique_ptr<sendspin::SendspinClient> client_;
507
508 // Callback fan-out to child components
509 CallbackManager<void(const sendspin::GroupState &)> group_state_callbacks_{};
510
511 // Lazy: each pairing callback is fed by an optional YAML surface.
518
519 const char *static_pairing_code_{nullptr}; // Codegen string literal, or nullptr when not configured
522#ifdef USE_MDNS_SUPPORTS_ENABLE_DISABLE
523 bool mdns_advertised_{false}; // Last state requested from mdns
524#endif
525
526 // Requested client state, applied from loop(). The client does not start until both are set.
527 std::optional<bool> enabled_;
528 std::optional<bool> unpaired_access_;
529
530 // Device information sent in the `client/hello` message. Defaults apply when neither the
531 // sendspin configuration nor the project information supplies a value.
532 const char *manufacturer_{"ESPHome"};
533 const char *model_{nullptr}; // nullptr reports the device name instead
534 const char *firmware_version_{ESPHOME_VERSION};
535
536#ifdef USE_MDNS_SUPPORTS_ENABLE_DISABLE
538#endif
539};
540
547class SendspinChild : public Component, public Parented<SendspinHub> {
548 public:
549 float get_setup_priority() const override { return sendspin_priority::CHILD; }
550};
551
557class SendspinPollingChild : public PollingComponent, public Parented<SendspinHub> {
558 public:
559 float get_setup_priority() const override { return sendspin_priority::CHILD; }
560};
561
562extern SendspinHub *global_sendspin_hub; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
563
564} // namespace esphome::sendspin_
565
566#endif // USE_ESP_IDF
Helper class to easily give an object a parent of type T.
Definition helpers.h:2432
This class simplifies creating components that periodically check a state.
Definition component.h:542
StringRef is a reference to a string owned by something else.
Definition string_ref.h:31
Base class for all sendspin subcomponents.
float get_setup_priority() const override
Thin adapter over sendspin::SendspinClient.
ESPPreferenceObject output_delay_pref_
void add_color_callback(F &&callback)
Registers a callback that fires when the server sends a palette update.
uint32_t get_feature_flags() const
Returns the SendspinFeature flags reported to API clients.
sendspin::SourceRole * source_role_
CallbackManager< void(uint8_t, const uint8_t *, size_t, sendspin::SendspinImageFormat)> artwork_image_decode_callbacks_
void add_image_clear_callback(F &&callback)
CallbackManager< void(uint8_t, uint32_t)> artwork_image_display_callbacks_
sendspin::PlayerRoleListener * player_listener_
CallbackManager< void(const sendspin::ServerColorStateObject &)> color_callbacks_
void set_firmware_version(const char *firmware_version)
sendspin::MetadataRoleConfig metadata_config_
void add_on_clear_pairing_code_callback(F &&callback)
const char * get_product_name_() const
Returns the product name reported to the server: the configured model, or the device name.
void set_static_pairing_code(const char *code)
The static pairing code, used on every boot.
std::optional< bool > unpaired_access_
void on_controller_state_clear() override
void set_artwork_config(const sendspin::ArtworkRoleConfig &config)
void confirm_pairing_window()
Confirms a pairing attempt on the device.
ESPPreferenceObject record_order_pref_
microphone::MicrophoneSource * microphone_source_
LazyCallbackManager< void(const std::string &, StringRef)> pairing_failed_callbacks_
void add_image_decode_callback(F &&callback)
void add_on_source_streaming_started_callback(F &&callback)
Registers a callback that fires when the server opens the source stream.
std::array< char, sendspin::SendspinClient::PAIRING_TOKEN_LENGTH > PairingToken
A pairing token's characters, with no terminating NUL.
void on_track_metadata(const sendspin::TrackMetadata &metadata) override
void set_metadata_config(const sendspin::MetadataRoleConfig &config)
LazyCallbackManager< void(const sendspin::ServerStateControllerObject &)> controller_state_callbacks_
std::optional< PairingToken > get_pairing_token() const
Returns the pairing token a Sendspin server uses to pair with this device.
void on_release_high_performance() override
void set_manufacturer(const char *manufacturer)
Sets the device information reported to the server in the client/hello message.
LazyCallbackManager< void()> clear_pairing_code_callbacks_
void on_pairing_code(std::string_view code, sendspin::SendspinPairingCodeFormat format) override
sendspin::MetadataRole * metadata_role_
void set_source_config(const sendspin::SourceRoleConfig &config)
bool is_source_streaming() const
Returns whether the source is streaming microphone audio to the server.
bool is_client_running() const
Returns whether the Sendspin client is running.
std::pair< ESPPreferenceObject *, size_t > pref_for_key_(StringRef key)
The preference a library key is stored in and its blob size, or {nullptr, 0} for a key with no storag...
void add_on_open_pairing_window_callback(F &&callback)
const char * pairing_code_method_() const
LazyCallbackManager< void(const std::string &)> display_pairing_code_callbacks_
void switch_client()
Sends the SWITCH controller command; exposed as the sendspin.switch action.
void add_on_source_streaming_stopped_callback(F &&callback)
Registers a callback that fires when the source stream closes.
void leave_group()
Leaves the current group so another source can use the speaker.
sendspin::PlayerRoleConfig player_config_
void set_pairing_code_display_supported(bool supported)
Set when on_display_pairing_code or a pairing_code text sensor is configured, so the device offers th...
void cancel_pairing_window()
Closes an open pairing window, so a waiting pairing attempt is not confirmed.
void add_on_pairing_succeeded_callback(F &&callback)
ESPPreferenceObject last_played_pref_
void add_group_state_callback(F &&callback)
void add_on_close_pairing_window_callback(F &&callback)
void set_player_config(const sendspin::PlayerRoleConfig &config)
LazyCallbackManager< void(const std::string &)> pairing_succeeded_callbacks_
static const char * get_mac_address_into_buffer(std::span< char, MAC_ADDRESS_PRETTY_BUFFER_SIZE > buf)
Writes the active network interface's MAC, in lowercase, into buf and returns its data pointer.
sendspin::PlayerRole * get_player_role()
Child components call this to get the PlayerRole instance after setup, so they can push updates to it...
void set_listener(sendspin::PlayerRoleListener *listener)
void set_visualizer(sendspin::VisualizerRoleListener *listener, const sendspin::VisualizerRoleConfig *config)
Sets the single consumer of the visualizer role's data and the config the role is registered with.
void on_image_clear(uint8_t slot) override
void on_paired(std::string_view server_id) override
void add_controller_state_clear_callback(F &&callback)
Registers a callback that fires when the connection is lost and the cached controller state is droppe...
bool is_disabled() const
Returns whether the client has been turned off with set_enabled().
void disconnect_from_server(sendspin::SendspinGoodbyeReason reason)
Disconnects the underlying client from the current server.
CallbackManager< void(const sendspin::GroupState &)> group_state_callbacks_
std::unique_ptr< sendspin::SendspinClient > client_
sendspin::ArtworkRoleConfig artwork_config_
void update_mdns_service_()
Keeps the _sendspin mDNS service advertised while the client is running.
LazyCallbackManager< void()> source_streaming_started_callbacks_
sendspin::VisualizerRoleListener * visualizer_listener_
void add_on_pairing_failed_callback(F &&callback)
LazyCallbackManager< void()> source_streaming_stopped_callbacks_
sendspin::SendspinClientConfig build_client_config_()
Builds the SendspinClientConfig from ESPHome configuration and platform info.
mdns::MDNSComponent * mdns_
sendspin::ControllerRole * controller_role_
void on_pairing_aborted(std::string_view server_id, sendspin::SendspinPairAbortReason reason) override
void add_on_display_pairing_code_callback(F &&callback)
void on_group_state(const sendspin::GroupState &changes) override
uint32_t get_track_progress_ms() const
Returns the interpolated track progress in milliseconds, or 0 if the hub is not yet ready.
void set_microphone_source(microphone::MicrophoneSource *microphone_source)
const sendspin::VisualizerRoleConfig * visualizer_config_
std::optional< size_t > read_blob(std::string_view key_view, std::span< uint8_t > out) override
void add_controller_state_callback(F &&callback)
std::optional< bool > enabled_
StringRef get_client_id() const
Returns the Sendspin client_id: base64url of the client's static public key.
void set_mdns(mdns::MDNSComponent *mdns)
void send_client_command(sendspin::SendspinControllerCommand command, std::optional< uint8_t > volume=std::nullopt, std::optional< bool > mute=std::nullopt)
void set_model(const char *model)
LazyCallbackManager< void()> controller_state_clear_callbacks_
sendspin::SourceRoleConfig source_config_
CallbackManager< void(uint8_t)> artwork_image_clear_callbacks_
ESPPreferenceObject keypair_pref_
CallbackManager< void(const sendspin::TrackMetadata &)> metadata_update_callbacks_
LazyCallbackManager< void()> open_pairing_window_callbacks_
SUB_SWITCH(enabled) void set_unpaired_access_enabled(bool enabled)
Turns unpaired (Sentinel) access on or off.
void set_task_stack_in_psram(bool task_stack_in_psram)
sendspin::ArtworkRole * artwork_role_
void on_request_high_performance() override
float get_setup_priority() const override
bool write_blob(std::string_view key_view, std::span< const uint8_t > data) override
void set_enabled(bool enabled)
Requests the Sendspin client, including the server, the roles and the mDNS advertisement,...
std::array< ESPPreferenceObject, SENDSPIN_RECORD_SLOTS > record_slot_prefs_
void on_image_display(uint8_t slot, uint32_t lateness_ms) override
void on_image_decode(uint8_t slot, const uint8_t *data, size_t length, sendspin::SendspinImageFormat format) override
ESPPreferenceObject pairing_psk_pref_
void on_controller_state(const sendspin::ServerStateControllerObject &state) override
LazyCallbackManager< void()> close_pairing_window_callbacks_
void connect_to_server(const std::string &url)
Connects the underlying client to the given Sendspin server.
void add_image_display_callback(F &&callback)
void on_color(const sendspin::ServerColorStateObject &color) override
void set_source_signal(bool present)
Reports whether the source has audio to offer; exposed as the sendspin.source.set_signal action.
void add_metadata_update_callback(F &&callback)
Registers a callback that fires when the server sends metadata.
void artwork_frame_done(uint8_t slot)
Acknowledges the most recent artwork delivery (display or clear) for a slot.
Base class for sendspin subcomponents that need polling behavior.
float get_setup_priority() const override
const char * key
bool state
Definition fan.h:2
std::vector< uint8_t > & out
Definition gif.cpp:49
constexpr size_t SENDSPIN_RECORD_SLOTS
Pairing-record slots, handed to the client as max_pairing_records.
SendspinFeature
Feature flags reported to API clients in DeviceCapabilitiesResponse.
SendspinHub * global_sendspin_hub
constexpr float AFTER_WIFI
For components that should be initialized after WiFi is connected.
Definition component.h:56
void const char int const char * format
Definition log.h:110
static void uint32_t