summaryrefslogtreecommitdiffstats
path: root/src/diagnostic/active-diagnostic-request.hpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-12 19:38:49 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-16 17:10:41 +0100
commit24057b7fad6d4d1f1f264995d0f5865acf466004 (patch)
treeced9c92076a3f6c1e87f9aeb0312bfa2440fd3a1 /src/diagnostic/active-diagnostic-request.hpp
parent62eb024d989037ae7f2ba86de8b68c826cb61ec9 (diff)
Make diagnostic manager initialization processus.
It is initiliazed with by default the first CAN bus device in the CAN bus device list from CAN bus manager. The object is instancied at configuration_t object first invokation and after all CAN buses has been initialized then the diag manager is initialized too. Change-Id: I4894f2c62f575676c34efec3608b97de8c5326e1 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.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/diagnostic/active-diagnostic-request.hpp b/src/diagnostic/active-diagnostic-request.hpp
index a9abc13d..88d40084 100644
--- a/src/diagnostic/active-diagnostic-request.hpp
+++ b/src/diagnostic/active-diagnostic-request.hpp
@@ -56,7 +56,7 @@ typedef void (*DiagnosticResponseCallback)(const active_diagnostic_request_t* re
*/
class active_diagnostic_request_t {
private:
- can_bus_dev_t* bus_; /*!< bus_ - The CAN bus this request should be made on, or is currently in flight-on*/
+ std::shared_ptr<can_bus_dev_t> bus_; /*!< bus_ - The CAN bus this request should be made on, or is currently in flight-on*/
uint32_t id_; /*!< id_ - The arbitration ID (aka message ID) for the request.*/
DiagnosticRequestHandle* handle_; /*!< handle_ - A handle for the request to keep track of it between
* sending the frames of the request and receiving all frames of the response.*/
@@ -83,12 +83,12 @@ public:
active_diagnostic_request_t();
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,
+ active_diagnostic_request_t(std::shared_ptr<can_bus_dev_t> bus, DiagnosticRequest* request,
const std::string& name, bool wait_for_multiple_responses,
const DiagnosticResponseDecoder decoder,
const DiagnosticResponseCallback callback, float frequencyHz);
- can_bus_dev_t* get_can_bus_dev();
+ std::shared_ptr<can_bus_dev_t> get_can_bus_dev();
DiagnosticRequestHandle* get_handle();
bool get_recurring() const;
bool get_in_flight() const;