src/pdo.c
changeset 626 270b25cd9e8f
parent 619 96f84395154f
child 629 b9274b595650
equal deleted inserted replaced
625:5482b98e82a3 626:270b25cd9e8f
   485 
   485 
   486 static void sendPdo(CO_Data * d, UNS32 pdoNum, Message * pdo)
   486 static void sendPdo(CO_Data * d, UNS32 pdoNum, Message * pdo)
   487 {
   487 {
   488   /*store_as_last_message */
   488   /*store_as_last_message */
   489   d->PDO_status[pdoNum].last_message = *pdo;
   489   d->PDO_status[pdoNum].last_message = *pdo;
   490   MSG_WAR (0x396D, "sendPDO cobId :", UNS16_LE(pdo.cob_id));
   490   MSG_WAR (0x396D, "sendPDO cobId :", UNS16_LE(pdo->cob_id));
   491   MSG_WAR (0x396E, "     Nb octets  : ", pdo.len);
   491   MSG_WAR (0x396E, "     Nb octets  : ", pdo->len);
   492 
   492 
   493   canSend (d->canHandle, pdo);
   493   canSend (d->canHandle, pdo);
   494 }
   494 }
   495 
   495 
   496 
   496 
   511 
   511 
   512 UNS8
   512 UNS8
   513 sendOnePDOevent (CO_Data * d, UNS32 pdoNum)
   513 sendOnePDOevent (CO_Data * d, UNS32 pdoNum)
   514 {
   514 {
   515   if (!d->CurrentCommunicationState.csPDO ||
   515   if (!d->CurrentCommunicationState.csPDO ||
   516       !(d->PDO_status[pdoNum].transmit_type_parameter & PDO_INHIBITED))
   516       (d->PDO_status[pdoNum].transmit_type_parameter & PDO_INHIBITED))
   517     {
   517     {
   518       return 0;
   518       return 0;
   519     }
   519     }
   520 
   520 
   521   UNS16 offsetObjdict = d->firstIndex->PDO_TRS + pdoNum;
   521   UNS16 offsetObjdict = d->firstIndex->PDO_TRS + pdoNum;