X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=CAN-binder%2Flow-can-binding%2Fcan%2Fcan-message-set.cpp;h=cfa640a60134878d22de04aab6b2598b546a2e23;hb=d91f5f743bc6f6ec9aadfe96187b45dc93043f61;hp=063ca275b530043b1c93c33afae4789e80ae2197;hpb=4068ee30a5e041a8e65634ed65c6bbd51a3687dd;p=apps%2Fagl-service-can-low-level.git diff --git a/CAN-binder/low-can-binding/can/can-message-set.cpp b/CAN-binder/low-can-binding/can/can-message-set.cpp index 063ca275..cfa640a6 100644 --- a/CAN-binder/low-can-binding/can/can-message-set.cpp +++ b/CAN-binder/low-can-binding/can/can-message-set.cpp @@ -18,27 +18,26 @@ #include "can-message-set.hpp" +#include "../can/can-message-definition.hpp" + can_message_set_t::can_message_set_t( uint8_t index, const std::string& name, - uint8_t can_bus_count, - unsigned short can_message_count, - unsigned short can_signal_count, - unsigned short can_command_count, - unsigned short obd2_signal_count, - std::vector > can_messages_definition) + std::vector > can_messages_definition, + std::vector > diagnostic_messages) : index_{index} , name_{name} - , can_bus_count_{can_bus_count} - , can_message_count_{can_message_count} - , can_signal_count_{can_signal_count} - , can_command_count_{can_command_count} - , obd2_signal_count_{obd2_signal_count} , can_messages_definition_{can_messages_definition} + , diagnostic_messages_{diagnostic_messages} { for(auto& cmd : can_messages_definition_) { - cmd->set_parent(std::make_shared(*this)); + cmd->set_parent(this); + } + + for(auto& dm : diagnostic_messages_) + { + dm->set_parent(this); } } @@ -61,4 +60,9 @@ std::vector > can_message_set_t::get_can_signals() } return can_signals; +} + +std::vector > can_message_set_t::get_diagnostic_messages() +{ + return diagnostic_messages_; } \ No newline at end of file