tool/MasterDevice.cpp
changeset 1335 09c6fce1ae45
parent 1327 4d179b06dd3c
child 1363 11c0b2caa253
--- a/tool/MasterDevice.cpp	Mon Jan 26 11:59:32 2009 +0000
+++ b/tool/MasterDevice.cpp	Mon Jan 26 13:01:58 2009 +0000
@@ -372,6 +372,32 @@
 
 /****************************************************************************/
 
+void MasterDevice::readFoe(
+        ec_ioctl_slave_foe_t *data
+        )
+{
+    if (ioctl(fd, EC_IOCTL_SLAVE_FOE_READ, data) < 0) {
+        stringstream err;
+        err << "Failed to read via FoE: " << strerror(errno);
+        throw MasterDeviceException(err);
+    }
+}
+
+/****************************************************************************/
+
+void MasterDevice::writeFoe(
+        ec_ioctl_slave_foe_t *data
+        )
+{
+    if (ioctl(fd, EC_IOCTL_SLAVE_FOE_WRITE, data) < 0) {
+        stringstream err;
+        err << "Failed to write via FoE: " << strerror(errno);
+        throw MasterDeviceException(err);
+    }
+}
+
+/****************************************************************************/
+
 void MasterDevice::setDebug(unsigned int debugLevel)
 {
     if (ioctl(fd, EC_IOCTL_MASTER_DEBUG, debugLevel) < 0) {