Altered CoE "Get object description response" fields

This commit is contained in:
Florian Pose 2006-04-10 10:50:45 +00:00
parent b0ba46e9c9
commit 02493380b0
3 changed files with 10 additions and 8 deletions

View File

@ -268,8 +268,8 @@ int ec_slave_fetch_sdo_list(ec_slave_t *slave /**< EtherCAT-Slave */)
// 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 @@ int ec_slave_fetch_sdo_descriptions(ec_slave_t *slave /**< EtherCAT-Slave */)
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) {

View File

@ -1059,8 +1059,7 @@ void ec_slave_print(const ec_slave_t *slave, /**< EtherCAT-Slave */
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,

View File

@ -157,8 +157,8 @@ typedef struct
{
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;
}