Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-du-car committed Nov 10, 2023
1 parent d7bdd64 commit 2754ad3
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,13 @@ namespace RSUHealthMonitor
else if (success && responseVal.type == snmp_response_obj::response_type::STRING)
{
string response_str(responseVal.val_string.begin(), responseVal.val_string.end());
PLOG(logDEBUG) << "String value in response: " << response_str;
// Proess GPS nmea string
auto gps = _rsuWorker->ParseRSUGPS(response_str);
rsuStatuJson["rsuGpsOutputStringLatitude"] = gps.begin()->first;
rsuStatuJson["rsuGpsOutputStringLongitude"] = gps.begin()->second;
if (boost::iequals(config.field, "rsuGpsOutputString"))
{
auto gps = _rsuWorker->ParseRSUGPS(response_str);
rsuStatuJson["rsuGpsOutputStringLatitude"] = gps.begin()->first;
rsuStatuJson["rsuGpsOutputStringLongitude"] = gps.begin()->second;
}
rsuStatuJson[config.field] = response_str;
}
}
Expand Down

0 comments on commit 2754ad3

Please sign in to comment.