Add network debugging

This commit is contained in:
Noisyfox 2025-05-12 21:51:34 +08:00
parent 3f60a23718
commit 2ce2facb0e

View file

@ -24,6 +24,8 @@
#define MINUTE_30 1800000 //ms
#define TIME_OUT 5000 //ms
#define ORCA_NETWORK_DEBUG
namespace pt = boost::property_tree;
float string_to_float(const std::string& str_value) {
@ -2773,6 +2775,10 @@ static ENUM enum_index_of(char const *key, char const **enum_names, int enum_cou
int MachineObject::parse_json(std::string payload, bool key_field_only)
{
#ifdef ORCA_NETWORK_DEBUG
BOOST_LOG_TRIVIAL(info) << "parse_json: payload = " << payload;
#endif
parse_msg_count++;
std::chrono::system_clock::time_point clock_start = std::chrono::system_clock::now();
this->set_online_state(true);