Change method name to signify that it is an aggregate.
authorRomain Forlot <romain.forlot@iot.bzh>
Thu, 18 May 2017 22:36:30 +0000 (00:36 +0200)
committerRomain Forlot <romain.forlot@iot.bzh>
Fri, 19 May 2017 12:48:23 +0000 (14:48 +0200)
As can_message_definitions got the exact same name but the one from can_message_set
is an aggregate of all can_message_definition. So it is clearer using a different
name.

Change-Id: Ieb9e4d3291f3dc460eb352d8b8fe5a7cf479e687
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
CAN-binder/low-can-binding/binding/configuration.cpp
CAN-binder/low-can-binding/binding/configuration.hpp
CAN-binder/low-can-binding/can/can-bus.cpp
CAN-binder/low-can-binding/utils/signals.cpp

index cc2b8f2..4898bdc 100644 (file)
@@ -47,9 +47,9 @@ const std::vector<std::shared_ptr<can_message_set_t> >& configuration_t::get_can
        return can_message_set_;
 }
 
-std::vector<std::shared_ptr<can_signal_t> > configuration_t::get_can_signals()
+std::vector<std::shared_ptr<can_signal_t> > configuration_t::get_all_can_signals()
 {
-       return can_message_set_[active_message_set_]->get_can_signals();
+       return can_message_set_[active_message_set_]->get_all_can_signals();
 }
 
 std::vector<std::shared_ptr<diagnostic_message_t> > configuration_t::get_diagnostic_messages()
index a3bb189..fd66923 100644 (file)
@@ -67,7 +67,7 @@ class configuration_t
 
                const std::vector<std::shared_ptr<can_message_set_t> >& get_can_message_set();
 
-               std::vector<std::shared_ptr<can_signal_t> > get_can_signals();
+               std::vector<std::shared_ptr<can_signal_t> > get_all_can_signals();
 
                std::vector<std::shared_ptr<diagnostic_message_t> > get_diagnostic_messages();
 
index bd9cde7..c296805 100644 (file)
@@ -77,7 +77,7 @@ int can_bus_t::process_can_signals(const can_message_t& can_message)
                if( s.find(sig->get_name()) != s.end() && afb_event_is_valid(s[sig->get_name()]))
                {
                        bool send = true;
-                       decoded_message = decoder_t::translateSignal(*sig, can_message, conf.get_can_signals(), &send);
+                       decoded_message = decoder_t::translateSignal(*sig, can_message, conf.get_all_can_signals(), &send);
 
                        if(send)
                        {
index b75eb2c..261f572 100644 (file)
@@ -60,11 +60,11 @@ namespace utils
                switch(key.type)
                {
                        case openxc_DynamicField_Type::openxc_DynamicField_Type_STRING:
-                                       lookup_signals_by_name(key.string_value, configuration_t::instance().get_can_signals(), sf.can_signals);
+                                       lookup_signals_by_name(key.string_value, configuration_t::instance().get_all_can_signals(), sf.can_signals);
                                        lookup_signals_by_name(key.string_value, configuration_t::instance().get_diagnostic_messages(), sf.diagnostic_messages);
                                break;
                        case openxc_DynamicField_Type::openxc_DynamicField_Type_NUM:
-                                       lookup_signals_by_id(key.numeric_value, configuration_t::instance().get_can_signals(), sf.can_signals);
+                                       lookup_signals_by_id(key.numeric_value, configuration_t::instance().get_all_can_signals(), sf.can_signals);
                                        lookup_signals_by_id(key.numeric_value, configuration_t::instance().get_diagnostic_messages(), sf.diagnostic_messages);
                                break;
                        default: