aboutsummaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/can/can-bus.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-06-01 09:43:43 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-06-01 18:40:05 +0200
commit80740ea1082b3034fa5003b812e063063a873d7c (patch)
treee11d9e0b23a930ae591372de9248d68416100542 /CAN-binder/low-can-binding/can/can-bus.cpp
parent07cf0fca41024a41ba035f6e817a9590b686a992 (diff)
Fix: get signal name no matter type of signal.
One method to return name depending upon which type it is, can or diagnostic. Change-Id: I1e96f88654e14316d3afe527fa6fa0d8ddbf410d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding/can/can-bus.cpp')
-rw-r--r--CAN-binder/low-can-binding/can/can-bus.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/CAN-binder/low-can-binding/can/can-bus.cpp b/CAN-binder/low-can-binding/can/can-bus.cpp
index 84f828e0..65e2acd1 100644
--- a/CAN-binder/low-can-binding/can/can-bus.cpp
+++ b/CAN-binder/low-can-binding/can/can-bus.cpp
@@ -83,14 +83,14 @@ void can_bus_t::process_can_signals(const can_message_t& can_message)
{
bool send = true;
decoded_message = decoder_t::translateSignal(*sig->get_can_signal(), can_message, conf.get_all_can_signals(), &send);
- openxc_SimpleMessage s_message = build_SimpleMessage(sig->get_sig_name(), decoded_message);
+ openxc_SimpleMessage s_message = build_SimpleMessage(sig->get_name(), decoded_message);
vehicle_message = build_VehicleMessage(s_message, can_message.get_timestamp());
if(send && apply_filter(vehicle_message, sig))
{
std::lock_guard<std::mutex> decoded_can_message_lock(decoded_can_message_mutex_);
push_new_vehicle_message(subscription_id, vehicle_message);
- DEBUG(binder_interface, "%s: %s CAN signals processed.", __FUNCTION__, sig->get_sig_name().c_str());
+ DEBUG(binder_interface, "%s: %s CAN signals processed.", __FUNCTION__, sig->get_name().c_str());
}
}
}
@@ -122,7 +122,7 @@ void can_bus_t::process_diagnostic_signals(diagnostic_manager_t& manager, const
{
std::lock_guard<std::mutex> decoded_can_message_lock(decoded_can_message_mutex_);
push_new_vehicle_message(subscription_id, vehicle_message);
- DEBUG(binder_interface, "%s: %s CAN signals processed.", __FUNCTION__, s[subscription_id].first->get_diag_name().c_str());
+ DEBUG(binder_interface, "%s: %s CAN signals processed.", __FUNCTION__, s[subscription_id].first->get_name().c_str());
}
}
}