DDS plugin: Update property instead of set to avoid errors

This commit is contained in:
Alexey Rybalchenko 2020-03-24 14:50:28 +01:00
parent 32764e1b12
commit c7b1304a2c

View File

@ -283,7 +283,10 @@ auto DDS::SubscribeForConnectingChannels() -> void
if (mi.second.fNumSubChannels == mi.second.fDDSValues.size()) { if (mi.second.fNumSubChannels == mi.second.fDDSValues.size()) {
int i = 0; int i = 0;
for (const auto& e : mi.second.fDDSValues) { for (const auto& e : mi.second.fDDSValues) {
SetProperty<string>(string{"chans." + mi.first + "." + to_string(i) + ".address"}, e.second); auto result = UpdateProperty<string>(string{"chans." + mi.first + "." + to_string(i) + ".address"}, e.second);
if (!result) {
LOG(error) << "UpdateProperty failed for: " << "chans." << mi.first << "." << to_string(i) << ".address" << " - property does not exist";
}
++i; ++i;
} }
} }