aboutsummaryrefslogtreecommitdiffstats
path: root/src/can
diff options
context:
space:
mode:
Diffstat (limited to 'src/can')
-rw-r--r--src/can/can-signals.cpp9
-rw-r--r--src/can/can-signals.hpp5
2 files changed, 10 insertions, 4 deletions
diff --git a/src/can/can-signals.cpp b/src/can/can-signals.cpp
index 2d2e7ea..00b6ee0 100644
--- a/src/can/can-signals.cpp
+++ b/src/can/can-signals.cpp
@@ -30,16 +30,21 @@ can_message_definition_t& can_signal_t::get_message()
return message_;
}
-std::string& can_signal_t::get_generic_name()
+const std::string& can_signal_t::get_generic_name() const
{
return generic_name_;
}
-std::string can_signal_t::get_name()
+const std::string can_signal_t::get_name() const
{
return prefix_ + "." + generic_name_;
}
+const std::string& can_signal_t::get_prefix() const
+{
+ return prefix_;
+}
+
uint8_t can_signal_t::get_bit_position() const
{
return bit_position_;
diff --git a/src/can/can-signals.hpp b/src/can/can-signals.hpp
index 10403da..c1d07ee 100644
--- a/src/can/can-signals.hpp
+++ b/src/can/can-signals.hpp
@@ -110,8 +110,9 @@ private:
public:
can_message_definition_t& get_message();
- std::string& get_generic_name();
- std::string get_name();
+ const std::string& get_generic_name() const;
+ const std::string get_name() const;
+ const std::string& get_prefix() const;
uint8_t get_bit_position() const;
uint8_t get_bit_size() const;
float get_factor() const;