X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fdiagnostic%2Fdiagnostic-message.hpp;h=7f407b4eae75d67e0fb54c967d2e3d4094534e59;hb=a67c74b2f5e53e628f07846ca9c8acd42ac94794;hp=8301917f71faba7377ea54b4bf060e19ea584ebb;hpb=065a5bdef8c37f8b0466f63e48443dab31e86431;p=apps%2Flow-level-can-service.git diff --git a/src/diagnostic/diagnostic-message.hpp b/src/diagnostic/diagnostic-message.hpp index 8301917..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.*/ - std::string prefix_ = "diagnostic_messages."; /*!< 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,15 +59,12 @@ class obd2_signal_t { uint32_t get_pid(); const std::string& get_generic_name() const; const std::string get_name() const; - const std::string& get_prefix() const; - - void set_prefix(std::string val); + int get_frequency() const; const DiagnosticRequest build_diagnostic_request(); - bool is_obd2_response(can_message_t can_message); - bool is_obd2_request(DiagnosticRequest *request); - bool is_obd2_signal(const char *name); + bool is_obd2_response(const can_message_t& can_message); + bool is_obd2_request(const DiagnosticRequest *request); - float decode_obd2_response(const DiagnosticResponse* response, float parsedPayload); -}; \ No newline at end of file + static float decode_obd2_response(const DiagnosticResponse* response, float parsedPayload); +};