Add JSON to the M17 protocol.

This commit is contained in:
Jonathan Naylor
2022-12-29 15:44:00 +00:00
parent 59eccc16ba
commit 5c12bbb7b0
7 changed files with 269 additions and 32 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020,2021 by Jonathan Naylor G4KLX
* Copyright (C) 2020,2021,2022 by Jonathan Naylor G4KLX
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -103,6 +103,12 @@ private:
void writeEndRF();
void writeEndNet();
void writeJSON(const char* action, RPT_RF_STATE state, const std::string& source, const std::string& dest);
void writeJSON(const char* action, RPT_RF_STATE state, const std::string& source, const std::string& dest, float duration, float ber);
void writeJSON(const char* action, RPT_RF_STATE state, const std::string& source, const std::string& dest, float duration, float ber, float minRSSI, float maxRSSI, float aveRSSI);
void writeJSON(const char* action, RPT_NET_STATE state, const std::string& source, const std::string& dest);
void writeJSON(const char* action, RPT_NET_STATE state, const std::string& source, const std::string& dest, float duration);
bool openFile();
bool writeFile(const unsigned char* data);
void closeFile();