summaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/can
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-04-27 00:53:30 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-04-27 01:03:34 +0200
commit14043c56960ced9141ef107c66a6a041a75f6cb3 (patch)
tree2997530e758d90ff6c48cb87a2c389064a6153c8 /CAN-binder/low-can-binding/can
parent45dd042f924236be04d4e4292de111f80a004060 (diff)
Typo, rename, format
Change-Id: I8250ef78f0b540617bd249873250f62ad6361fdf Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding/can')
-rw-r--r--CAN-binder/low-can-binding/can/can-bus-dev.cpp2
-rw-r--r--CAN-binder/low-can-binding/can/can-bus.cpp11
-rw-r--r--CAN-binder/low-can-binding/can/can-message.hpp2
3 files changed, 7 insertions, 8 deletions
diff --git a/CAN-binder/low-can-binding/can/can-bus-dev.cpp b/CAN-binder/low-can-binding/can/can-bus-dev.cpp
index 1aaefc91..df0c0d6f 100644
--- a/CAN-binder/low-can-binding/can/can-bus-dev.cpp
+++ b/CAN-binder/low-can-binding/can/can-bus-dev.cpp
@@ -28,8 +28,6 @@
#include "../low-can-binding.hpp"
#include "canutil/write.h"
-#define U64_DATA(p) (*(unsigned long long*)(p)->data)
-
/// @brief Class constructor
///
/// @param[in] dev_name - String representing the device name into the linux /dev tree
diff --git a/CAN-binder/low-can-binding/can/can-bus.cpp b/CAN-binder/low-can-binding/can/can-bus.cpp
index 66657443..6e74b86a 100644
--- a/CAN-binder/low-can-binding/can/can-bus.cpp
+++ b/CAN-binder/low-can-binding/can/can-bus.cpp
@@ -15,14 +15,15 @@
* limitations under the License.
*/
-#include <map>
-#include <cerrno>
-#include <vector>
-#include <string>
#include <net/if.h>
#include <sys/socket.h>
#include <json-c/json.h>
#include <linux/can/raw.h>
+#include <map>
+#include <cerrno>
+#include <vector>
+#include <string>
+#include <algorithm>
#include "can-bus.hpp"
@@ -337,7 +338,7 @@ void can_bus_t::push_new_vehicle_message(const openxc_VehicleMessage& v_msg)
/// @brief Create a RX_SETUP receive job for the BCM socket of a CAN signal.
///
-/// @return 0 if ok.
+/// @return 0 if ok -1 if not.
int can_bus_t::create_rx_filter(const can_signal_t& s)
{
const std::string& bus = s.get_message().get_bus_name();
diff --git a/CAN-binder/low-can-binding/can/can-message.hpp b/CAN-binder/low-can-binding/can/can-message.hpp
index 6fe03172..5a6e6eb3 100644
--- a/CAN-binder/low-can-binding/can/can-message.hpp
+++ b/CAN-binder/low-can-binding/can/can-message.hpp
@@ -70,6 +70,6 @@ public:
bool is_correct_to_send();
-static can_message_t convert_from_canfd_frame(const struct canfd_frame& frame, size_t nbytes);
+ static can_message_t convert_from_canfd_frame(const struct canfd_frame& frame, size_t nbytes);
canfd_frame convert_to_canfd_frame();
};