summaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-06-02 19:45:01 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-06-02 19:45:01 +0200
commit4ab2164774bdb9a29b2f180a9013c26c0155628d (patch)
treeeb2e92eb8270c6556f58c1fa21d0159a76d4f8b9 /CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp
parent7929a62962cff8bbb456bd0c3761dc68afc3d766 (diff)
Get diag manager's socket into subscription obj
Subscription index map is the socket ID which implies the following: - All diagnostic messages subscriptions are stored into a vector holding diagnostic_message and there is 1 socket for all like the diag manager did. - Reworked workflow to open a BCM socket and adding an RX filter more flexible. - Separated methods to handle on_no_clients event. - Cleaning diagnostic manager code to remove all unneeded stuff now. - Embed diagnostic response in VehicleMessage decoded message to be able transmits the PID in event push thread. This is needed by to correctly handle case when there is no clients subscribed to an AFB event. Else we can't find the diagnostic message to remove from low_can_subscription vector. Change-Id: Iab13fd556cda3c69827bcd67f3a23a03cb6a2cf2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp')
-rw-r--r--CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp b/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp
index 0d5db69..d52ffe9 100644
--- a/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp
+++ b/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.hpp
@@ -51,12 +51,9 @@ private:
std::vector<active_diagnostic_request_t*> non_recurring_requests_; /*!< nonrecurringRequests - A list of active one-time diagnostic requests. When a
* response is received for a non-recurring request or it times out, it is removed*/
bool initialized_; /*!< * initialized - True if the DiagnosticsManager has been initialized with shims. It will interface with the uds-c lib*/
- utils::socketcan_bcm_t socket_; ///< socket_ - a BCM socket with 8 RX_SETUP jobs for the 8 CAN ID on which ECU could respond.
- struct sd_event_source* event_source_;
void init_diagnostic_shims();
void reset();
- int create_rx_filter(uint32_t can_id, float frequency);
static bool shims_send(const uint32_t arbitration_id, const uint8_t* data, const uint8_t size);
static void shims_logger(const char* m, ...);
@@ -66,12 +63,10 @@ public:
bool initialize();
- utils::socketcan_bcm_t& get_socket();
const std::string get_bus_name() const;
const std::string get_bus_device_name() const;
active_diagnostic_request_t* get_last_recurring_requests() const;
DiagnosticShims& get_shims();
- bool socket_close();
void find_and_erase(active_diagnostic_request_t* entry, std::vector<active_diagnostic_request_t*>& requests_list);
void cancel_request(active_diagnostic_request_t* entry);