|
|
@ -53,7 +53,7 @@ namespace serial_bridge_utils
|
|
|
|
string string_from_nettype(network_type nettype);
|
|
|
|
string string_from_nettype(network_type nettype);
|
|
|
|
//
|
|
|
|
//
|
|
|
|
struct RetVals_Transforms
|
|
|
|
struct RetVals_Transforms
|
|
|
|
{
|
|
|
|
{ // TODO: can these be generalized with generics?
|
|
|
|
static string str_from(uint64_t v)
|
|
|
|
static string str_from(uint64_t v)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
std::ostringstream o;
|
|
|
|
std::ostringstream o;
|
|
|
@ -66,6 +66,12 @@ namespace serial_bridge_utils
|
|
|
|
o << v;
|
|
|
|
o << v;
|
|
|
|
return o.str();
|
|
|
|
return o.str();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static string str_from(bool v)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
std::ostringstream o;
|
|
|
|
|
|
|
|
o << v;
|
|
|
|
|
|
|
|
return o.str();
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
string ret_json_from_root(const boost::property_tree::ptree &root);
|
|
|
|
string ret_json_from_root(const boost::property_tree::ptree &root);
|
|
|
|
string error_ret_json_from_message(const string &err_msg);
|
|
|
|
string error_ret_json_from_message(const string &err_msg);
|
|
|
|