summaryrefslogtreecommitdiffstats
path: root/src/diagnostic/diagnostic-message.hpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-13 15:03:00 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-16 17:15:55 +0100
commit542518e3f4390fcb0d8fb17bcbb14c7eb4335a61 (patch)
tree340eda25b52c5f6e4b47dae3aace322c57359e55 /src/diagnostic/diagnostic-message.hpp
parentf0d7a6523955ee94a32ec4b62e2a207b23f62316 (diff)
Move member from obd2_signals_t class to
active_diagnostic_request_t (adr)class. It's more logical to have them here as call about incoming diagnostic CAN messages are made against adr class not obd2_signal_t that it's a subset of diagnostic messages. It's made to handle obd2 requests as well as normal UDS diagnostic request for constructor proprietary diagnostic signals. Change-Id: I96c714640d6ecfa25dfc9942974057c1797eb0e1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/diagnostic/diagnostic-message.hpp')
-rw-r--r--src/diagnostic/diagnostic-message.hpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/diagnostic/diagnostic-message.hpp b/src/diagnostic/diagnostic-message.hpp
index ec4521f..7f407b4 100644
--- a/src/diagnostic/diagnostic-message.hpp
+++ b/src/diagnostic/diagnostic-message.hpp
@@ -46,8 +46,6 @@ class obd2_signal_t {
private:
uint8_t pid_; /*!< pid - The 1 byte PID.*/
std::string generic_name_; /*!< generic_name_ - A human readable name to use for this PID when published.*/
- static std::string prefix_; /*!< prefix_ - generic_name_ will be prefixed with it. It has to reflect the used protocol.
- * which make easier to sort message when the come in.*/
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.*/
@@ -61,16 +59,12 @@ class obd2_signal_t {
uint32_t get_pid();
const std::string& get_generic_name() const;
const std::string get_name() const;
- static const std::string& get_prefix();
int get_frequency() const;
- static void set_prefix(const std::string& val);
-
const DiagnosticRequest build_diagnostic_request();
- bool is_obd2_response(can_message_t can_message);
- bool is_obd2_request(DiagnosticRequest *request);
- static bool is_obd2_signal(const std::string& name);
+ bool is_obd2_response(const can_message_t& can_message);
+ bool is_obd2_request(const DiagnosticRequest *request);
static float decode_obd2_response(const DiagnosticResponse* response, float parsedPayload);
-}; \ No newline at end of file
+};