MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / SetConnection

Method SetConnection

plugins/mqtt/macro-condition-mqtt.cpp:82–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void MacroConditionMqtt::SetConnection(const std::string &name)
83{
84 _connection = GetWeakMqttConnectionByName(name);
85 auto connection = _connection.lock();
86 if (!connection) {
87 return;
88 }
89 _messageBuffer = connection->RegisterForEvents();
90}
91
92std::weak_ptr<MqttConnection> MacroConditionMqtt::GetConnection() const
93{

Callers 2

UpdateEntryDataMethod · 0.45

Calls 2

RegisterForEventsMethod · 0.45

Tested by

no test coverage detected