summaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/utils
diff options
context:
space:
mode:
Diffstat (limited to 'CAN-binder/low-can-binding/utils')
-rw-r--r--CAN-binder/low-can-binding/utils/config-parser.cpp4
-rw-r--r--CAN-binder/low-can-binding/utils/signals.cpp4
-rw-r--r--CAN-binder/low-can-binding/utils/socketcan-bcm.cpp10
-rw-r--r--CAN-binder/low-can-binding/utils/socketcan-raw.cpp10
-rw-r--r--CAN-binder/low-can-binding/utils/socketcan.hpp2
5 files changed, 15 insertions, 15 deletions
diff --git a/CAN-binder/low-can-binding/utils/config-parser.cpp b/CAN-binder/low-can-binding/utils/config-parser.cpp
index 3f338121..8ccf5bcb 100644
--- a/CAN-binder/low-can-binding/utils/config-parser.cpp
+++ b/CAN-binder/low-can-binding/utils/config-parser.cpp
@@ -39,10 +39,10 @@ namespace utils
{
if (config_content_.size() <= 0)
{
- ERROR(binder_interface, "%s: Can't load the INI config file.", __FUNCTION__);
+ ERROR("Can't load the INI config file.");
return false;
}
- DEBUG(binder_interface, "%s: Configuration file parsed", __FUNCTION__);
+ DEBUG("Configuration file parsed");
return true;
}
diff --git a/CAN-binder/low-can-binding/utils/signals.cpp b/CAN-binder/low-can-binding/utils/signals.cpp
index 703b8171..fbc49044 100644
--- a/CAN-binder/low-can-binding/utils/signals.cpp
+++ b/CAN-binder/low-can-binding/utils/signals.cpp
@@ -68,10 +68,10 @@ namespace utils
lookup_signals_by_id(key.numeric_value, application_t::instance().get_diagnostic_messages(), sf.diagnostic_messages);
break;
default:
- ERROR(binder_interface, "%s: wrong openxc_DynamicField specified. Use openxc_DynamicField_Type_NUM or openxc_DynamicField_Type_STRING type only.", __FUNCTION__);
+ ERROR("wrong openxc_DynamicField specified. Use openxc_DynamicField_Type_NUM or openxc_DynamicField_Type_STRING type only.");
break;
}
- DEBUG(binder_interface, "%s: Found %d signal(s)", __FUNCTION__, (int)(sf.can_signals.size() + sf.diagnostic_messages.size()));
+ DEBUG("Found %d signal(s)", (int)(sf.can_signals.size() + sf.diagnostic_messages.size()));
return sf;
}
} \ No newline at end of file
diff --git a/CAN-binder/low-can-binding/utils/socketcan-bcm.cpp b/CAN-binder/low-can-binding/utils/socketcan-bcm.cpp
index 5ee4b1aa..e16b246f 100644
--- a/CAN-binder/low-can-binding/utils/socketcan-bcm.cpp
+++ b/CAN-binder/low-can-binding/utils/socketcan-bcm.cpp
@@ -45,10 +45,10 @@ namespace utils
// Attempts to open a socket to CAN bus
::strcpy(ifr.ifr_name, device_name.c_str());
- DEBUG(binder_interface, "%s: BCM socket ifr_name is : %s", __FUNCTION__, ifr.ifr_name);
+ DEBUG("BCM socket ifr_name is : %s", ifr.ifr_name);
if(::ioctl(socket_, SIOCGIFINDEX, &ifr) < 0)
{
- ERROR(binder_interface, "%s: ioctl failed. Error was : %s", __FUNCTION__, strerror(errno));
+ ERROR("ioctl failed. Error was : %s", strerror(errno));
close();
}
else
@@ -58,7 +58,7 @@ namespace utils
if(connect((struct sockaddr *)&tx_address_, sizeof(tx_address_)) < 0)
{
- ERROR(binder_interface, "%s: Connect failed. %s", __FUNCTION__, strerror(errno));
+ ERROR("Connect failed. %s", strerror(errno));
close();
}
// Needed because of using systemD event loop. See sd_event_add_io manual.
@@ -84,8 +84,8 @@ namespace utils
ioctl(s.socket(), SIOCGIFNAME, &ifr);
long unsigned int frame_size = nbytes-sizeof(struct bcm_msg_head);
- DEBUG(binder_interface, "Data available: %li bytes read. BCM head, opcode: %i, can_id: %i, nframes: %i", frame_size, msg.msg_head.opcode, msg.msg_head.can_id, msg.msg_head.nframes);
- DEBUG(binder_interface, "read: Found on bus %s:\n id: %X, length: %X, data %02X%02X%02X%02X%02X%02X%02X%02X", ifr.ifr_name, msg.msg_head.can_id, msg.frames.can_dlc,
+ DEBUG("Data available: %li bytes read. BCM head, opcode: %i, can_id: %i, nframes: %i", frame_size, msg.msg_head.opcode, msg.msg_head.can_id, msg.msg_head.nframes);
+ DEBUG("read: Found on bus %s:\n id: %X, length: %X, data %02X%02X%02X%02X%02X%02X%02X%02X", ifr.ifr_name, msg.msg_head.can_id, msg.frames.can_dlc,
msg.frames.data[0], msg.frames.data[1], msg.frames.data[2], msg.frames.data[3], msg.frames.data[4], msg.frames.data[5], msg.frames.data[6], msg.frames.data[7]);
struct timeval tv;
diff --git a/CAN-binder/low-can-binding/utils/socketcan-raw.cpp b/CAN-binder/low-can-binding/utils/socketcan-raw.cpp
index a35a99d4..31965c3d 100644
--- a/CAN-binder/low-can-binding/utils/socketcan-raw.cpp
+++ b/CAN-binder/low-can-binding/utils/socketcan-raw.cpp
@@ -42,10 +42,10 @@ namespace utils
// Attempts to open a socket to CAN bus
::strcpy(ifr.ifr_name, device_name.c_str());
- DEBUG(binder_interface, "%s: ifr_name is : %s", __FUNCTION__, ifr.ifr_name);
+ DEBUG("ifr_name is : %s", ifr.ifr_name);
if(::ioctl(socket_, SIOCGIFINDEX, &ifr) < 0)
{
- ERROR(binder_interface, "%s: ioctl failed. Error was : %s", __FUNCTION__, strerror(errno));
+ ERROR("ioctl failed. Error was : %s", strerror(errno));
close();
}
else
@@ -55,7 +55,7 @@ namespace utils
if(bind((struct sockaddr *)&tx_address_, sizeof(tx_address_)) < 0)
{
- ERROR(binder_interface, "%s: Bind failed. %s", __FUNCTION__, strerror(errno));
+ ERROR("Bind failed. %s", strerror(errno));
close();
}
}
@@ -74,8 +74,8 @@ namespace utils
ifr.ifr_ifindex = addr.can_ifindex;
ioctl(s.socket(), SIOCGIFNAME, &ifr);
- DEBUG(binder_interface, "Data available: %i bytes read", (int)nbytes);
- DEBUG(binder_interface, "read: Found on bus %s:\n id: %X, length: %X, data %02X%02X%02X%02X%02X%02X%02X%02X", ifr.ifr_name, frame.can_id, frame.len,
+ DEBUG("Data available: %i bytes read", (int)nbytes);
+ DEBUG("read: Found on bus %s:\n id: %X, length: %X, data %02X%02X%02X%02X%02X%02X%02X%02X", ifr.ifr_name, frame.can_id, frame.len,
frame.data[0], frame.data[1], frame.data[2], frame.data[3], frame.data[4], frame.data[5], frame.data[6], frame.data[7]);
struct timeval tv;
diff --git a/CAN-binder/low-can-binding/utils/socketcan.hpp b/CAN-binder/low-can-binding/utils/socketcan.hpp
index 8300e6b5..82b797e0 100644
--- a/CAN-binder/low-can-binding/utils/socketcan.hpp
+++ b/CAN-binder/low-can-binding/utils/socketcan.hpp
@@ -65,7 +65,7 @@ namespace utils
socketcan_t& operator<<(socketcan_t& s, const T& obj)
{
if (::sendto(s.socket(), &obj, sizeof(obj), 0, (const struct sockaddr*)&s.get_tx_address(), sizeof(s.get_tx_address())) < 0)
- ERROR(binder_interface, "%s: Error sending : %i %s", __FUNCTION__, errno, ::strerror(errno));
+ ERROR("Error sending : %i %s", errno, ::strerror(errno));
return s;
}
}