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.
std::string name_; ///< name_ - Human readable name, to be used when publishing received responses.
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.
std::string name_; ///< name_ - Human readable name, to be used when publishing received responses.
- ///< TODO: If the name is NULL, the published output will use the raw OBD-II response format.
- static std::string prefix_; ///< prefix_ - It has to reflect the JSON object which it comes from. It makes easier sorting
+ static std::string prefix_; ///< prefix_ - It has to reflect the JSON object which it comes from. It makes easier sorting
///< incoming CAN messages.
DiagnosticResponseDecoder decoder_; ///< decoder_ - An optional DiagnosticResponseDecoder to parse the payload of responses
///< to this request. If the decoder is NULL, the output will include the raw payload
///< incoming CAN messages.
DiagnosticResponseDecoder decoder_; ///< decoder_ - An optional DiagnosticResponseDecoder to parse the payload of responses
///< to this request. If the decoder is NULL, the output will include the raw payload
DiagnosticResponseCallback callback_; ///< callback_ - An optional DiagnosticResponseCallback to be notified whenever a
///< 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.
DiagnosticResponseCallback callback_; ///< callback_ - An optional DiagnosticResponseCallback to be notified whenever a
///< 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 recurrin request is made.
+ ///< 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).
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).
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.
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.
const std::string& name, bool wait_for_multiple_responses,
const DiagnosticResponseDecoder decoder,
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();
DiagnosticRequestHandle* get_handle();
uint16_t get_pid() const;
const std::string get_name() const;
DiagnosticRequestHandle* get_handle();
uint16_t get_pid() const;
const std::string get_name() const;
DiagnosticResponseDecoder& get_decoder();
DiagnosticResponseCallback& get_callback();
bool get_recurring() const;
DiagnosticResponseDecoder& get_decoder();
DiagnosticResponseCallback& get_callback();
bool get_recurring() const;