diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-13 14:58:22 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-16 17:15:55 +0100 |
commit | f0d7a6523955ee94a32ec4b62e2a207b23f62316 (patch) | |
tree | 1856801bfd7f2718689888ccc488643dc99e436a /src/utils/openxc-utils.hpp | |
parent | b606db2b74d5c92d33a126071062c9eb2a548beb (diff) |
Get decoding diagnostic request from decoding thread of can_bus_t
Decoding divided in 2 subfunctions dedicated to decode either
pure CAN messages or diagnostic (obd2) message. About now,
a diagnostic request has a name then it will be pushed
on the event_queue as a SimpleMessage. Without name full
details of diagnostic response will be pushed as diagnostic
response. This behavior follows the one from OpenXC.
Change-Id: I255f3f6487fa9511ea47c74606014995a7b0f720
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/utils/openxc-utils.hpp')
-rw-r--r-- | src/utils/openxc-utils.hpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/utils/openxc-utils.hpp b/src/utils/openxc-utils.hpp index 3a4883e0..f837ab1f 100644 --- a/src/utils/openxc-utils.hpp +++ b/src/utils/openxc-utils.hpp @@ -23,19 +23,18 @@ #include <sys/timeb.h> #include "openxc.pb.h" +#include "../obd2/active-diagnostic-request.hpp" /** - * @fn openxc_VehicleMessage build_VehicleMessage_with_SimpleMessage(openxc_DynamicField_Type type, const openxc_SimpleMessage& message); - * * @brief Build a specific VehicleMessage containing a SimpleMessage. * - * @param[in] type - The type of message to build * @param[in] message - simple message to include into openxc_VehicleMessage * * @return a vehicle message including simple message that will be convert into * a JSON object before being pushed to the subscribers */ -openxc_VehicleMessage build_VehicleMessage_with_SimpleMessage(openxc_DynamicField_Type type, const openxc_SimpleMessage& message); +openxc_VehicleMessage build_VehicleMessage(active_diagnostic_request_t* request, const DiagnosticResponse& response, float parsed_value); +openxc_VehicleMessage build_VehicleMessage(const openxc_SimpleMessage& message); /** * @fn openxc_SimpleMessage build_SimpleMessage(const std::string& name, const openxc_DynamicField& value); |