diff options
Diffstat (limited to 'CAN-binder/low-can-binding/diagnostic')
-rw-r--r-- | CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.cpp | 35 | ||||
-rw-r--r-- | CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp | 1 |
2 files changed, 27 insertions, 9 deletions
diff --git a/CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.cpp b/CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.cpp index 932edae2..2a939ed8 100644 --- a/CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.cpp +++ b/CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.cpp @@ -52,17 +52,36 @@ active_diagnostic_request_t& active_diagnostic_request_t::operator=(const active } active_diagnostic_request_t::active_diagnostic_request_t() - : bus_{nullptr}, id_{0}, handle_{nullptr}, name_{""}, - decoder_{nullptr}, callback_{nullptr}, recurring_{false}, wait_for_multiple_responses_{false}, - in_flight_{false}, frequency_clock_{frequency_clock_t()}, timeout_clock_{frequency_clock_t()} + : bus_{nullptr}, + id_{0}, + handle_{nullptr}, + name_{""}, + decoder_{nullptr}, + callback_{nullptr}, + recurring_{false}, + wait_for_multiple_responses_{false}, + in_flight_{false}, + frequency_clock_{frequency_clock_t()}, + timeout_clock_{frequency_clock_t()} {} active_diagnostic_request_t::active_diagnostic_request_t(const std::string& bus, DiagnosticRequest* request, - const std::string& name, bool wait_for_multiple_responses, const DiagnosticResponseDecoder decoder, - const DiagnosticResponseCallback callback, float frequencyHz) - : bus_{bus}, id_{request->arbitration_id}, handle_{nullptr}, name_{name}, - decoder_{decoder}, callback_{callback}, recurring_{frequencyHz ? true : false}, wait_for_multiple_responses_{wait_for_multiple_responses}, - in_flight_{false}, frequency_clock_{frequency_clock_t(frequencyHz)}, timeout_clock_{frequency_clock_t(10)} + const std::string& name, + bool wait_for_multiple_responses, + const DiagnosticResponseDecoder decoder, + const DiagnosticResponseCallback callback, + float frequencyHz) + : bus_{bus}, + id_{request->arbitration_id}, + handle_{nullptr}, + name_{name}, + decoder_{decoder}, + callback_{callback}, + recurring_{frequencyHz ? true : false}, + wait_for_multiple_responses_{wait_for_multiple_responses}, + in_flight_{false}, + frequency_clock_{frequency_clock_t(frequencyHz)}, + timeout_clock_{frequency_clock_t(10)} {} uint32_t active_diagnostic_request_t::get_id() const diff --git a/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp b/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp index 3edb2b12..a160c9c8 100644 --- a/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp +++ b/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp @@ -95,5 +95,4 @@ public: openxc_VehicleMessage relay_diagnostic_handle(active_diagnostic_request_t* entry, const can_message_t& cm); openxc_VehicleMessage find_and_decode_adr(const can_message_t& cm); bool is_diagnostic_response(const can_message_t& cm); - }; |