150 /*****************************************************************************/ |
150 /*****************************************************************************/ |
151 |
151 |
152 /** Master state. |
152 /** Master state. |
153 * |
153 * |
154 * This is used for the output parameter of ecrt_master_state(). |
154 * This is used for the output parameter of ecrt_master_state(). |
|
155 * |
|
156 * \see ecrt_master_state(). |
155 */ |
157 */ |
156 typedef struct { |
158 typedef struct { |
157 unsigned int slaves_responding; /**< Number of slaves in the bus. */ |
159 unsigned int slaves_responding; /**< Number of slaves in the bus. */ |
|
160 uint8_t slave_states; /**< Application-layer states of all slaves. |
|
161 The states are coded in the lower 4 bits. If a bit |
|
162 is set, it means that at least one slave in the |
|
163 bus is in the corresponding state: |
|
164 - Bit 0: \a INIT |
|
165 - Bit 1: \a PREOP |
|
166 - Bit 2: \a SAFEOP |
|
167 - Bit 3: \a OP */ |
|
168 uint8_t link_up; /**< \a true, if the network link is up. */ |
158 } ec_master_state_t; |
169 } ec_master_state_t; |
159 |
170 |
160 /*****************************************************************************/ |
171 /*****************************************************************************/ |
161 |
172 |
162 /** Slave configuration state. |
173 /** Slave configuration state. |
163 * |
174 * |
|
175 * This is used as an output parameter of ecrt_slave_config_state(). |
|
176 * |
164 * \see ecrt_slave_config_state(). |
177 * \see ecrt_slave_config_state(). |
165 */ |
178 */ |
166 typedef struct { |
179 typedef struct { |
|
180 uint8_t slave_state; /**< The application-layer state of the slave. |
|
181 - 1: \a INIT |
|
182 - 2: \a PREOP |
|
183 - 4: \a SAFEOP |
|
184 - 8: \a OP |
|
185 |
|
186 Note that each state is coded in a different |
|
187 bit! */ |
167 unsigned int online : 1; /**< The slave is online. */ |
188 unsigned int online : 1; /**< The slave is online. */ |
168 unsigned int configured : 1; /**< The slave was configured according to |
189 unsigned int operational : 1; /**< The slave was brought into \a OP state |
169 the specified configuration. */ |
190 using the specified configuration. */ |
170 } ec_slave_config_state_t; |
191 } ec_slave_config_state_t; |
171 |
192 |
172 /*****************************************************************************/ |
193 /*****************************************************************************/ |
173 |
194 |
174 /** Domain working counter interpretation. |
195 /** Domain working counter interpretation. |