Renamed SII fetching functions (non-functional).
--- a/master/fsm_slave.c Tue Mar 06 09:15:12 2007 +0000
+++ b/master/fsm_slave.c Tue Mar 06 10:37:56 2007 +0000
@@ -508,27 +508,31 @@
switch (cat_type) {
case 0x000A:
- if (ec_slave_fetch_strings(slave, (uint8_t *) (cat_word + 2)))
+ if (ec_slave_fetch_sii_strings(
+ slave, (uint8_t *) (cat_word + 2)))
goto end;
break;
case 0x001E:
- ec_slave_fetch_general(slave, (uint8_t *) (cat_word + 2));
+ ec_slave_fetch_sii_general(
+ slave, (uint8_t *) (cat_word + 2));
break;
case 0x0028:
break;
case 0x0029:
- if (ec_slave_fetch_sync(slave, (uint8_t *) (cat_word + 2),
- cat_size))
+ if (ec_slave_fetch_sii_syncs(
+ slave, (uint8_t *) (cat_word + 2), cat_size))
goto end;
break;
case 0x0032:
- if (ec_slave_fetch_pdo(slave, (uint8_t *) (cat_word + 2),
- cat_size, EC_TX_PDO))
+ if (ec_slave_fetch_sii_pdos(
+ slave, (uint8_t *) (cat_word + 2),
+ cat_size, EC_TX_PDO))
goto end;
break;
case 0x0033:
- if (ec_slave_fetch_pdo(slave, (uint8_t *) (cat_word + 2),
- cat_size, EC_RX_PDO))
+ if (ec_slave_fetch_sii_pdos(
+ slave, (uint8_t *) (cat_word + 2),
+ cat_size, EC_RX_PDO))
goto end;
break;
default:
--- a/master/slave.c Tue Mar 06 09:15:12 2007 +0000
+++ b/master/slave.c Tue Mar 06 10:37:56 2007 +0000
@@ -400,9 +400,10 @@
\return 0 in case of success, else < 0
*/
-int ec_slave_fetch_strings(ec_slave_t *slave, /**< EtherCAT slave */
- const uint8_t *data /**< category data */
- )
+int ec_slave_fetch_sii_strings(
+ ec_slave_t *slave, /**< EtherCAT slave */
+ const uint8_t *data /**< category data */
+ )
{
unsigned int string_count, i;
size_t size;
@@ -438,16 +439,17 @@
\return 0 in case of success, else < 0
*/
-void ec_slave_fetch_general(ec_slave_t *slave, /**< EtherCAT slave */
- const uint8_t *data /**< category data */
- )
+void ec_slave_fetch_sii_general(
+ ec_slave_t *slave, /**< EtherCAT slave */
+ const uint8_t *data /**< category data */
+ )
{
unsigned int i;
- ec_slave_locate_string(slave, data[0], &slave->sii_group);
- ec_slave_locate_string(slave, data[1], &slave->sii_image);
- ec_slave_locate_string(slave, data[2], &slave->sii_order);
- ec_slave_locate_string(slave, data[3], &slave->sii_name);
+ ec_slave_locate_sii_string(slave, data[0], &slave->sii_group);
+ ec_slave_locate_sii_string(slave, data[1], &slave->sii_image);
+ ec_slave_locate_sii_string(slave, data[2], &slave->sii_order);
+ ec_slave_locate_sii_string(slave, data[3], &slave->sii_name);
for (i = 0; i < 4; i++)
slave->sii_physical_layer[i] =
@@ -463,10 +465,11 @@
\return 0 in case of success, else < 0
*/
-int ec_slave_fetch_sync(ec_slave_t *slave, /**< EtherCAT slave */
- const uint8_t *data, /**< category data */
- size_t word_count /**< number of words */
- )
+int ec_slave_fetch_sii_syncs(
+ ec_slave_t *slave, /**< EtherCAT slave */
+ const uint8_t *data, /**< category data */
+ size_t word_count /**< number of words */
+ )
{
unsigned int i;
ec_sii_sync_t *sync;
@@ -502,11 +505,12 @@
\return 0 in case of success, else < 0
*/
-int ec_slave_fetch_pdo(ec_slave_t *slave, /**< EtherCAT slave */
- const uint8_t *data, /**< category data */
- size_t word_count, /**< number of words */
- ec_sii_pdo_type_t pdo_type /**< PDO type */
- )
+int ec_slave_fetch_sii_pdos(
+ ec_slave_t *slave, /**< EtherCAT slave */
+ const uint8_t *data, /**< category data */
+ size_t word_count, /**< number of words */
+ ec_sii_pdo_type_t pdo_type /**< PDO type */
+ )
{
ec_sii_pdo_t *pdo;
ec_sii_pdo_entry_t *entry;
@@ -526,7 +530,7 @@
entry_count = EC_READ_U8(data + 2);
pdo->sync_index = EC_READ_U8(data + 3);
pdo->name = NULL;
- ec_slave_locate_string(slave, EC_READ_U8(data + 5), &pdo->name);
+ ec_slave_locate_sii_string(slave, EC_READ_U8(data + 5), &pdo->name);
list_add_tail(&pdo->list, &slave->sii_pdos);
@@ -543,7 +547,8 @@
entry->index = EC_READ_U16(data);
entry->subindex = EC_READ_U8(data + 2);
entry->name = NULL;
- ec_slave_locate_string(slave, EC_READ_U8(data + 3), &entry->name);
+ ec_slave_locate_sii_string(
+ slave, EC_READ_U8(data + 3), &entry->name);
entry->bit_length = EC_READ_U8(data + 5);
list_add_tail(&entry->list, &pdo->entries);
@@ -564,10 +569,11 @@
\todo documentation
*/
-int ec_slave_locate_string(ec_slave_t *slave, /**< EtherCAT slave */
- unsigned int index, /**< string index */
- char **ptr /**< Address of the string pointer */
- )
+int ec_slave_locate_sii_string(
+ ec_slave_t *slave, /**< EtherCAT slave */
+ unsigned int index, /**< string index */
+ char **ptr /**< Address of the string pointer */
+ )
{
ec_sii_string_t *string;
char *err_string;
--- a/master/slave.h Tue Mar 06 09:15:12 2007 +0000
+++ b/master/slave.h Tue Mar 06 10:37:56 2007 +0000
@@ -276,14 +276,14 @@
void ec_slave_set_online_state(ec_slave_t *, ec_slave_online_state_t);
// SII categories
-int ec_slave_fetch_strings(ec_slave_t *, const uint8_t *);
-void ec_slave_fetch_general(ec_slave_t *, const uint8_t *);
-int ec_slave_fetch_sync(ec_slave_t *, const uint8_t *, size_t);
-int ec_slave_fetch_pdo(ec_slave_t *, const uint8_t *, size_t,
- ec_sii_pdo_type_t);
-int ec_slave_locate_string(ec_slave_t *, unsigned int, char **);
+int ec_slave_fetch_sii_strings(ec_slave_t *, const uint8_t *);
+void ec_slave_fetch_sii_general(ec_slave_t *, const uint8_t *);
+int ec_slave_fetch_sii_syncs(ec_slave_t *, const uint8_t *, size_t);
+int ec_slave_fetch_sii_pdos(ec_slave_t *, const uint8_t *, size_t,
+ ec_sii_pdo_type_t);
// misc.
+int ec_slave_locate_sii_string(ec_slave_t *, unsigned int, char **);
ec_sii_sync_t *ec_slave_get_pdo_sync(ec_slave_t *, ec_direction_t);
void ec_slave_sync_config(const ec_slave_t *, const ec_sii_sync_t *,
uint8_t *);