X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=CAN-binder%2Flow-can-binding%2Fdiagnostic%2Factive-diagnostic-request.hpp;h=c295bed3721a9b9cc6695f03670a169b966117f1;hb=1a8c681528f9f1ff45d111b0c8cdfed7a697bae6;hp=247eeb17d2b62bace261ed0344a688941111d01d;hpb=0242c26c2f5dc96387bca7efb118364c800f4ee7;p=apps%2Fagl-service-can-low-level.git diff --git a/CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.hpp b/CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.hpp index 247eeb17..c295bed3 100644 --- a/CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.hpp +++ b/CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.hpp @@ -20,10 +20,10 @@ #include #include +#include "../utils/socketcan-bcm.hpp" #include "uds/uds.h" #include "uds/uds_types.h" #include "../utils/timer.hpp" -#include "../can/can-bus-dev.hpp" class active_diagnostic_request_t; class diagnostic_manager_t; @@ -80,11 +80,11 @@ private: bool wait_for_multiple_responses_; ///< wait_for_multiple_responses_ - False by default, when any response is received for a request ///< it will be removed from the active list. If true, the request will remain active until the timeout ///< clock expires, to allow it to receive multiple response (e.g. to a functional broadcast request). - bool in_flight_; ///< in_flight_ - True if the request has been sent and we are waiting for a response. frequency_clock_t frequency_clock_; ///< frequency_clock_ - A frequency_clock_t object to control the send rate for a ///< recurring request. If the request is not reecurring, this attribute is not used. frequency_clock_t timeout_clock_; ///< timeout_clock_ - A frequency_clock_t object to monitor how long it's been since ///< this request was sent. + utils::socketcan_bcm_t socket_; ///< socket_ - A BCM socket setup to send cyclic message to CAN ID 7DF. public: bool operator==(const active_diagnostic_request_t& b); active_diagnostic_request_t& operator=(const active_diagnostic_request_t& adr); @@ -97,7 +97,6 @@ public: const DiagnosticResponseCallback callback, float frequencyHz); uint32_t get_id() const; - const std::shared_ptr get_can_bus_dev() const; DiagnosticRequestHandle* get_handle(); uint16_t get_pid() const; const std::string get_name() const; @@ -105,18 +104,13 @@ public: DiagnosticResponseDecoder& get_decoder(); DiagnosticResponseCallback& get_callback(); bool get_recurring() const; - bool get_in_flight() const; frequency_clock_t& get_frequency_clock(); frequency_clock_t& get_timeout_clock(); + utils::socketcan_bcm_t& get_socket(); void set_handle(DiagnosticShims& shims, DiagnosticRequest* request); - void set_in_flight(bool val); static bool is_diagnostic_signal(const std::string& name); - bool should_send(); - - bool timed_out(); bool response_received() const; - bool request_completed(); };