summaryrefslogtreecommitdiffstats
path: root/src/diagnostic/diagnostic-message.hpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-08 02:41:56 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-16 17:09:03 +0100
commit2049aca0927b55f2a256fd60ff686616b73eecb7 (patch)
treeeb4e195c796aa5cc69bdedd772a659b4f83fe9d9 /src/diagnostic/diagnostic-message.hpp
parent64d3ead0ce87091a3489dd9796a9f77f241c468b (diff)
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 <romain.forlot@iot.bzh>
Diffstat (limited to 'src/diagnostic/diagnostic-message.hpp')
-rw-r--r--src/diagnostic/diagnostic-message.hpp4
1 files changed, 2 insertions, 2 deletions
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();