summaryrefslogtreecommitdiffstats
path: root/src/diagnostic/active-diagnostic-request.hpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-10 02:06:57 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-16 17:10:40 +0100
commitf06b6358accc3ba106c535ed0cbc70a6da60dac5 (patch)
tree4f7c09e8f0b139fc6fc52ba5849a547bf974f5ea /src/diagnostic/active-diagnostic-request.hpp
parentdd915dd5b0088034ce1fb57e187f114c1e1d769d (diff)
Adding requests to diagnostic manager implemented.
Needed overload of operator and constructor set for active_diagnostic_message_t class. Without we can't make the basic operation needed by the manager. Get rid of original raw pointer on "entry" which avoid some tests. It miss the acceptance filters implementations for now. Change-Id: I1ca61ff843c13255af6d9a60ce72a8b8bc9d1c18 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/diagnostic/active-diagnostic-request.hpp')
-rw-r--r--src/diagnostic/active-diagnostic-request.hpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/diagnostic/active-diagnostic-request.hpp b/src/diagnostic/active-diagnostic-request.hpp
index f1128c5..1e996c0 100644
--- a/src/diagnostic/active-diagnostic-request.hpp
+++ b/src/diagnostic/active-diagnostic-request.hpp
@@ -79,9 +79,25 @@ private:
frequency_clock_t timeout_clock_; /*!< timeout_clock_ - A frequency_clock_t object to monitor how long it's been since
* this request was sent.*/
public:
+ bool& operator==(const active_diagnostic_request_t& adr) const;
+ active_diagnostic_request_t& operator=(const active_diagnostic_request_t& adr);
active_diagnostic_request_t();
-
- void updateDiagnosticRequestEntry(diagnostic_manager_t* manager, can_bus_dev_t* bus, DiagnosticRequest* request,
- const std::string name, bool wait_for_multiple_responses, const DiagnosticResponseDecoder decoder,
+ active_diagnostic_request_t(active_diagnostic_request_t&&) = default;
+ active_diagnostic_request_t(const active_diagnostic_request_t&) = default;
+ active_diagnostic_request_t(can_bus_dev_t* bus, DiagnosticRequest* request,
+ const std::string& name, bool waitForMultipleResponses,
+ const DiagnosticResponseDecoder decoder,
const DiagnosticResponseCallback callback, float frequencyHz);
+
+ can_bus_dev_t* get_can_bus_dev();
+ DiagnosticRequestHandle& get_handle();
+ bool get_recurring() const;
+ bool get_in_flight() const;
+
+ void set_handle(DiagnosticShims& shims, DiagnosticRequest* request);
+ void set_in_flight(bool val);
+
+ bool timed_out() const;
+ bool response_received() const;
+ bool request_completed() const;
};