37 * bus_id is hardware dependant |
37 * bus_id is hardware dependant |
38 * return canSend(bus_id,&m) |
38 * return canSend(bus_id,&m) |
39 */ |
39 */ |
40 UNS8 sendSYNC (CO_Data* d, UNS32 cob_id); |
40 UNS8 sendSYNC (CO_Data* d, UNS32 cob_id); |
41 |
41 |
42 /** This function is called when the node is receiving a SYNC |
42 /** This function is called when the node is receiving a SYNC message (cob-id = 0x80). |
43 * message (cob-id = 0x80). |
43 * - check if the node is in OERATIONAL mode. (other mode : return 0 but does nothing). |
44 * What does the function : |
44 * - Get the SYNC cobId by reading the dictionary index 1005, check it does correspond to the received cobId |
45 * check if the node is in OERATIONAL mode. (other mode : return 0 but does nothing). |
45 * - Trigger sync TPDO emission |
46 * Get the SYNC cobId by reading the dictionary index 1005. (Return -1 if it does not correspond |
46 * - return 0 if OK, 0xFF if error |
47 * to the cobId received). |
|
48 * Scan the dictionary from index 0x1800 to the last PDO defined (dict_cstes.max_count_of_PDO_transmit) |
|
49 * for each PDO whose transmission type is on synchro (transmission type < 241) and if the msg must |
|
50 * be send at this SYNC. read the COBID. Verify that the nodeId inside the |
|
51 * nodeId correspond to bDeviceNodeId. (Assume that the cobId of a PDO Transmit is made |
|
52 * with the node id of the node who transmit), get the mapping, launch PDOmGR to send the PDO |
|
53 * *m is a pointer to the message received |
|
54 * bus_id is hardware dependant |
|
55 * return 0 if OK, 0xFF if error |
|
56 */ |
47 */ |
57 UNS8 proceedSYNC (CO_Data* d, Message * m); |
48 UNS8 proceedSYNC (CO_Data* d, Message * m); |
58 |
49 |
59 #endif |
50 #endif |