MCPcopy Create free account
hub / github.com/BlueAndi/Pixelix / getTopic

Method getTopic

lib/TimerService/src/TimerService.cpp:318–337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316}
317
318bool TimerService::getTopic(const String& topic, JsonObject& jsonValue)
319{
320 size_t idx;
321 JsonArray jsonTimerSettings = jsonValue.createNestedArray("timerSettings");
322 MutexGuard<Mutex> guard(m_mutex);
323
324 /* The callback is dedicated to a topic, therefore the
325 * topic parameter is not used.
326 */
327 UTIL_NOT_USED(topic);
328
329 for (idx = 0U; idx < MAX_TIMER_COUNT; ++idx)
330 {
331 JsonObject jsonTimerSetting = jsonTimerSettings.createNestedObject();
332
333 m_settings[idx].toJson(jsonTimerSetting);
334 }
335
336 return true;
337}
338
339bool TimerService::hasTopicChanged(const String& topic)
340{

Callers 2

startMethod · 0.95
strToAccessMethod · 0.45

Calls 1

toJsonMethod · 0.45

Tested by

no test coverage detected