summaryrefslogtreecommitdiffstats
path: root/low-can-binding/binding/low-can-cb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'low-can-binding/binding/low-can-cb.cpp')
-rw-r--r--low-can-binding/binding/low-can-cb.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/low-can-binding/binding/low-can-cb.cpp b/low-can-binding/binding/low-can-cb.cpp
index 824aa81..e2ddf07 100644
--- a/low-can-binding/binding/low-can-cb.cpp
+++ b/low-can-binding/binding/low-can-cb.cpp
@@ -105,7 +105,7 @@ static int make_subscription_unsubscription(struct afb_req request, std::shared_
/* Make the subscription or unsubscription to the event */
if (((subscribe ? afb_req_subscribe : afb_req_unsubscribe)(request, s[can_subscription->get_index()]->get_event())) < 0)
{
- ERROR("Operation goes wrong for signal: %s", can_subscription->get_name().c_str());
+ AFB_ERROR("Operation goes wrong for signal: %s", can_subscription->get_name().c_str());
return -1;
}
return 0;
@@ -118,7 +118,7 @@ static int create_event_handle(std::shared_ptr<low_can_subscription_t>& can_subs
s[sub_index] = can_subscription;
if (!afb_event_is_valid(s[sub_index]->get_event()))
{
- ERROR("Can't create an event for %s, something goes wrong.", can_subscription->get_name().c_str());
+ AFB_ERROR("Can't create an event for %s, something goes wrong.", can_subscription->get_name().c_str());
return -1;
}
return 0;
@@ -136,7 +136,7 @@ static int subscribe_unsubscribe_signal(struct afb_req request, bool subscribe,
{
if (!afb_event_is_valid(s[sub_index]->get_event()) && !subscribe)
{
- NOTICE("Event isn't valid, no need to unsubscribed.");
+ AFB_NOTICE("Event isn't valid, no need to unsubscribed.");
ret = -1;
}
ret = 0;
@@ -192,22 +192,22 @@ static int subscribe_unsubscribe_diagnostic_messages(struct afb_req request, boo
diag_m.add_recurring_request(diag_req, sig->get_name().c_str(), false, sig->get_decoder(), sig->get_callback(), event_filter.frequency);
if(can_subscription->create_rx_filter(sig) < 0)
{return -1;}
- DEBUG("Signal: %s subscribed", sig->get_name().c_str());
+ AFB_DEBUG("Signal: %s subscribed", sig->get_name().c_str());
if(it == s.end() && add_to_event_loop(can_subscription) < 0)
{
diag_m.cleanup_request(
diag_m.find_recurring_request(*diag_req), true);
- WARNING("signal: %s isn't supported. Canceling operation.", sig->get_name().c_str());
+ AFB_WARNING("signal: %s isn't supported. Canceling operation.", sig->get_name().c_str());
return -1;
}
}
else
{
if(sig->get_supported())
- {DEBUG("%s cancelled due to unsubscribe", sig->get_name().c_str());}
+ {AFB_DEBUG("%s cancelled due to unsubscribe", sig->get_name().c_str());}
else
{
- WARNING("signal: %s isn't supported. Canceling operation.", sig->get_name().c_str());
+ AFB_WARNING("signal: %s isn't supported. Canceling operation.", sig->get_name().c_str());
return -1;
}
}
@@ -246,7 +246,7 @@ static int subscribe_unsubscribe_can_signals(struct afb_req request, bool subscr
{return -1;}
rets++;
- DEBUG("signal: %s subscribed", sig->get_name().c_str());
+ AFB_DEBUG("signal: %s subscribed", sig->get_name().c_str());
}
return rets;
}
@@ -308,7 +308,7 @@ static int one_subscribe_unsubscribe(struct afb_req request, bool subscribe, con
openxc_DynamicField search_key = build_DynamicField(tag);
sf = utils::signals_manager_t::instance().find_signals(search_key);
if (sf.can_signals.empty() && sf.diagnostic_messages.empty())
- NOTICE("No signal(s) found for %s.", tag.c_str());
+ AFB_NOTICE("No signal(s) found for %s.", tag.c_str());
else
ret = subscribe_unsubscribe_signals(request, subscribe, sf, event_filter);