From 2049aca0927b55f2a256fd60ff686616b73eecb7 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Wed, 8 Mar 2017 02:41:56 +0100 Subject: Beginning of work of get central configuration object that will be used by the binding to access generated elements. It will hold generated structure/objects and make a resume to the binding configuration. Idea is to have an object that can be inherited in the generated code to extend its functionnalities or change some of its behoviors. Change-Id: If2ce5cbe2eb98a74a8e3f13000ee02855674216f Signed-off-by: Romain Forlot --- src/diagnostic/diagnostic-message.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/diagnostic/diagnostic-message.hpp') diff --git a/src/diagnostic/diagnostic-message.hpp b/src/diagnostic/diagnostic-message.hpp index 5adbde59..ac6ca18e 100644 --- a/src/diagnostic/diagnostic-message.hpp +++ b/src/diagnostic/diagnostic-message.hpp @@ -68,7 +68,7 @@ typedef struct _Obd2Pid { class obd2_signals_t { private: uint8_t pid_; /*!< pid - The 1 byte PID.*/ - const char* generic_name_; /*!< generic_name_ - A human readable name to use for this PID when published.*/ + const std::string generic_name_; /*!< generic_name_ - A human readable name to use for this PID when published.*/ const int min_; /*!< min_ - Minimum value that can take this pid */ const 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.*/ @@ -76,7 +76,7 @@ class obd2_signals_t { bool supported_; /*!< supported_ - boolean indicating whether this pid is supported by the vehicle or not.*/ public: - const char* generic_name = generic_name_; + const char* generic_name = generic_name_.c_str(); obd2_signals_t(uint8_t pid, const char* generic_name, const int min_, const int max_, enum UNIT unit, int frequency, bool supported); uint32_t get_pid(); -- cgit 1.2.3-korg