aboutsummaryrefslogtreecommitdiffstats
path: root/low-can-binding/binding/low-can-subscription.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-11-20 13:02:24 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2020-01-09 15:55:03 +0100
commit779da0a54b29db5dd4c12387970026a264d2e6cb (patch)
treef15bc290e899682a0e2abfd2d7559b3d2cd499e1 /low-can-binding/binding/low-can-subscription.cpp
parent5b9913d4d7fcf273380b2aeb780cf0a42cc99725 (diff)
message: More explicit define about CAN protocols.
Change a bit CAN binding define about used protocol. There was a mistake about BCM define which isn't a protocol at all but a maner to filter and retrieve CAN message through SocketCAN. Also FD_FRAME was using the same name than SocketCAN which isn't a good idea, better to distinguis both of them. Bug-AGL: SPEC-2988 Change-Id: I255fa03029c7d5f90a33448e5e7692d8c249279b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'low-can-binding/binding/low-can-subscription.cpp')
-rw-r--r--low-can-binding/binding/low-can-subscription.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/low-can-binding/binding/low-can-subscription.cpp b/low-can-binding/binding/low-can-subscription.cpp
index c3a0b3fa..05367b79 100644
--- a/low-can-binding/binding/low-can-subscription.cpp
+++ b/low-can-binding/binding/low-can-subscription.cpp
@@ -364,7 +364,7 @@ int low_can_subscription_t::open_socket(low_can_subscription_t &subscription, co
int ret = -1;
if(! subscription.socket_)
{
- if(flags & BCM_PROTOCOL)
+ if(flags & CAN_PROTOCOL)
{
subscription.socket_ = std::make_shared<utils::socketcan_bcm_t>();
if( subscription.signal_ )
@@ -666,7 +666,7 @@ int low_can_subscription_t::create_rx_filter(std::shared_ptr<diagnostic_message_
int low_can_subscription_t::create_rx_filter_bcm(low_can_subscription_t &subscription, struct bcm_msg& bcm_msg)
{
// Make sure that socket is opened.
- if(subscription.open_socket(subscription, "", BCM_PROTOCOL) < 0)
+ if(subscription.open_socket(subscription, "", CAN_PROTOCOL) < 0)
return -1;
// If it's not an OBD2 CAN ID then just add a simple RX_SETUP job
@@ -709,7 +709,7 @@ int low_can_subscription_t::tx_send(low_can_subscription_t &subscription, messag
std::vector<canfd_frame> cfd_vect = cm->convert_to_canfd_frame_vector();
- if(subscription.open_socket(subscription, bus_name, BCM_PROTOCOL) < 0)
+ if(subscription.open_socket(subscription, bus_name, CAN_PROTOCOL) < 0)
return -1;
struct bcm_msg &bcm_cm = cm->get_bcm_msg();