Show complete access flag in config view. stable-1.5
authorFlorian Pose <fp@igh-essen.com>
Tue, 09 Oct 2012 09:52:50 +0200
branchstable-1.5
changeset 2435 4151f6f4c3e1
parent 2434 fa52128477f6
child 2436 960cc1bb6b4a
Show complete access flag in config view.
master/ioctl.c
master/ioctl.h
tool/CommandConfig.cpp
--- a/master/ioctl.c	Thu Oct 04 10:07:52 2012 +0200
+++ b/master/ioctl.c	Tue Oct 09 09:52:50 2012 +0200
@@ -1350,6 +1350,7 @@
     ioctl->size = req->data_size;
     memcpy(ioctl->data, req->data,
             min((u32) ioctl->size, (u32) EC_MAX_SDO_DATA_SIZE));
+    ioctl->complete_access = req->complete_access;
 
     up(&master->master_sem);
 
--- a/master/ioctl.h	Thu Oct 04 10:07:52 2012 +0200
+++ b/master/ioctl.h	Tue Oct 09 09:52:50 2012 +0200
@@ -56,7 +56,7 @@
  *
  * Increment this when changing the ioctl interface!
  */
-#define EC_IOCTL_VERSION_MAGIC 19
+#define EC_IOCTL_VERSION_MAGIC 20
 
 // Command-line tool
 #define EC_IOCTL_MODULE                EC_IOR(0x00, ec_ioctl_module_t)
@@ -528,6 +528,7 @@
     uint8_t subindex;
     uint32_t size;
     uint8_t data[EC_MAX_SDO_DATA_SIZE];
+    uint8_t complete_access;
 } ec_ioctl_config_sdo_t;
 
 /*****************************************************************************/
--- a/tool/CommandConfig.cpp	Thu Oct 04 10:07:52 2012 +0200
+++ b/tool/CommandConfig.cpp	Tue Oct 09 09:52:50 2012 +0200
@@ -236,9 +236,14 @@
 
                 cout << indent << "  0x"
                     << hex << setfill('0')
-                    << setw(4) << sdo.index << ":"
-                    << setw(2) << (unsigned int) sdo.subindex
-                    << ", " << dec << sdo.size << " byte" << endl;
+                    << setw(4) << sdo.index;
+                if (sdo.complete_access) {
+                    cout << " C";
+                }
+                else {
+                    cout << ":" << setw(2) << (unsigned int) sdo.subindex;
+                }
+                cout << ", " << dec << sdo.size << " byte" << endl;
 
                 cout << indent << "    " << hex;
                 for (i = 0; i < min((uint32_t) sdo.size,