Added datagram state to "Failed to receive..." messages.
authorFlorian Pose <fp@igh-essen.com>
Thu, 22 Feb 2007 13:39:19 +0000
changeset 594 07dd2a7df66e
parent 593 78c838980258
child 595 6dd7156e96ba
Added datagram state to "Failed to receive..." messages.
master/fsm_change.c
master/fsm_coe.c
master/fsm_master.c
master/fsm_sii.c
master/fsm_slave.c
--- a/master/fsm_change.c	Thu Feb 22 10:15:02 2007 +0000
+++ b/master/fsm_change.c	Thu Feb 22 13:39:19 2007 +0000
@@ -182,8 +182,9 @@
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_change_state_error;
-        EC_ERR("Failed to receive state datagram from slave %i!\n",
-               fsm->slave->ring_position);
+        EC_ERR("Failed to receive state datagram from slave %i"
+                " (datagram state %i)!\n",
+               fsm->slave->ring_position, datagram->state);
         return;
     }
 
@@ -238,8 +239,9 @@
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_change_state_error;
-        EC_ERR("Failed to receive state checking datagram from slave %i.\n",
-               slave->ring_position);
+        EC_ERR("Failed to receive state checking datagram from slave %i"
+                " (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
@@ -374,8 +376,9 @@
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_change_state_error;
-        EC_ERR("Failed to receive AL status code datagram from slave %i.\n",
-               fsm->slave->ring_position);
+        EC_ERR("Failed to receive AL status code datagram from slave %i"
+                " (datagram state %i).\n",
+               fsm->slave->ring_position, datagram->state);
         return;
     }
 
@@ -436,8 +439,9 @@
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_change_state_error;
-        EC_ERR("Failed to receive state ack datagram for slave %i.\n",
-               slave->ring_position);
+        EC_ERR("Failed to receive state ack datagram for slave %i"
+                " (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
@@ -476,8 +480,9 @@
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_change_state_error;
-        EC_ERR("Failed to receive state ack check datagram from slave %i.\n",
-               slave->ring_position);
+        EC_ERR("Failed to receive state ack check datagram from slave %i"
+                " (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
--- a/master/fsm_coe.c	Thu Feb 22 10:15:02 2007 +0000
+++ b/master/fsm_coe.c	Thu Feb 22 13:39:19 2007 +0000
@@ -286,7 +286,8 @@
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_coe_error;
         EC_ERR("Failed to receive CoE dictionary request datagram for"
-               " slave %i.\n", slave->ring_position);
+               " slave %i (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
@@ -323,8 +324,9 @@
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_coe_error;
-        EC_ERR("Failed to receive CoE mailbox check datagram for slave %i.\n",
-               slave->ring_position);
+        EC_ERR("Failed to receive CoE mailbox check datagram for slave %i"
+                " (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
@@ -384,7 +386,8 @@
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_coe_error;
         EC_ERR("Failed to receive CoE dictionary response datagram for"
-               " slave %i.\n", slave->ring_position);
+               " slave %i (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
@@ -513,7 +516,8 @@
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_coe_error;
         EC_ERR("Failed to receive CoE SDO description request datagram for"
-               " slave %i.\n", slave->ring_position);
+               " slave %i (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
@@ -550,8 +554,9 @@
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_coe_error;
-        EC_ERR("Failed to receive CoE mailbox check datagram from slave %i.\n",
-               slave->ring_position);
+        EC_ERR("Failed to receive CoE mailbox check datagram from slave %i"
+                " (datagram state %i).\n",
+                slave->ring_position, datagram->state);
         return;
     }
 
@@ -609,7 +614,8 @@
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_coe_error;
         EC_ERR("Failed to receive CoE SDO description response datagram from"
-               " slave %i.\n", slave->ring_position);
+               " slave %i (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
@@ -725,7 +731,8 @@
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_coe_error;
         EC_ERR("Failed to receive CoE SDO entry request datagram for"
-               " slave %i.\n", slave->ring_position);
+               " slave %i (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
@@ -763,8 +770,9 @@
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_coe_error;
-        EC_ERR("Failed to receive CoE mailbox check datagram from slave %i.\n",
-               slave->ring_position);
+        EC_ERR("Failed to receive CoE mailbox check datagram from slave %i"
+                " (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
@@ -823,7 +831,8 @@
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_coe_error;
         EC_ERR("Failed to receive CoE SDO description response datagram from"
-               " slave %i.\n", slave->ring_position);
+               " slave %i (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
@@ -1018,7 +1027,8 @@
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_coe_error;
         EC_ERR("Failed to receive CoE download request datagram for"
-               " slave %i.\n", slave->ring_position);
+               " slave %i (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
@@ -1055,8 +1065,9 @@
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_coe_error;
-        EC_ERR("Failed to receive CoE mailbox check datagram for slave %i.\n",
-               slave->ring_position);
+        EC_ERR("Failed to receive CoE mailbox check datagram for slave %i"
+                " (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
@@ -1113,7 +1124,8 @@
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_coe_error;
         EC_ERR("Failed to receive CoE download response datagram from"
-               " slave %i.\n", slave->ring_position);
+               " slave %i (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
@@ -1235,8 +1247,9 @@
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_coe_error;
-        EC_ERR("Failed to receive CoE upload request for slave %i.\n",
-               slave->ring_position);
+        EC_ERR("Failed to receive CoE upload request for slave %i"
+                " (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
@@ -1273,8 +1286,9 @@
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_coe_error;
-        EC_ERR("Failed to receive CoE mailbox check datagram from slave %i.\n",
-               slave->ring_position);
+        EC_ERR("Failed to receive CoE mailbox check datagram from slave %i"
+                " (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
@@ -1336,7 +1350,8 @@
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_coe_error;
         EC_ERR("Failed to receive CoE upload response datagram for"
-               " slave %i.\n", slave->ring_position);
+               " slave %i (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
@@ -1484,7 +1499,8 @@
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_coe_error;
         EC_ERR("Failed to receive CoE upload segment request datagram for"
-               " slave %i.\n", slave->ring_position);
+               " slave %i (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
@@ -1521,8 +1537,9 @@
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_coe_error;
-        EC_ERR("Failed to receive CoE mailbox check datagram for slave %i.\n",
-               slave->ring_position);
+        EC_ERR("Failed to receive CoE mailbox check datagram for slave %i"
+                " (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
@@ -1584,7 +1601,8 @@
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_coe_error;
         EC_ERR("Failed to receive CoE upload segment response datagram for"
-               " slave %i.\n", slave->ring_position);
+               " slave %i (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
--- a/master/fsm_master.c	Thu Feb 22 10:15:02 2007 +0000
+++ b/master/fsm_master.c	Thu Feb 22 13:39:19 2007 +0000
@@ -458,8 +458,8 @@
     }
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
-        EC_ERR("Failed to receive AL state datagram for slave %i!\n",
-               slave->ring_position);
+        EC_ERR("Failed to receive AL state datagram for slave %i"
+                " (datagram state %i)\n", slave->ring_position, datagram->state);
         fsm->state = ec_fsm_master_state_error;
         return;
     }
@@ -664,8 +664,9 @@
     }
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
-        EC_ERR("Failed to receive address datagram for slave %i.\n",
-               slave->ring_position);
+        EC_ERR("Failed to receive address datagram for slave %i"
+                " (datagram state %i).\n",
+                slave->ring_position, datagram->state);
         fsm->state = ec_fsm_master_state_error;
         return;
     }
--- a/master/fsm_sii.c	Thu Feb 22 10:15:02 2007 +0000
+++ b/master/fsm_sii.c	Thu Feb 22 13:39:19 2007 +0000
@@ -191,8 +191,9 @@
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_sii_error;
-        EC_ERR("Failed to receive SII read datagram from slave %i.\n",
-               fsm->slave->ring_position);
+        EC_ERR("Failed to receive SII read datagram from slave %i"
+                " (datagram state %i).\n",
+               fsm->slave->ring_position, datagram->state);
         return;
     }
 
@@ -238,8 +239,9 @@
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_sii_error;
-        EC_ERR("Failed to receive SII check/fetch datagram from slave %i.\n",
-               fsm->slave->ring_position);
+        EC_ERR("Failed to receive SII check/fetch datagram from slave %i"
+                " (datagram state %i).\n",
+               fsm->slave->ring_position, datagram->state);
         return;
     }
 
@@ -336,8 +338,9 @@
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_sii_error;
-        EC_ERR("Failed to receive SII write datagram for slave %i.\n",
-               fsm->slave->ring_position);
+        EC_ERR("Failed to receive SII write datagram for slave %i"
+                " (datagram state %i).\n",
+               fsm->slave->ring_position, datagram->state);
         return;
     }
 
@@ -375,8 +378,9 @@
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_sii_error;
-        EC_ERR("Failed to receive SII write check datagram from slave %i.\n",
-               fsm->slave->ring_position);
+        EC_ERR("Failed to receive SII write check datagram from slave %i"
+                " (datagram state %i).\n",
+               fsm->slave->ring_position, datagram->state);
         return;
     }
 
--- a/master/fsm_slave.c	Thu Feb 22 10:15:02 2007 +0000
+++ b/master/fsm_slave.c	Thu Feb 22 13:39:19 2007 +0000
@@ -215,8 +215,9 @@
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_slave_state_error;
-        EC_ERR("Failed to receive station address datagram for slave %i.\n",
-               fsm->slave->ring_position);
+        EC_ERR("Failed to receive station address datagram for slave %i"
+                " (datagram state %i)\n",
+                fsm->slave->ring_position, datagram->state);
         return;
     }
 
@@ -253,8 +254,9 @@
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_slave_state_error;
-        EC_ERR("Failed to receive AL state datagram from slave %i.\n",
-               fsm->slave->ring_position);
+        EC_ERR("Failed to receive AL state datagram from slave %i"
+                " (datagram state %i).\n",
+               fsm->slave->ring_position, datagram->state);
         return;
     }
 
@@ -299,8 +301,9 @@
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_slave_state_error;
-        EC_ERR("Failed to receive base data datagram for slave %i.\n",
-               slave->ring_position);
+        EC_ERR("Failed to receive base data datagram for slave %i"
+                " (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
@@ -348,8 +351,9 @@
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_slave_state_error;
-        EC_ERR("Failed to receive DL status datagram from slave %i.\n",
-               slave->ring_position);
+        EC_ERR("Failed to receive DL status datagram from slave %i"
+                " (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
@@ -741,7 +745,8 @@
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_slave_state_error;
         EC_ERR("Failed to receive sync manager configuration datagram for"
-               " slave %i.\n", slave->ring_position);
+               " slave %i (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
@@ -856,8 +861,8 @@
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_slave_state_error;
         EC_ERR("Failed to receive process data sync manager configuration"
-               " datagram for slave %i.\n",
-               slave->ring_position);
+               " datagram for slave %i (datagram state %i).\n",
+               slave->ring_position, datagram->state);
         return;
     }
 
@@ -921,8 +926,9 @@
 
     if (datagram->state != EC_DATAGRAM_RECEIVED) {
         fsm->state = ec_fsm_slave_state_error;
-        EC_ERR("Failed to receive FMMUs datagram for slave %i.\n",
-               fsm->slave->ring_position);
+        EC_ERR("Failed to receive FMMUs datagram for slave %i"
+                " (datagram state %i).\n",
+               fsm->slave->ring_position, datagram->state);
         return;
     }