X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=low-can-binding%2Fdiagnostic%2Factive-diagnostic-request.cpp;h=80d2e696b790bfcbc290bb148190aaa63a121591;hb=b6bc89e63ee24c4e5ec1559d7390da90201ff9cd;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..80d2e696 100644 --- a/low-can-binding/diagnostic/active-diagnostic-request.cpp +++ b/low-can-binding/diagnostic/active-diagnostic-request.cpp @@ -15,8 +15,9 @@ * limitations under the License. */ -#include + #include +#include #include "active-diagnostic-request.hpp" @@ -26,47 +27,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 +122,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. ///