#include "can-message-definition.hpp"
-can_message_definition_t::can_message_definition_t(const std::string bus)
+can_message_definition_t::can_message_definition_t(const std::string& bus)
: parent_{nullptr}, bus_{bus}, last_value_{CAN_MESSAGE_SIZE}
{}
can_message_definition_t::can_message_definition_t(
- const std::string bus,
+ const std::string& bus,
uint32_t id,
frequency_clock_t frequency_clock,
bool force_send_changed)
{}
can_message_definition_t::can_message_definition_t(
- const std::string bus,
+ const std::string& bus,
uint32_t id,
can_message_format_t format,
frequency_clock_t frequency_clock,
{}
can_message_definition_t::can_message_definition_t(
- const std::string bus,
+ const std::string& bus,
uint32_t id,
can_message_format_t format,
frequency_clock_t frequency_clock,
{
for(auto& sig: can_signals_)
{
- sig->set_parent(std::make_shared<can_message_definition_t>(*this));
+ sig->set_parent(this);
}
}
can_signals_{b.can_signals_}
{}*/
-const std::string& can_message_definition_t::get_bus_name() const
+const std::string can_message_definition_t::get_bus_name() const
{
return bus_;
}
return id_;
}
-std::vector<std::shared_ptr<can_signal_t> > can_message_definition_t::get_can_signals()
+std::vector<std::shared_ptr<can_signal_t> >& can_message_definition_t::get_can_signals()
{
return can_signals_;
}
-void can_message_definition_t::set_parent(std::shared_ptr<can_message_set_t> parent)
+void can_message_definition_t::set_parent(can_message_set_t* parent)
{
parent_= parent;
}