diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-12 19:44:07 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-16 17:10:41 +0100 |
commit | 6c40a7192cd6ddf89e625b53dd489b7a91a423e1 (patch) | |
tree | 097b637dd4e751211303a7fa255dd8bb914283ee /src/low-can-binding.cpp | |
parent | 24057b7fad6d4d1f1f264995d0f5865acf466004 (diff) |
Use of signals prefix to be able to distinguish type of
messages to be processed.
For now, processing prefix is hardcoded but idea is to
process them dynamically if possible. To be studied.
Change-Id: Iac0c96228fc5f53e3c637e54350188ff3de6d57f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/low-can-binding.cpp')
-rw-r--r-- | src/low-can-binding.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/low-can-binding.cpp b/src/low-can-binding.cpp index 394d906a..52e893d9 100644 --- a/src/low-can-binding.cpp +++ b/src/low-can-binding.cpp @@ -120,6 +120,10 @@ static int subscribe_unsubscribe_signal(struct afb_req request, bool subscribe, static int subscribe_unsubscribe_signals(struct afb_req request, bool subscribe, const std::vector<std::string>& signals) { int rets = 0; + //TODO: Implement way to dynamically call the right function no matter + // how much signals types we have. + const std::string& can_prefix = configuration_t::instance().get_can_signals().front().get_prefix(); + const std::string& obd2_prefix = configuration_t::instance().get_obd2_signals().front().get_prefix(); for(auto& sig : signals) { |