add RCON data to voice channel data;

3.0-rcon_maint
Bryan Biedenkapp 3 years ago
parent c553c943ec
commit cdaaac620c

@ -123,7 +123,10 @@ system:
channelNo: 1
dmrNetId: 1
voiceChNo:
- 1
- channelNo: 1
rconAddress: 127.0.0.1
rconPort: 9990
rconPassword: "PASSWORD"
colorCode: 1
nac: 293
# txNAC: 293

@ -1868,8 +1868,16 @@ bool Host::readParams()
}
yaml::Node& voiceChList = rfssConfig["voiceChNo"];
if (voiceChList.size() == 0U) {
::LogError(LOG_HOST, "No voice channel list defined!");
return false;
}
for (size_t i = 0; i < voiceChList.size(); i++) {
uint32_t chNo = (uint32_t)::strtoul(voiceChList[i].as<std::string>("1").c_str(), NULL, 16);
yaml::Node& channel = voiceChList[i];
uint32_t chNo = (uint32_t)::strtoul(channel["channelNo"].as<std::string>("1").c_str(), NULL, 16);
if (chNo == 0U) { // clamp to 1
chNo = 1U;
}
@ -1877,6 +1885,14 @@ bool Host::readParams()
chNo = 4095U;
}
std::string rconAddress = channel["rconAddress"].as<std::string>("127.0.0.1");
uint16_t rconPort = (uint16_t)channel["rconPort"].as<uint32_t>(RCON_DEFAULT_PORT);
std::string rconPassword = channel["rconPassword"].as<std::string>();
::LogInfoEx(LOG_HOST, "Voice Channel Id %u Channel No $%04X RCON Adddress %s:%u", m_channelId, chNo, rconAddress.c_str(), rconPort);
// TODO handle storing RCON data for voice channels
m_voiceChNo.push_back(chNo);
}

Loading…
Cancel
Save

Powered by TurnKey Linux.