97 /** EtherCAT slave. |
97 /** EtherCAT slave. |
98 */ |
98 */ |
99 struct ec_slave |
99 struct ec_slave |
100 { |
100 { |
101 struct list_head list; /**< list item */ |
101 struct list_head list; /**< list item */ |
102 struct kobject kobj; /**< kobject */ |
|
103 ec_master_t *master; /**< master owning the slave */ |
102 ec_master_t *master; /**< master owning the slave */ |
104 |
103 |
105 // addresses |
104 // addresses |
106 uint16_t ring_position; /**< ring position */ |
105 uint16_t ring_position; /**< ring position */ |
107 uint16_t station_address; /**< configured station address */ |
106 uint16_t station_address; /**< configured station address */ |
129 size_t sii_nwords; /**< Size of the SII contents in words. */ |
128 size_t sii_nwords; /**< Size of the SII contents in words. */ |
130 |
129 |
131 // slave information interface |
130 // slave information interface |
132 ec_sii_t sii; /**< SII data. */ |
131 ec_sii_t sii; /**< SII data. */ |
133 |
132 |
134 struct kobject sdo_kobj; /**< kobject for Sdos */ |
|
135 struct list_head sdo_dictionary; /**< Sdo dictionary list */ |
133 struct list_head sdo_dictionary; /**< Sdo dictionary list */ |
136 uint8_t sdo_dictionary_fetched; /**< dictionary has been fetched */ |
134 uint8_t sdo_dictionary_fetched; /**< dictionary has been fetched */ |
137 unsigned long jiffies_preop; /**< time, the slave went to PREOP */ |
135 unsigned long jiffies_preop; /**< time, the slave went to PREOP */ |
138 }; |
136 }; |
139 |
137 |
140 /*****************************************************************************/ |
138 /*****************************************************************************/ |
141 |
139 |
142 // slave construction/destruction |
140 // slave construction/destruction |
143 int ec_slave_init(ec_slave_t *, ec_master_t *, uint16_t, uint16_t); |
141 void ec_slave_init(ec_slave_t *, ec_master_t *, uint16_t, uint16_t); |
144 void ec_slave_destroy(ec_slave_t *); |
142 void ec_slave_clear(ec_slave_t *); |
145 |
143 |
146 void ec_slave_clear_sync_managers(ec_slave_t *); |
144 void ec_slave_clear_sync_managers(ec_slave_t *); |
147 |
145 |
148 void ec_slave_request_state(ec_slave_t *, ec_slave_state_t); |
146 void ec_slave_request_state(ec_slave_t *, ec_slave_state_t); |
149 void ec_slave_set_state(ec_slave_t *, ec_slave_state_t); |
147 void ec_slave_set_state(ec_slave_t *, ec_slave_state_t); |