diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-05-11 01:12:11 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-05-11 01:12:11 +0200 |
commit | 6222973c39ee02ad52a5d0b4b400024157ff2eeb (patch) | |
tree | 08fff1571d6089dd7674166aac6e424a9826b4b3 /CAN-binder/low-can-binding/binding/configuration.hpp | |
parent | d253ada94487232ccd33b68a69fd44ff7840fab7 (diff) |
Massive use of shared_ptr about signal and diag message. WIP
Vector of shared_ptr is made to shared ownership about object around project.
This is the default returned value by getter methods when lookup and manipulating
them.
Change-Id: Id37947bb5994b629f4bf3faecc5ffac81c55e1e6
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding/binding/configuration.hpp')
-rw-r--r-- | CAN-binder/low-can-binding/binding/configuration.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/CAN-binder/low-can-binding/binding/configuration.hpp b/CAN-binder/low-can-binding/binding/configuration.hpp index 44881645..2f1f4fce 100644 --- a/CAN-binder/low-can-binding/binding/configuration.hpp +++ b/CAN-binder/low-can-binding/binding/configuration.hpp @@ -50,7 +50,7 @@ class configuration_t std::vector<can_message_set_t> can_message_set_; ///< Vector holding all message set from JSON signals description file //std::vector<std::vector<can_message_definition_t>> can_message_definition_; ///< Vector of vector holding all can message definition from JSON signals description file. This describe a CAN message. First vector map to message set //std::vector<std::vector<can_signal_t>> can_signals_; ///< Vector of vector holding all can signasl from JSON signals description file. A CAN signal is a part of a CAN message. First vector map to message set - std::vector<std::vector<diagnostic_message_t>> diagnostic_messages_; ///< Vector of vector holding all diagnostics messages from JSON signals description file. First vector map to message set + std::vector<std::vector<std::shared_ptr<diagnostic_message_t> > > diagnostic_messages_; ///< Vector of vector holding all diagnostics messages from JSON signals description file. First vector map to message set configuration_t(); ///< Private constructor with implementation generated by the AGL generator. @@ -71,7 +71,7 @@ class configuration_t std::vector<std::shared_ptr<can_signal_t> > get_can_signals(); - std::vector<diagnostic_message_t>& get_diagnostic_messages(); + std::vector<std::shared_ptr<diagnostic_message_t> > get_diagnostic_messages(); const std::vector<std::string>& get_signals_prefix() const; @@ -83,7 +83,7 @@ class configuration_t void set_active_message_set(uint8_t id); - diagnostic_message_t* get_diagnostic_message(std::string message_name) const; + std::shared_ptr<diagnostic_message_t> get_diagnostic_message(std::string message_name) const; DiagnosticRequest* get_request_from_diagnostic_message(std::string message_name) const; /* /// TODO: implement this function as method into can_bus class |