tool/MasterDevice.cpp
changeset 2597 0e145bb05859
parent 2589 2b9c78543663
--- a/tool/MasterDevice.cpp	Thu Nov 06 08:55:35 2014 +0100
+++ b/tool/MasterDevice.cpp	Wed Nov 12 14:42:17 2014 +0100
@@ -585,4 +585,19 @@
     }
 }
 
+/****************************************************************************/
+
+void MasterDevice::setIpParam(ec_ioctl_slave_eoe_ip_t *data)
+{
+    if (ioctl(fd, EC_IOCTL_SLAVE_EOE_IP_PARAM, data) < 0) {
+        if (errno == EIO && data->result) {
+            throw MasterDeviceEoeException(data->result);
+        } else {
+            stringstream err;
+            err << "Failed to set IP parameters: " << strerror(errno);
+            throw MasterDeviceException(err);
+        }
+    }
+}
+
 /*****************************************************************************/