tool/MasterDevice.cpp
changeset 2004 be807e224b0e
parent 1966 23c638a81fe7
child 2421 bc2d4bf9cbe5
--- a/tool/MasterDevice.cpp	Fri Nov 26 11:23:19 2010 +0100
+++ b/tool/MasterDevice.cpp	Sat Nov 27 17:02:54 2010 +0100
@@ -200,6 +200,24 @@
 
 /****************************************************************************/
 
+void MasterDevice::getConfigIdn(
+        ec_ioctl_config_idn_t *data,
+        unsigned int index,
+        unsigned int pos
+        )
+{
+    data->config_index = index;
+    data->idn_pos = pos;
+
+    if (ioctl(fd, EC_IOCTL_CONFIG_IDN, data) < 0) {
+        stringstream err;
+        err << "Failed to get slave config IDN: " << strerror(errno);
+        throw MasterDeviceException(err);
+    }
+}
+
+/****************************************************************************/
+
 void MasterDevice::getDomain(ec_ioctl_domain_t *data, unsigned int index)
 {
     data->index = index;