src/pdo.c
changeset 320 f82e758840bd
parent 315 1d3bf87b8658
child 350 e90113f7030b
equal deleted inserted replaced
319:4b331759169a 320:f82e758840bd
   144 **/
   144 **/
   145 UNS8 proceedPDO(CO_Data* d, Message *m)
   145 UNS8 proceedPDO(CO_Data* d, Message *m)
   146 {
   146 {
   147   UNS8   numPdo;
   147   UNS8   numPdo;
   148   UNS8   numMap;  /* Number of the mapped varable */
   148   UNS8   numMap;  /* Number of the mapped varable */
   149   UNS8 i;
       
   150   UNS8 *     pMappingCount = NULL;    /* count of mapped objects... */
   149   UNS8 *     pMappingCount = NULL;    /* count of mapped objects... */
   151   /* pointer to the var which is mapped to a pdo... */
   150   /* pointer to the var which is mapped to a pdo... */
   152   /*  void *     pMappedAppObject = NULL;   */
   151   /*  void *     pMappedAppObject = NULL;   */
   153   /* pointer fo the var which holds the mapping parameter of an
   152   /* pointer fo the var which holds the mapping parameter of an
   154      mapping entry */
   153      mapping entry */
   155   UNS32 *    pMappingParameter = NULL;
   154   UNS32 *    pMappingParameter = NULL;
   156   UNS8  *    pTransmissionType = NULL; /* pointer to the transmission
   155   UNS8  *    pTransmissionType = NULL; /* pointer to the transmission
   157                                          type */
   156                                          type */
   158   UNS32 *    pwCobId = NULL;
   157   UNS32 *    pwCobId = NULL;
   159   UNS8       Size;
   158   UNS8       Size;
   160   UNS8       dataType;
       
   161   UNS8       offset;
   159   UNS8       offset;
   162   UNS8       status;
   160   UNS8       status;
   163   UNS32      objDict;
   161   UNS32      objDict;
   164   UNS16      offsetObjdict;
   162   UNS16      offsetObjdict;
   165   UNS16      lastIndex;
   163   UNS16      lastIndex;
   603   {
   601   {
   604   	case 2: /* Changed transmition type */
   602   	case 2: /* Changed transmition type */
   605   	case 3: /* Changed inhibit time */
   603   	case 3: /* Changed inhibit time */
   606   	case 5: /* Changed event time */
   604   	case 5: /* Changed event time */
   607   	{
   605   	{
   608           UNS8 pTransmissionType = *(UNS8*) OD_entry->pSubindex[2].pObject;
       
   609           const indextable* TPDO_com = d->objdict + d->firstIndex->PDO_TRS; 
   606           const indextable* TPDO_com = d->objdict + d->firstIndex->PDO_TRS; 
   610           UNS8 numPdo = OD_entry - TPDO_com;       /* number of the actual processed pdo-nr. */
   607           UNS8 numPdo = OD_entry - TPDO_com;       /* number of the actual processed pdo-nr. */
   611         
   608         
   612           /* Zap all timers and inhibit flag */
   609           /* Zap all timers and inhibit flag */
   613           d->PDO_status[numPdo].event_timer = DelAlarm(d->PDO_status[numPdo].event_timer);
   610           d->PDO_status[numPdo].event_timer = DelAlarm(d->PDO_status[numPdo].event_timer);