move helper method to SymbolString

This commit is contained in:
John
2021-11-05 19:45:04 +01:00
parent 1c5ede04e9
commit 7a567e69fb
3 changed files with 30 additions and 16 deletions
+9
View File
@@ -67,6 +67,7 @@ namespace ebusd {
using std::string;
using std::vector;
using std::ostringstream;
/** the base type for symbols sent to/from the eBUS. */
typedef unsigned char symbol_t;
@@ -158,6 +159,14 @@ class SymbolString {
*/
const string getStr(size_t skipFirstSymbols = 0) const;
/**
* Dump the data in JSON format to the output.
* @param withSeparator true to prepend the field separator.
* @param output the @a ostringstream to format the messages to.
* @return true if something was written to the output.
*/
bool dumpJson(bool withSeparator, ostringstream* output) const;
/**
* Return a reference to the symbol at the specified index.
* @param index the index of the symbol to return.