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

Method getTopics

lib/MultiIconPlugin/src/MultiIconPlugin.cpp:75–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73 *****************************************************************************/
74
75void MultiIconPlugin::getTopics(JsonArray& topics) const
76{
77 uint8_t slotId;
78
79 for (slotId = 0U; slotId < _MultiIconPlugin::View::MAX_ICON_SLOTS; ++slotId)
80 {
81 JsonObject jsonSlot = topics.createNestedObject();
82
83 jsonSlot["name"] = String(TOPIC_SLOT) + "/" + slotId;
84 jsonSlot["extra"]["ha"] = TOPIC_SLOT_EXTRA_HA_FILE_NAME;
85 }
86
87 (void)topics.add(TOPIC_SLOTS);
88}
89
90bool MultiIconPlugin::getTopic(const String& topic, JsonObject& value) const
91{

Callers

nothing calls this directly

Calls 1

StringClass · 0.85

Tested by

no test coverage detected