Refining the JSON schema based on the requirements of the display driver.

This commit is contained in:
Jonathan Naylor
2023-07-26 16:32:33 +01:00
parent 1a19243653
commit e4de1951cc
4 changed files with 7 additions and 4 deletions

View File

@@ -1441,6 +1441,7 @@ int CMMDVMHost::run()
if (m_cwIdTimer.isRunning() && m_cwIdTimer.hasExpired()) {
if (!m_modem->hasTX()){
LogDebug("sending CW ID");
writeJSONMode("CW");
m_modem->sendCWId(m_cwCallsign);
m_cwIdTimer.setTimeout(m_cwIdTime);
@@ -3492,6 +3493,7 @@ void CMMDVMHost::remoteControl(const std::string& commandString)
cwtext += " ";
cwtext += m_remoteControl->getArgString(i);
}
writeJSONMode("CW");
m_modem->sendCWId(cwtext);
}
break;

View File

@@ -357,6 +357,7 @@ void CPOCSAGControl::clock(unsigned int ms)
if (m_state == PS_ENDING) {
LogMessage("POCSAG, transmitted %u frame(s) of data from %u message(s)", m_frames, m_count);
writeJSON("network", 0U, "end");
m_state = PS_NONE;
}
}

View File

@@ -19,6 +19,6 @@
#if !defined(VERSION_H)
#define VERSION_H
const char* VERSION = "20230725";
const char* VERSION = "20230726";
#endif

View File

@@ -1,6 +1,6 @@
{
"$defs": {
"mmdvm_mode": {"type": "string", "enum": ["lockout", "idle", "error", "D-Star", "DMR", "YSF", "NXDN", "POCSAG", "FM", "M17"]},
"mmdvm_mode": {"type": "string", "enum": ["lockout", "idle", "error", "CW", "D-Star", "DMR", "YSF", "NXDN", "POCSAG", "FM", "M17"]},
"dstar_callsign": {"type": "string", "minLength": 8, "maxLength": 8},
"dstar_extension": {"type": "string", "minLength": 4, "maxLength": 4},
"ysf_callsign": {"type": "string", "minLength": 10, "maxLength": 10},
@@ -21,7 +21,7 @@
"m17_traffic_type": {"type": "string", "enum": ["audio", "audio_data", "data"]},
"ax25_pid": {"type": "string"},
"pocsag_source": {"type": "string", "enum": ["local", "network"]},
"pocsag_functional": {"type": "string", "enum": ["numeric", "alphanumeric", "alert_1", "alert_2"]},
"pocsag_functional": {"type": "string", "enum": ["numeric", "alphanumeric", "alert_1", "alert_2", "end"]},
"action": {"type": "string", "enum": ["invalid", "rejected", "start", "late_entry", "end", "lost"]},
"dmr_action": {"type": "string", "enum": ["csbk", "timeout", "invalid", "rejected", "start", "late_entry", "end", "lost"]},
"duration": {"type": "number", "minimum": 0.0},
@@ -175,7 +175,7 @@
"functional": {"$ref": "#/$defs/pocsag_functional"},
"source": {"$ref": "#/$defs/pocsag_source"},
"message": {"type": "string"},
"required": ["timestamp", "ric", "functional", "source"]
"required": ["timestamp", "ric", "source"]
},
"FM": {