summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-16 15:54:22 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-16 18:17:24 +0100
commit20336cf43a6b312cd03f76dbe68333db18122bd6 (patch)
tree430b78250ef7bdfe65ba5b59a01f0d333877f800 /src
parentd952c0f8dd36acf9a072603237975b7ff2e915de (diff)
Include cleaning
Change-Id: I5df96540400b833e684001f8fc5fa33ff1892bae Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src')
-rw-r--r--src/can/can-bus-dev.cpp5
-rw-r--r--src/can/can-bus.cpp1
-rw-r--r--src/can/can-bus.hpp2
-rw-r--r--src/can/can-decoder.cpp1
-rw-r--r--src/can/can-decoder.hpp4
-rw-r--r--src/can/can-signals.cpp1
-rw-r--r--src/configuration.hpp2
-rw-r--r--src/diagnostic/active-diagnostic-request.cpp2
-rw-r--r--src/diagnostic/active-diagnostic-request.hpp5
-rw-r--r--src/diagnostic/diagnostic-manager.cpp1
-rw-r--r--src/diagnostic/diagnostic-manager.hpp11
-rw-r--r--src/diagnostic/diagnostic-message.cpp1
-rw-r--r--src/diagnostic/diagnostic-message.hpp4
-rw-r--r--src/low-can-binding.cpp1
-rw-r--r--src/utils/openxc-utils.cpp1
15 files changed, 19 insertions, 23 deletions
diff --git a/src/can/can-bus-dev.cpp b/src/can/can-bus-dev.cpp
index dd2f51f7..85bed4ad 100644
--- a/src/can/can-bus-dev.cpp
+++ b/src/can/can-bus-dev.cpp
@@ -16,15 +16,14 @@
* limitations under the License.
*/
-
+#include <map>
+#include <mutex>
#include <unistd.h>
#include <string.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <linux/can/raw.h>
-#include <mutex>
-
#include "can-bus-dev.hpp"
#include "can-bus.hpp"
diff --git a/src/can/can-bus.cpp b/src/can/can-bus.cpp
index 07a2f770..29e63b7e 100644
--- a/src/can/can-bus.cpp
+++ b/src/can/can-bus.cpp
@@ -29,6 +29,7 @@
#include "can-bus.hpp"
+#include "can-signals.hpp"
#include "can-decoder.hpp"
#include "../configuration.hpp"
#include "../utils/signals.hpp"
diff --git a/src/can/can-bus.hpp b/src/can/can-bus.hpp
index 13a78305..9370d3b8 100644
--- a/src/can/can-bus.hpp
+++ b/src/can/can-bus.hpp
@@ -25,8 +25,6 @@
#include <condition_variable>
#include "openxc.pb.h"
-#include "../utils/timer.hpp"
-#include "can-signals.hpp"
#include "can-message.hpp"
#include "can-bus-dev.hpp"
#include "../diagnostic/active-diagnostic-request.hpp"
diff --git a/src/can/can-decoder.cpp b/src/can/can-decoder.cpp
index fce43fc6..866434e0 100644
--- a/src/can/can-decoder.cpp
+++ b/src/can/can-decoder.cpp
@@ -16,6 +16,7 @@
*/
#include "can-decoder.hpp"
+
#include "canutil/read.h"
#include "../utils/openxc-utils.hpp"
diff --git a/src/can/can-decoder.hpp b/src/can/can-decoder.hpp
index ee601c6f..0507a6bd 100644
--- a/src/can/can-decoder.hpp
+++ b/src/can/can-decoder.hpp
@@ -17,7 +17,9 @@
#pragma once
-#include "can-bus.hpp"
+#include "can-signals.hpp"
+#include "can-message.hpp"
+#include "openxc.pb.h"
class decoder_t
{
diff --git a/src/can/can-signals.cpp b/src/can/can-signals.cpp
index 72c93013..6211fa1d 100644
--- a/src/can/can-signals.cpp
+++ b/src/can/can-signals.cpp
@@ -23,7 +23,6 @@
#include "../utils/signals.hpp"
#include "can-decoder.hpp"
#include "../diagnostic/diagnostic-message.hpp"
-#include "../low-can-binding.hpp"
std::string can_signal_t::prefix_ = "messages";
diff --git a/src/configuration.hpp b/src/configuration.hpp
index 2112ee9e..be188b92 100644
--- a/src/configuration.hpp
+++ b/src/configuration.hpp
@@ -17,7 +17,9 @@
#pragma once
+#include <map>
#include <vector>
+#include <string>
#include <fcntl.h>
#include "can/can-bus.hpp"
diff --git a/src/diagnostic/active-diagnostic-request.cpp b/src/diagnostic/active-diagnostic-request.cpp
index 8cb047db..9e64bd55 100644
--- a/src/diagnostic/active-diagnostic-request.cpp
+++ b/src/diagnostic/active-diagnostic-request.cpp
@@ -15,8 +15,8 @@
* limitations under the License.
*/
-#include <fnmatch.h>
#include <map>
+#include <fnmatch.h>
#include "active-diagnostic-request.hpp"
diff --git a/src/diagnostic/active-diagnostic-request.hpp b/src/diagnostic/active-diagnostic-request.hpp
index 22bf8507..452ff976 100644
--- a/src/diagnostic/active-diagnostic-request.hpp
+++ b/src/diagnostic/active-diagnostic-request.hpp
@@ -17,14 +17,13 @@
#pragma once
+#include <string>
#include <vector>
#include "uds/uds.h"
#include "uds/uds_types.h"
+#include "../utils/timer.hpp"
#include "../can/can-bus-dev.hpp"
-#include "../can/can-message.hpp"
-
-#include "../low-can-binding.hpp"
class active_diagnostic_request_t;
class diagnostic_manager_t;
diff --git a/src/diagnostic/diagnostic-manager.cpp b/src/diagnostic/diagnostic-manager.cpp
index 7ff86449..4fc34b18 100644
--- a/src/diagnostic/diagnostic-manager.cpp
+++ b/src/diagnostic/diagnostic-manager.cpp
@@ -20,7 +20,6 @@
#include "diagnostic-manager.hpp"
-#include "uds/uds.h"
#include "../utils/openxc-utils.hpp"
#include "../configuration.hpp"
diff --git a/src/diagnostic/diagnostic-manager.hpp b/src/diagnostic/diagnostic-manager.hpp
index 01aa5cf9..c66e21a5 100644
--- a/src/diagnostic/diagnostic-manager.hpp
+++ b/src/diagnostic/diagnostic-manager.hpp
@@ -23,12 +23,9 @@
#include "uds/uds.h"
#include "openxc.pb.h"
-#include "../can/can-bus-dev.hpp"
-#include "../can/can-message.hpp"
+#include "../can/can-bus.hpp"
#include "active-diagnostic-request.hpp"
-#include "../low-can-binding.hpp"
-
/* Each CAN bus needs its own set of shim functions, so this should
* match the maximum CAN controller count.
*/
@@ -50,10 +47,10 @@ protected:
static void shims_timer();
private:
- DiagnosticShims shims_; /*!< shims_ - A map of shim functions for each CAN bus that plug the diagnostics
- * library (uds-c) into the VI's CAN peripheral.*/
+ DiagnosticShims shims_; /*!< shims_ - Shim functions for each CAN bus that plug the diagnostics
+ * library (uds-c) into the VI's CAN peripheral.*/
std::string bus_; /*!< bus_ - A pointer to the CAN bus that should be used for all standard OBD-II requests, if the bus is not
- * explicitly spcified in the request. Default to the first bus CAN at initialization.*/
+ * explicitly spcified in the request. Default to the first bus CAN at initialization.*/
std::vector<active_diagnostic_request_t*> recurring_requests_; /*!< recurringRequests - A list of active recurring diagnostic requests.*/
std::vector<active_diagnostic_request_t*> non_recurring_requests_; /*!< nonrecurringRequests - A list of active one-time diagnostic requests. When a
* response is received for a non-recurring request or it times out, it is removed*/
diff --git a/src/diagnostic/diagnostic-message.cpp b/src/diagnostic/diagnostic-message.cpp
index c37bbd0f..ca8bf846 100644
--- a/src/diagnostic/diagnostic-message.cpp
+++ b/src/diagnostic/diagnostic-message.cpp
@@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#include <map>
#include "diagnostic-message.hpp"
diff --git a/src/diagnostic/diagnostic-message.hpp b/src/diagnostic/diagnostic-message.hpp
index 686a8b42..b25fea34 100644
--- a/src/diagnostic/diagnostic-message.hpp
+++ b/src/diagnostic/diagnostic-message.hpp
@@ -18,14 +18,12 @@
#pragma once
#include <vector>
+#include <string>
#include "uds/uds.h"
-#include "../can/can-bus.hpp"
#include "../can/can-message.hpp"
#include "active-diagnostic-request.hpp"
-#include "../low-can-binding.hpp"
-
enum UNIT {
POURCENT,
DEGREES_CELSIUS,
diff --git a/src/low-can-binding.cpp b/src/low-can-binding.cpp
index d9703e86..2b04fa84 100644
--- a/src/low-can-binding.cpp
+++ b/src/low-can-binding.cpp
@@ -18,6 +18,7 @@
#include "low-can-binding.hpp"
+#include <map>
#include <queue>
#include <mutex>
#include <vector>
diff --git a/src/utils/openxc-utils.cpp b/src/utils/openxc-utils.cpp
index ae15f4df..111ac1d3 100644
--- a/src/utils/openxc-utils.cpp
+++ b/src/utils/openxc-utils.cpp
@@ -20,7 +20,6 @@
#include "../configuration.hpp"
-
/**
* @brief Build a specific VehicleMessage containing a DiagnosticResponse.
*