Introducing infrastructural slaves that do not contain process data.
authorFlorian Pose <fp@igh-essen.com>
Tue, 27 Jun 2006 19:46:25 +0000
changeset 290 57a4201cbb0f
parent 289 3c121228ebe9
child 291 0b1f877cf3f1
Introducing infrastructural slaves that do not contain process data.
master/fsm.c
master/slave.c
master/types.c
master/types.h
--- a/master/fsm.c	Tue Jun 27 19:34:21 2006 +0000
+++ b/master/fsm.c	Tue Jun 27 19:46:25 2006 +0000
@@ -636,7 +636,9 @@
             }
 
             // determine initial state.
-            if ((slave->type && slave->type->special == EC_TYPE_BUS_COUPLER)) {
+            if ((slave->type &&
+		 (slave->type->special == EC_TYPE_BUS_COUPLER ||
+		  slave->type->special == EC_TYPE_INFRA))) {
                 slave->requested_state = EC_SLAVE_STATE_OP;
             }
             else {
--- a/master/slave.c	Tue Jun 27 19:34:21 2006 +0000
+++ b/master/slave.c	Tue Jun 27 19:46:25 2006 +0000
@@ -1369,6 +1369,8 @@
         if (slave->type) {
             if (slave->type->special == EC_TYPE_BUS_COUPLER)
                 return sprintf(buffer, "coupler\n");
+	    else if (slave->type->special == EC_TYPE_INFRA)
+                return sprintf(buffer, "infrastructure\n");
             else
                 return sprintf(buffer, "normal\n");
         }
--- a/master/types.c	Tue Jun 27 19:34:21 2006 +0000
+++ b/master/types.c	Tue Jun 27 19:46:25 2006 +0000
@@ -61,7 +61,7 @@
 /*****************************************************************************/
 
 const ec_slave_type_t Beckhoff_EK1110 = {
-    "Beckhoff", "EK1110", "Extension terminal", EC_TYPE_NORMAL,
+    "Beckhoff", "EK1110", "Extension terminal", EC_TYPE_INFRA,
     {NULL} // no sync managers
 };
 
--- a/master/types.h	Tue Jun 27 19:34:21 2006 +0000
+++ b/master/types.h	Tue Jun 27 19:46:25 2006 +0000
@@ -60,6 +60,7 @@
 {
     EC_TYPE_NORMAL, /**< no special slave */
     EC_TYPE_BUS_COUPLER, /**< slave is a bus coupler */
+    EC_TYPE_INFRA, /**< infrastructure slaves, that contain no process data */
     EC_TYPE_EOE /**< slave is an EoE switch */
 }
 ec_special_type_t;