mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-02-15 03:54:14 +01:00
Simplify the POCSAG JSON interface.
This commit is contained in:
parent
33a3aa4852
commit
d779b0d1e2
|
|
@ -588,8 +588,11 @@ void CPOCSAGControl::decodeROT1(const std::string& in, unsigned int start, std::
|
|||
out += in.at(i) - 1U;
|
||||
}
|
||||
|
||||
void CPOCSAGControl::writeJSON(const std::string& source, unsigned int ric, const std::string& functional)
|
||||
void CPOCSAGControl::writeJSON(const char* source, unsigned int ric, const char* functional)
|
||||
{
|
||||
assert(source != NULL);
|
||||
assert(functional != NULL);
|
||||
|
||||
nlohmann::json json;
|
||||
|
||||
json["timestamp"] = CUtils::createTimestamp();
|
||||
|
|
@ -600,8 +603,11 @@ void CPOCSAGControl::writeJSON(const std::string& source, unsigned int ric, cons
|
|||
WriteJSON("POCSAG", json);
|
||||
}
|
||||
|
||||
void CPOCSAGControl::writeJSON(const std::string& source, unsigned int ric, const std::string& functional, const std::string& message)
|
||||
void CPOCSAGControl::writeJSON(const char* source, unsigned int ric, const char* functional, const std::string& message)
|
||||
{
|
||||
assert(source != NULL);
|
||||
assert(functional != NULL);
|
||||
|
||||
nlohmann::json json;
|
||||
|
||||
json["timestamp"] = CUtils::createTimestamp();
|
||||
|
|
|
|||
|
|
@ -88,8 +88,8 @@ private:
|
|||
|
||||
void decodeROT1(const std::string& in, unsigned int start, std::string& out) const;
|
||||
|
||||
void writeJSON(const std::string& source, unsigned int ric, const std::string& functional);
|
||||
void writeJSON(const std::string& source, unsigned int ric, const std::string& functional, const std::string& message);
|
||||
void writeJSON(const char* source, unsigned int ric, const char* functional);
|
||||
void writeJSON(const char* source, unsigned int ric, const char* functional, const std::string& message);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue