extend the configuration

This commit is contained in:
Sven Czarnian
2021-08-16 08:08:41 +02:00
parent db3d3bf48d
commit 87ba0be57d
2 changed files with 15 additions and 10 deletions

View File

@@ -72,11 +72,14 @@ bool CommunicationFileFormat::parse(const std::string& filename, Communication&
return false;
}
if ("URL" == gsl::at(entry, 0)) {
config.url = gsl::at(entry, 1);
if ("Address" == gsl::at(entry, 0)) {
config.address = gsl::at(entry, 1);
}
else if ("Port" == gsl::at(entry, 0)) {
config.port = static_cast<std::uint16_t>(std::atoi(gsl::at(entry, 1).c_str()));
else if ("PortReporter" == gsl::at(entry, 0)) {
config.portReporter = static_cast<std::uint16_t>(std::atoi(gsl::at(entry, 1).c_str()));
}
else if ("PortNotification" == gsl::at(entry, 0)) {
config.portNotification = static_cast<std::uint16_t>(std::atoi(gsl::at(entry, 1).c_str()));
}
else if ("UID" == gsl::at(entry, 0)) {
config.identifier = gsl::at(entry, 1);