src/sync.c
changeset 217 94c3f89bc3cc
parent 215 f49e5a6b7804
child 235 f812bf6b7237
equal deleted inserted replaced
216:8ae2ae25b096 217:94c3f89bc3cc
   190     case state3:    /* get the PDO transmission type */
   190     case state3:    /* get the PDO transmission type */
   191       if (d->objdict[offsetObjdict].bSubCount <= 2) {
   191       if (d->objdict[offsetObjdict].bSubCount <= 2) {
   192 	  MSG_ERR(0x1004, "Subindex 2  not found at index ", 0x1800 + pdoNum);
   192 	  MSG_ERR(0x1004, "Subindex 2  not found at index ", 0x1800 + pdoNum);
   193 	  return 0xFF;
   193 	  return 0xFF;
   194 	}
   194 	}
   195       pTransmissionType = d->objdict[offsetObjdict].pSubindex[2].pObject;    
   195       pTransmissionType = (UNS8*) d->objdict[offsetObjdict].pSubindex[2].pObject;    
   196       MSG_WAR(0x3005, "Reading PDO at index : ", 0x1800 + pdoNum);
   196       MSG_WAR(0x3005, "Reading PDO at index : ", 0x1800 + pdoNum);
   197       status = state4; 
   197       status = state4; 
   198       break;     
   198       break;     
   199     case state4:	/* check if transmission type is after (this) SYNC */
   199     case state4:	/* check if transmission type is after (this) SYNC */
   200                         /* The message may not be transmited every SYNC but every n SYNC */      
   200                         /* The message may not be transmited every SYNC but every n SYNC */      
   213 	offsetObjdictMap++;
   213 	offsetObjdictMap++;
   214 	status = state11;
   214 	status = state11;
   215 	break;
   215 	break;
   216       }      
   216       }      
   217     case state5:	/* get PDO CobId */
   217     case state5:	/* get PDO CobId */
   218         pwCobId = d->objdict[offsetObjdict].pSubindex[1].pObject;     
   218         pwCobId = (UNS32*) d->objdict[offsetObjdict].pSubindex[1].pObject;     
   219 	MSG_WAR(0x3009, "  PDO CobId is : ", *pwCobId);
   219 	MSG_WAR(0x3009, "  PDO CobId is : ", *pwCobId);
   220 	status = state7;
   220 	status = state7;
   221 	break;     
   221 	break;     
   222     case state7:  /* get mapped objects number to transmit with this PDO */
   222     case state7:  /* get mapped objects number to transmit with this PDO */
   223       pMappingCount = d->objdict[offsetObjdictMap].pSubindex[0].pObject;
   223       pMappingCount = (UNS8*) d->objdict[offsetObjdictMap].pSubindex[0].pObject;
   224 	MSG_WAR(0x300D, "  Number of objects mapped : ",*pMappingCount );
   224 	MSG_WAR(0x300D, "  Number of objects mapped : ",*pMappingCount );
   225 	status = state8;
   225 	status = state8;
   226     case state8:	/* get mapping parameters */
   226     case state8:	/* get mapping parameters */
   227       pMappingParameter = d->objdict[offsetObjdictMap].pSubindex[prp_j + 1].pObject;
   227       pMappingParameter = (UNS32*) d->objdict[offsetObjdictMap].pSubindex[prp_j + 1].pObject;
   228 	MSG_WAR(0x300F, "  got mapping parameter : ", *pMappingParameter);
   228 	MSG_WAR(0x300F, "  got mapping parameter : ", *pMappingParameter);
   229 	MSG_WAR(0x3050, "    at index : ", 0x1A00 + pdoNum);
   229 	MSG_WAR(0x3050, "    at index : ", 0x1A00 + pdoNum);
   230 	MSG_WAR(0x3051, "    sub-index : ", prp_j + 1);
   230 	MSG_WAR(0x3051, "    sub-index : ", prp_j + 1);
   231 	status = state9;
   231 	status = state9;
   232     
   232