Cleaned up, a bit, include statement.
authorRomain Forlot <romain.forlot@iot.bzh>
Mon, 20 Feb 2017 19:17:01 +0000 (19:17 +0000)
committerRomain Forlot <romain.forlot@iot.bzh>
Tue, 21 Feb 2017 10:59:19 +0000 (10:59 +0000)
Change-Id: Icdaa162f1b3b92e730fc7dc263c18c682a7f4098
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
src/can-decoder.hpp
src/can-utils.hpp
src/can_decode_message.cpp
src/can_event_push.cpp
src/can_reader.cpp
src/low-can-binding.cpp
src/low-can-binding.hpp
src/obd2.hpp
src/openxc-utils.hpp

index b6234b5..eda7727 100644 (file)
@@ -17,6 +17,7 @@
 
 #pragma once
 
+#include "can-utils.hpp"
 
 class decoder_t
 {
@@ -34,7 +35,7 @@ class decoder_t
                * Returns the raw value of the signal parsed as a bitfield from the given byte
                * array.
                */
-               float parseSignalBitfield(const CanSignal& signal, const CanMessage& message);
+               float parseSignalBitfield(const CanSignal& signal, const can_message_t& message);
 
                /* Public: Find and return the corresponding string state for a CAN signal's
                * raw integer value.
@@ -130,7 +131,7 @@ class decoder_t
                * string or boolean. If 'send' is false, the return value is undefined.
                */
                openxc_DynamicField decodeSignal(const CanSignal& signal,
-                               const CanMessage& message, const CanSignal& signals,
+                               const can_message_t& message, const CanSignal& signals,
                                bool* send);
 
                /* Public: Decode a transformed, human readable value from an raw CAN signal
index 0b0971d..58a9873 100644 (file)
@@ -27,8 +27,6 @@
 
 #include "timer.hpp"
 #include "openxc.pb.h"
-#include <afb/afb-binding.h>
-#include <afb/afb-service-itf.h>
 
 // TODO actual max is 32 but dropped to 24 for memory considerations
 #define MAX_ACCEPTANCE_FILTERS 24
index a28fa18..0f26290 100644 (file)
  * limitations under the License.
  */
 
-#include <linux/can.h>
-#include <linux/can/raw.h>
-#include <queue>
-#include <sys/timeb.h>
-
-#include <afb/afb-binding.h>
-
-#include "can-utils.hpp"
-#include "can-decoder.hpp"
-#include "openxc.pb.h"
-#include "openxc-utils.hpp"
+#include "low-can-binding.hpp"
 
 void can_decode_message(can_bus_t &can_bus)
 {
index d3f4cbd..bb69118 100644 (file)
  * limitations under the License.
  */
 
-#include <linux/can.h>
-#include <linux/can/raw.h>
-#include <queue>
-
-#include <afb/afb-binding.h>
-
-#include "can-utils.h"
-#include "openxc-utils.hpp"
-#include "openxc.pb.h"
-#include "json-c/json.h"
+#include "low-can-binding.hpp"
 
 void can_event_push(can_bus_t& can_bus)
 {
index a8c5cf6..c8891ee 100644 (file)
  * limitations under the License.
  */
 
-#include <linux/can.h>
-#include <linux/can/raw.h>
-
-#include <afb/afb-binding.h>
-
-#include "can-utils.h"
+#include "low-can-binding.hpp"
 
 void can_reader(can_bus_t &can_bus)
 {
index 23aaf90..18346fa 100644 (file)
 #include <openxc.pb.h>
 
 #include "low-can-binding.hpp"
-#include "openxc-utils.hpp"
-#include "obd2.hpp"
-#include "can-utils.hpp"
-#include "can-signals.hpp"
 
 /********************************************************************************
 *
@@ -236,4 +232,4 @@ extern "C"
 
                return 1;
        }
-}
\ No newline at end of file
+};
\ No newline at end of file
index 20dc5dc..ea2c027 100644 (file)
  
 #pragma once
 
+#include <queue>
+#include <sys/timeb.h>
+#include <linux/can.h>
+#include <json-c/json.h>
+#include <linux/can/raw.h>
+
+#include "obd2.hpp"
+#include "openxc.pb.h"
+#include "can-utils.hpp"
 #include "can-signals.hpp"
+#include "can-decoder.hpp"
+#include "openxc-utils.hpp"
+
+/*
+ *     Interface between the daemon and the binding
+ */
+static const struct afb_binding_interface *interface;
 
 extern "C"
 {
@@ -55,9 +71,4 @@ extern "C"
        * @return Exit code, zero if success.
        */
        int afbBindingV1ServiceInit(struct afb_service service);
-}
-
-/*
- *     Interface between the daemon and the binding
- */
-static const struct afb_binding_interface *interface;
\ No newline at end of file
+};
\ No newline at end of file
index 365c683..bdccad6 100644 (file)
 
 #include <vector>
 #include "uds/uds.h"
+extern "C"
+{
+       #include <afb/afb-binding.h>
+}
 
 enum UNIT {
        POURCENT,
index f078c6e..b2b5c7f 100644 (file)
 
 #pragma once
 
-/*
- * Build a specific VehicleMessage containing a SimpleMessage.
+#include "openxc.pb.h"
+
+/**
+ * @brief Build a specific VehicleMessage containing a SimpleMessage.
  */
-openxc_VehicleMessage build_VehicleMessage_with_SimpleMessage(openxc_DynamicField_Type type,
-       const openxc_SimpleMessage& message);
+openxc_VehicleMessage build_VehicleMessage_with_SimpleMessage(openxc_DynamicField_Type type, const openxc_SimpleMessage& message);
 
-/*
- * Build an openxc_SimpleMessage associating a name to an openxc_DynamicField
+/**
+ * @brief Build an openxc_SimpleMessage associating a name to an openxc_DynamicField
  */
 openxc_SimpleMessage build_SimpleMessage(const std::string& name, const openxc_DynamicField& value);
-/* 
- * Build an openxc_DynamicField depending what we pass as argument
+/**
+ * @brief Build an openxc_DynamicField depending what we pass as argument
  */
 openxc_DynamicField build_DynamicField(const std::string& value);
 
-/* 
- * Build an openxc_DynamicField depending what we pass as argument
+/**
+ * @brief Build an openxc_DynamicField depending what we pass as argument
  */
 openxc_DynamicField build_DynamicField(double value);
 
-/* 
- * Build an openxc_DynamicField depending what we pass as argument
+/**
+ * @brief Build an openxc_DynamicField depending what we pass as argument
  */
 openxc_DynamicField build_DynamicField(bool value);
 
 void jsonify_DynamicField(const openxc_DynamicField& field, const json_object& value);
 
-/* Extract the simple message value from an openxc_VehicleMessage
+/**
+ * @brief Extract the simple message value from an openxc_VehicleMessage
  * and return it, or null if there isn't.
  */
 openxc_SimpleMessage get_simple_message(const openxc_VehicleMessage& v_msg);