diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-09-13 11:14:01 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-09-13 11:15:48 +0200 |
commit | e08e9bc89e78b3937f84a8dbf47968159521a7ea (patch) | |
tree | 6bb98523c173ce7c75c1e41bbcb0ed2caed90ddc /low-can-binding/can/can-bus.cpp | |
parent | 05d31a77fb2742d4aedd26a13454b21b5df83b20 (diff) |
Add timestamp val to returned json object on event
Change-Id: Ibfb514eb27c0378dba7e302755e5f6f95b0ca242
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'low-can-binding/can/can-bus.cpp')
-rw-r--r-- | low-can-binding/can/can-bus.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/low-can-binding/can/can-bus.cpp b/low-can-binding/can/can-bus.cpp index e9f9fc7e..be40aab5 100644 --- a/low-can-binding/can/can-bus.cpp +++ b/low-can-binding/can/can-bus.cpp @@ -165,7 +165,6 @@ void can_bus_t::can_decode_message() /// which are events that has to be pushed. void can_bus_t::can_event_push() { - openxc_SimpleMessage s_message; json_object* jo; utils::signals_manager_t& sm = utils::signals_manager_t::instance(); @@ -180,11 +179,10 @@ void can_bus_t::can_event_push() { std::lock_guard<std::mutex> subscribed_signals_lock(sm.get_subscribed_signals_mutex()); std::map<int, std::shared_ptr<low_can_subscription_t> >& s = sm.get_subscribed_signals(); - s_message = get_simple_message(v_message.second); if(s.find(v_message.first) != s.end() && afb_event_is_valid(s[v_message.first]->get_event())) { jo = json_object_new_object(); - jsonify_simple(s_message, jo); + jsonify_vehicle(v_message.second, jo); if(afb_event_push(s[v_message.first]->get_event(), jo) == 0) { if(v_message.second.has_diagnostic_response) |