summaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/binding/configuration.hpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-05-10 18:39:25 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-05-10 18:45:56 +0200
commitd253ada94487232ccd33b68a69fd44ff7840fab7 (patch)
tree67f5959138d0ddcad413f9ee692d087200e0b4df /CAN-binder/low-can-binding/binding/configuration.hpp
parent3e2be4237ac6f3e8bcec8b10d295182cefe67330 (diff)
Use a tree instead of separated object lists. WIP
Now we respect JSON description file, which is can_message_set contains can_message_definition which contains can_signals. Diagnostic messages aren't processed for now. Change-Id: I94aaf5eded14dd84395bd4fd749df58dee5f533e 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.hpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/CAN-binder/low-can-binding/binding/configuration.hpp b/CAN-binder/low-can-binding/binding/configuration.hpp
index dd25a20..4488164 100644
--- a/CAN-binder/low-can-binding/binding/configuration.hpp
+++ b/CAN-binder/low-can-binding/binding/configuration.hpp
@@ -20,11 +20,11 @@
#include <map>
#include <vector>
#include <string>
-#include <fcntl.h>
+#include <memory>
#include "../can/can-bus.hpp"
+#include "../can/can-message-set.hpp"
#include "../can/can-signals.hpp"
-#include "../can/can-message.hpp"
#include "../diagnostic/diagnostic-manager.hpp"
#include "low-can-hat.hpp"
@@ -48,8 +48,8 @@ class configuration_t
uint8_t active_message_set_ = 0; ///< Which is the active message set ? Default to 0.
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<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
configuration_t(); ///< Private constructor with implementation generated by the AGL generator.
@@ -69,14 +69,13 @@ class configuration_t
const std::vector<can_message_set_t>& get_can_message_set();
- std::vector<can_signal_t>& get_can_signals();
+ std::vector<std::shared_ptr<can_signal_t> > get_can_signals();
std::vector<diagnostic_message_t>& get_diagnostic_messages();
const std::vector<std::string>& get_signals_prefix() const;
- const std::vector<can_message_definition_t>& get_can_message_definition();
- can_message_definition_t& get_can_message_definition(std::uint8_t message_set_id, std::uint8_t message_id);
+ std::vector<std::shared_ptr<can_message_definition_t> > get_can_message_definition();
uint32_t get_signal_id(diagnostic_message_t& sig) const;