Altered CoE "Get object description response" fields
authorFlorian Pose <fp@igh-essen.com>
Mon, 10 Apr 2006 10:50:45 +0000
changeset 175 2e4b18203ade
parent 174 99907332ff1e
child 176 1ac0fc378b95
Altered CoE "Get object description response" fields
master/canopen.c
master/slave.c
master/slave.h
--- a/master/canopen.c	Mon Apr 10 07:29:53 2006 +0000
+++ b/master/canopen.c	Mon Apr 10 10:50:45 2006 +0000
@@ -268,8 +268,8 @@
 
             // Initialize SDO object
             sdo->index = sdo_index;
-            sdo->type = 0x0000;
-            sdo->features = 0x00;
+            //sdo->unkown = 0x0000;
+            sdo->object_code = 0x00;
             sdo->name = NULL;
             INIT_LIST_HEAD(&sdo->entries);
 
@@ -332,8 +332,11 @@
             return -1;
         }
 
-        sdo->type = EC_READ_U16(data + 8);
-        sdo->features = EC_READ_U8(data + 11);
+        EC_DBG("object desc response:\n");
+        ec_print_data(data, rec_size);
+
+        //sdo->unknown = EC_READ_U16(data + 8);
+        sdo->object_code = EC_READ_U8(data + 11);
 
         name_size = rec_size - 12;
         if (name_size) {
--- a/master/slave.c	Mon Apr 10 07:29:53 2006 +0000
+++ b/master/slave.c	Mon Apr 10 10:50:45 2006 +0000
@@ -1059,8 +1059,7 @@
         list_for_each_entry(sdo, &slave->sdo_dictionary, list) {
             EC_INFO("      0x%04X \"%s\"\n", sdo->index,
                     sdo->name ? sdo->name : "");
-            EC_INFO("        Type 0x%04X, features: 0x%02X\n",
-                    sdo->type, sdo->features);
+            EC_INFO("        Object code: 0x%02X\n", sdo->object_code);
             list_for_each_entry(sdo_entry, &sdo->entries, list) {
                 EC_INFO("        0x%04X:%i \"%s\", type 0x%04X, %i bits\n",
                         sdo->index, sdo_entry->subindex,
--- a/master/slave.h	Mon Apr 10 07:29:53 2006 +0000
+++ b/master/slave.h	Mon Apr 10 10:50:45 2006 +0000
@@ -157,8 +157,8 @@
 {
     struct list_head list;
     uint16_t index;
-    uint16_t type;
-    uint8_t features;
+    //uint16_t type;
+    uint8_t object_code;
     char *name;
     struct list_head entries;
 }