summaryrefslogtreecommitdiffstats
path: root/src/configuration.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-16 13:14:02 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-16 18:17:24 +0100
commitd952c0f8dd36acf9a072603237975b7ff2e915de (patch)
treef283cc016be4a25830607b0fafab74a7cf541d38 /src/configuration.cpp
parente5a97dac176ab84b5903b41113921e42335b1def (diff)
Adding missing doxygen comments.
Made some cleaning about unused things or obsolete. Review existing comments, adding missing comments. Reformat some long long constructor. Change-Id: Ibae247d1295a7a85b49d0ecee473022755d42b8b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/configuration.cpp')
-rw-r--r--src/configuration.cpp50
1 files changed, 14 insertions, 36 deletions
diff --git a/src/configuration.cpp b/src/configuration.cpp
index 8a2df90..184d468 100644
--- a/src/configuration.cpp
+++ b/src/configuration.cpp
@@ -19,24 +19,13 @@
#include "utils/signals.hpp"
-// Dumb signals and message implementation. To get compile.
-/*std::vector<can_message_set_t> CAN_MESSAGE_SET;
-
-std::vector<std::vector<can_message_definition_t>> CAN_MESSAGES_DEFINITION;
-
-std::vector<std::vector<can_signal_t>> SIGNALS;*/
-
+/// @brief Return singleton instance of configuration object.
configuration_t& configuration_t::instance()
{
static configuration_t config;
return config;
}
-configuration_t& configuration_t::get_configuration()
-{
- return *this;
-}
-
can_bus_t& configuration_t::get_can_bus_manager()
{
return can_bus_manager_;
@@ -72,11 +61,6 @@ std::vector<diagnostic_message_t>& configuration_t::get_diagnostic_messages()
return diagnostic_messages_[active_message_set_];
}
-const std::vector<std::string>& configuration_t::get_signals_prefix() const
-{
- return signals_prefix_;
-}
-
const std::vector<can_message_definition_t>& configuration_t::get_can_message_definition()
{
return can_message_definition_[active_message_set_];
@@ -102,15 +86,12 @@ void configuration_t::set_active_message_set(uint8_t id)
active_message_set_ = id;
}
-/**
- * @fn std::vector<std::string> find_can_signals(const openxc_DynamicField &key)
- * @brief return signals name found searching through CAN_signals and OBD2 pid
- *
- * @param[in] key - can contain numeric or string value in order to search against
- * can signals or obd2 signals name.
- *
- * @return Vector of signals name found.
- */
+/// @brief return diagnostic messages name found searching through diagnostic messages list.
+///
+/// @param[in] key - can contain numeric or string value in order to search against
+/// can signals or obd2 signals name.
+/// @param[out] found_signals - Vector of signals name found.
+///
void configuration_t::find_diagnostic_messages(const openxc_DynamicField &key, std::vector<diagnostic_message_t*>& found_signals)
{
switch(key.type)
@@ -128,15 +109,12 @@ void configuration_t::find_diagnostic_messages(const openxc_DynamicField &key, s
DEBUG(binder_interface, "find_diagnostic_messages: Found %d signal(s)", (int)found_signals.size());
}
-/**
- * @fn void find_can_signals(const openxc_DynamicField& key, std::vector<can_signal_t*>& found_signals)
- * @brief return signals name found searching through CAN_signals and OBD2 pid
- *
- * @param[in] key - can contain numeric or string value in order to search against
- * can signals or obd2 signals name.
- * @param[out] found_signals - provided vector to fill with ponter to signals matched.
- *
- */
+/// @brief return signals name found searching through CAN signals list.
+///
+/// @param[in] key - can contain numeric or string value in order to search against
+/// can signals or obd2 signals name.
+/// @param[out] found_signals - provided vector to fill with pointer to matched signals.
+///
void configuration_t::find_can_signals(const openxc_DynamicField& key, std::vector<can_signal_t*>& found_signals)
{
switch(key.type)
@@ -152,4 +130,4 @@ void configuration_t::find_can_signals(const openxc_DynamicField& key, std::vect
break;
}
DEBUG(binder_interface, "find_can_signals: Found %d signal(s)", (int)found_signals.size());
-} \ No newline at end of file
+}