Code Review
/
apps
/
agl-service-can-low-level.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add gitreview file for Prickly Pike branch
[apps/agl-service-can-low-level.git]
/
low-can-binding
/
utils
/
socketcan-bcm.hpp
diff --git
a/low-can-binding/utils/socketcan-bcm.hpp
b/low-can-binding/utils/socketcan-bcm.hpp
index
0002890
..
4806ac0
100644
(file)
--- a/
low-can-binding/utils/socketcan-bcm.hpp
+++ b/
low-can-binding/utils/socketcan-bcm.hpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2015, 2016 ,
2017 "IoT
.bzh"
+ * Copyright (C) 2015, 2016 ,
2017, 2018, 2019 "IoT\
.bzh"
* Author "Romain Forlot" <romain.forlot@iot.bzh>
* Author "Loïc Collignon" <loic.collignon@iot.bzh>
* Licensed under the Apache License, Version 2.0 (the "License");
* Author "Romain Forlot" <romain.forlot@iot.bzh>
* Author "Loïc Collignon" <loic.collignon@iot.bzh>
* Licensed under the Apache License, Version 2.0 (the "License");
@@
-18,21
+18,10
@@
#pragma once
#include "socketcan.hpp"
#pragma once
#include "socketcan.hpp"
-#include "../can/can-message.hpp"
-
-#define MAX_BCM_CAN_FRAMES 257
+#include "../can/message/can-message.hpp"
namespace utils
{
namespace utils
{
- struct bcm_msg
- {
- struct bcm_msg_head msg_head;
- union {
- struct canfd_frame fd_frames[MAX_BCM_CAN_FRAMES];
- struct can_frame frames[MAX_BCM_CAN_FRAMES];
- };
- };
-
/// @brief derivated socketcan class specialized for BCM CAN socket.make_bcm_head
class socketcan_bcm_t : public socketcan_t
{
/// @brief derivated socketcan class specialized for BCM CAN socket.make_bcm_head
class socketcan_bcm_t : public socketcan_t
{
@@
-40,13
+29,9
@@
namespace utils
using socketcan_t::socketcan_t;
virtual int open(std::string device_name);
using socketcan_t::socketcan_t;
virtual int open(std::string device_name);
- virtual std::shared_ptr<can_message_t> read_message();
- virtual void write_message(std::vector<std::shared_ptr<can_message_t>>& vobj);
- virtual void write_message(std::shared_ptr<can_message_t> obj);
- void write_message(struct bcm_msg& obj);
+ virtual std::shared_ptr<message_t> read_message();
+ virtual int write_message(message_t& obj);
- private:
- int connect(const struct sockaddr* addr, socklen_t len);
};
};