X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=low-can-binding%2Fdiagnostic%2Factive-diagnostic-request.cpp;h=c5af449b7110a7d16c7f7af3b3fbb551a624aaac;hb=e190b7b3069d86fce25831c366bb0cd3fa615289;hp=a242147a2c113eaf6dbebe332906420905467caa;hpb=e4e00c65f8b686dd93e68a3226020692a62e1d26;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 a242147a..c5af449b 100644 --- a/low-can-binding/diagnostic/active-diagnostic-request.cpp +++ b/low-can-binding/diagnostic/active-diagnostic-request.cpp @@ -26,47 +26,6 @@ std::string active_diagnostic_request_t::prefix_ = "diagnostic_messages"; -bool active_diagnostic_request_t::operator==(const active_diagnostic_request_t& b) -{ - return (bus_ == b.bus_ && id_ == b.id_ && handle_ == b.handle_); -} - -active_diagnostic_request_t& active_diagnostic_request_t::operator=(const active_diagnostic_request_t& adr) -{ - if (this != &adr) - { - bus_ = adr.bus_; - id_ = adr.id_; - handle_ = adr.handle_; - name_ = adr.name_; - decoder_ = adr.decoder_; - callback_ = adr.callback_; - 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; -} - -active_diagnostic_request_t::active_diagnostic_request_t() - : bus_{nullptr}, - id_{0}, - handle_{nullptr}, - name_{""}, - decoder_{nullptr}, - callback_{nullptr}, - recurring_{false}, - permanent_{false}, - wait_for_multiple_responses_{false}, - frequency_clock_{frequency_clock_t()}, - timeout_clock_{frequency_clock_t()}, - socket_{} -{} - active_diagnostic_request_t::active_diagnostic_request_t(const std::string& bus, uint32_t id, const std::string& name, bool wait_for_multiple_responses, @@ -162,22 +121,6 @@ void active_diagnostic_request_t::set_handle(DiagnosticShims& shims, DiagnosticR handle_ = new DiagnosticRequestHandle(generate_diagnostic_request(&shims, request, nullptr)); } -/// -/// @brief Check if requested signal name is a diagnostic message. If the name -/// begin with the diagnostic message prefix then true else false. -/// -/// @param[in] name - A signal name. -/// -/// @return true if name began with the diagnostic message prefix else false. -/// -bool active_diagnostic_request_t::is_diagnostic_signal(const std::string& name) -{ - const std::string p = active_diagnostic_request_t::prefix_ + "*"; - if(::fnmatch(p.c_str(), name.c_str(), FNM_CASEFOLD) == 0) - return true; - return false; -} - /// @brief Returns true if a sufficient response has been received for a /// diagnostic request. ///