Renamed subindices to max_subindex.
authorFlorian Pose <fp@igh-essen.com>
Fri, 06 Jun 2008 09:15:56 +0000
changeset 962 ea83a7aab57a
parent 961 8aa60dd6cbc7
child 963 01702c78fe0a
Renamed subindices to max_subindex.
master/fsm_coe.c
master/sdo.c
master/sdo.h
--- a/master/fsm_coe.c	Fri Jun 06 09:12:05 2008 +0000
+++ b/master/fsm_coe.c	Fri Jun 06 09:15:56 2008 +0000
@@ -689,7 +689,7 @@
         return;
     }
 
-    sdo->subindices = EC_READ_U8(data + 10);
+    sdo->max_subindex = EC_READ_U8(data + 10);
     sdo->object_code = EC_READ_U8(data + 11);
 
     name_size = rec_size - 12;
@@ -938,7 +938,7 @@
 
     list_add_tail(&entry->list, &sdo->entries);
 
-    if (fsm->subindex < sdo->subindices) {
+    if (fsm->subindex < sdo->max_subindex) {
         fsm->subindex++;
 
         if (!(data = ec_slave_mbox_prepare_send(slave, datagram, 0x03, 10))) {
--- a/master/sdo.c	Fri Jun 06 09:12:05 2008 +0000
+++ b/master/sdo.c	Fri Jun 06 09:15:56 2008 +0000
@@ -89,7 +89,7 @@
     sdo->index = index;
     sdo->object_code = 0x00;
     sdo->name = NULL;
-    sdo->subindices = 0;
+    sdo->max_subindex = 0;
     INIT_LIST_HEAD(&sdo->entries);
 
     // Init kobject and add it to the hierarchy
@@ -189,7 +189,7 @@
 
     off += sprintf(buffer + off, "Index: 0x%04X\n", sdo->index);
     off += sprintf(buffer + off, "Name: %s\n", sdo->name ? sdo->name : "");
-    off += sprintf(buffer + off, "Subindices: %i\n", sdo->subindices);
+    off += sprintf(buffer + off, "Max subindex: %u\n", sdo->max_subindex);
 
     return off;
 }
--- a/master/sdo.h	Fri Jun 06 09:12:05 2008 +0000
+++ b/master/sdo.h	Fri Jun 06 09:15:56 2008 +0000
@@ -52,14 +52,14 @@
 /** CANopen Sdo.
  */
 struct ec_sdo {
-    struct kobject kobj; /**< kobject */
-    struct list_head list; /**< list item */
-    ec_slave_t *slave; /**< parent slave */
-    uint16_t index; /**< Sdo index */
-    uint8_t object_code; /**< object code */
-    char *name; /**< Sdo name */
-    uint8_t subindices; /**< subindices */
-    struct list_head entries; /**< entry list */
+    struct kobject kobj; /**< kobject. */
+    struct list_head list; /**< List item. */
+    ec_slave_t *slave; /**< Parent slave. */
+    uint16_t index; /**< Sdo index. */
+    uint8_t object_code; /**< Object code. */
+    char *name; /**< Sdo name. */
+    uint8_t max_subindex; /**< Maximum subindex. */
+    struct list_head entries; /**< List of entries. */
 };
 
 /*****************************************************************************/