aboutsummaryrefslogtreecommitdiffstats
path: root/low-can-binding/diagnostic/active-diagnostic-request.hpp
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2018-04-09 09:25:47 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2018-04-17 11:42:37 +0200
commite4e00c65f8b686dd93e68a3226020692a62e1d26 (patch)
tree6e1e1f14cc147f3eb29cac8aceaf91503cca27bf /low-can-binding/diagnostic/active-diagnostic-request.hpp
parent29de76e9beac2a8e7ffcd1ccba07a927df1f2bcc (diff)
Add possibility to subscribe to a recurring request permanently
Add possibility to subscribe to a recurring request that won't be deleted when no subscriber is detected. For now, this functionnality is implemented for internal use only. Bug-AGL: SPEC-1347 Change-Id: I48f6f647677596ba7920c4348d5406ea7bf1081b Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to 'low-can-binding/diagnostic/active-diagnostic-request.hpp')
-rw-r--r--low-can-binding/diagnostic/active-diagnostic-request.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/low-can-binding/diagnostic/active-diagnostic-request.hpp b/low-can-binding/diagnostic/active-diagnostic-request.hpp
index 892feb50..8e5333b5 100644
--- a/low-can-binding/diagnostic/active-diagnostic-request.hpp
+++ b/low-can-binding/diagnostic/active-diagnostic-request.hpp
@@ -76,6 +76,7 @@ private:
///< response is received for this request.
bool recurring_; ///< bool recurring_ - If true, this is a recurring request and it will remain as active until explicitly cancelled.
///< The frequencyClock attribute controls how often a recurring request is made.
+ bool permanent_; ///< bool permanent_ - If true, this a permanent recurring request and will remain as active indefinitely (can't be cancelled).
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).
@@ -93,7 +94,7 @@ public:
active_diagnostic_request_t(const std::string& bus, uint32_t id,
const std::string& name, bool wait_for_multiple_responses,
const DiagnosticResponseDecoder decoder,
- const DiagnosticResponseCallback callback, float frequencyHz);
+ const DiagnosticResponseCallback callback, float frequencyHz, bool permanent);
~active_diagnostic_request_t();
uint32_t get_id() const;
@@ -104,6 +105,7 @@ public:
DiagnosticResponseDecoder& get_decoder();
DiagnosticResponseCallback& get_callback();
bool get_recurring() const;
+ bool get_permanent() const;
frequency_clock_t& get_frequency_clock();
frequency_clock_t& get_timeout_clock();
utils::socketcan_bcm_t& get_socket();