X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=low-can-binding%2Fdiagnostic%2Factive-diagnostic-request.cpp;h=a242147a2c113eaf6dbebe332906420905467caa;hb=e4e00c65f8b686dd93e68a3226020692a62e1d26;hp=1ccb2e74f51780bb8f518cf646e5f79ce9e19788;hpb=c16ccc9d6a1de5406ba0e74f757403ac7553b6a8;p=apps%2Fagl-service-can-low-level.git diff --git a/low-can-binding/diagnostic/active-diagnostic-request.cpp b/low-can-binding/diagnostic/active-diagnostic-request.cpp index 1ccb2e74..a242147a 100644 --- a/low-can-binding/diagnostic/active-diagnostic-request.cpp +++ b/low-can-binding/diagnostic/active-diagnostic-request.cpp @@ -41,13 +41,14 @@ active_diagnostic_request_t& active_diagnostic_request_t::operator=(const active name_ = adr.name_; decoder_ = adr.decoder_; callback_ = adr.callback_; - recurring_ = adr.recurring_; + recurring_ = adr.recurring_; + permanent_ = adr.permanent_; wait_for_multiple_responses_ = adr.wait_for_multiple_responses_; frequency_clock_ = adr.frequency_clock_; timeout_clock_ = adr.timeout_clock_; socket_ = adr.socket_; } - + return *this; } @@ -59,6 +60,7 @@ active_diagnostic_request_t::active_diagnostic_request_t() decoder_{nullptr}, callback_{nullptr}, recurring_{false}, + permanent_{false}, wait_for_multiple_responses_{false}, frequency_clock_{frequency_clock_t()}, timeout_clock_{frequency_clock_t()}, @@ -70,7 +72,8 @@ active_diagnostic_request_t::active_diagnostic_request_t(const std::string& bus, bool wait_for_multiple_responses, const DiagnosticResponseDecoder decoder, const DiagnosticResponseCallback callback, - float frequencyHz) + float frequencyHz, + bool permanent) : bus_{bus}, id_{id}, handle_{nullptr}, @@ -78,6 +81,7 @@ active_diagnostic_request_t::active_diagnostic_request_t(const std::string& bus, decoder_{decoder}, callback_{callback}, recurring_{frequencyHz ? true : false}, + permanent_{permanent}, wait_for_multiple_responses_{wait_for_multiple_responses}, frequency_clock_{frequency_clock_t(frequencyHz)}, timeout_clock_{frequency_clock_t(10)}, @@ -133,6 +137,11 @@ bool active_diagnostic_request_t::get_recurring() const return recurring_; } +bool active_diagnostic_request_t::get_permanent() const +{ + return permanent_; +} + frequency_clock_t& active_diagnostic_request_t::get_frequency_clock() { return frequency_clock_;