#pragma once
#include <vector>
+#include <string>
#include "uds/uds.h"
-#include "../can/can-bus.hpp"
#include "../can/can-message.hpp"
-
-#include "../low-can-binding.hpp"
+#include "active-diagnostic-request.hpp"
enum UNIT {
POURCENT,
int min_; /*!< min_ - Minimum value that can take this pid */
int max_; /*!< max_ - Maximum value that can take this pid */
enum UNIT unit_; /*!< unit_ : Which unit system is used by that pid. See enum UNIT above.*/
- int frequency_; /*!< frequency - The frequency to request this PID if supported by the vehicle when automatic, recurring OBD-II requests are enabled.*/
+ float frequency_; /*!< frequency - The frequency to request this PID if supported by the vehicle when automatic, recurring OBD-II requests are enabled.*/
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
* instead of a parsed value.*/
DiagnosticResponseCallback callback_; /*!< callback_ - An optional DiagnosticResponseCallback to be notified whenever a
* response is received for this request.*/
-
+
bool supported_; /*!< supported_ - boolean indicating whether this pid is supported by the vehicle or not.*/
public:
uint32_t get_pid();
const std::string& get_generic_name() const;
const std::string get_name() const;
- int get_frequency() const;
+ float get_frequency() const;
DiagnosticResponseDecoder get_decoder() const;
DiagnosticResponseCallback get_callback() const;
+ bool get_supported() const;
+
+ void set_supported(bool value);
const DiagnosticRequest build_diagnostic_request();
bool is_obd2_response(const can_message_t& can_message);
bool is_obd2_request(const DiagnosticRequest *request);
-
};