add types to json get with definition

This commit is contained in:
John
2021-11-05 10:54:17 +01:00
parent c7d77607c7
commit edb1e365a6
4 changed files with 44 additions and 3 deletions
+7 -2
View File
@@ -2199,8 +2199,13 @@ result_t MainLoop::executeGet(const vector<string>& args, bool* connected, ostri
*ostream << ",\n \"reconnects\": " << m_reconnectCount
<< ",\n \"masters\": " << m_busHandler->getMasterCount()
<< ",\n \"messages\": " << m_messages->size()
<< ",\n \"lastup\": " << static_cast<unsigned>(maxLastUp)
<< "\n }"
<< ",\n \"lastup\": " << static_cast<unsigned>(maxLastUp);
if (withDefinition) {
*ostream << ",\n \"types\": [";
DataTypeList::getInstance()->dump(verbosity, true, ostream);
*ostream << "\n ]";
}
*ostream << "\n }"
<< "\n}";
type = 6;
}