Add DMR Master logging-in to the JSON status messages.

This commit is contained in:
Jonathan Naylor
2023-07-23 14:30:49 +01:00
parent 852caca96e
commit 8ca1bb8d72
6 changed files with 23 additions and 16 deletions

View File

@@ -384,7 +384,7 @@ int CDMRGateway::run()
LogInfo("DMRGateway-%s is starting", VERSION);
LogInfo("Built %s %s (GitID #%.7s)", __TIME__, __DATE__, gitversion);
writeJSONStatus("DMRGateway is starting");
WriteJSONStatus("DMRGateway is starting");
ret = createMMDVM();
if (!ret)
@@ -1267,7 +1267,7 @@ int CDMRGateway::run()
}
LogInfo("DMRGateway is stopping");
writeJSONStatus("DMRGateway is stopping");
WriteJSONStatus("DMRGateway is stopping");
delete m_xlxVoice;
@@ -2648,16 +2648,6 @@ void CDMRGateway::buildNetworkHostNetworkString(std::string &str, const std::str
}
}
void CDMRGateway::writeJSONStatus(const std::string& status)
{
nlohmann::json json;
json["timestamp"] = CUtils::createTimestamp();
json["message"] = status;
WriteJSON("status", json);
}
void CDMRGateway::onDynamic(const unsigned char* message, unsigned int length)
{
assert(gateway != NULL);