include/ecrt.h
changeset 1020 9bf2ddf05e17
parent 1010 6672b86e7b10
child 1022 8e49b519e6ba
--- a/include/ecrt.h	Wed Jun 18 08:59:00 2008 +0000
+++ b/include/ecrt.h	Wed Jun 18 09:26:46 2008 +0000
@@ -152,21 +152,42 @@
 /** Master state.
  *
  * This is used for the output parameter of ecrt_master_state().
+ *
+ * \see ecrt_master_state().
  */
 typedef struct {
     unsigned int slaves_responding; /**< Number of slaves in the bus. */
+    uint8_t slave_states; /**< Application-layer states of all slaves.
+                            The states are coded in the lower 4 bits. If a bit
+                            is set, it means that at least one slave in the
+                            bus is in the corresponding state:
+                            - Bit 0: \a INIT
+                            - Bit 1: \a PREOP
+                            - Bit 2: \a SAFEOP
+                            - Bit 3: \a OP */
+    uint8_t link_up; /**< \a true, if the network link is up. */
 } ec_master_state_t;
 
 /*****************************************************************************/
 
 /** Slave configuration state.
  *
+ * This is used as an output parameter of ecrt_slave_config_state().
+ * 
  * \see ecrt_slave_config_state().
  */
 typedef struct  {
+    uint8_t slave_state; /**< The application-layer state of the slave.
+                           - 1: \a INIT
+                           - 2: \a PREOP
+                           - 4: \a SAFEOP
+                           - 8: \a OP
+
+                           Note that each state is coded in a different
+                           bit! */
     unsigned int online : 1; /**< The slave is online. */
-    unsigned int configured : 1; /**< The slave was configured according to
-                                   the specified configuration. */
+    unsigned int operational : 1; /**< The slave was brought into \a OP state
+                                    using the specified configuration. */
 } ec_slave_config_state_t;
 
 /*****************************************************************************/