| 80 | } |
| 81 | |
| 82 | void 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 | |
| 92 | std::weak_ptr<MqttConnection> MacroConditionMqtt::GetConnection() const |
| 93 | { |
no test coverage detected