36 |
36 |
37 /************************************************************************* |
37 /************************************************************************* |
38 * Functions |
38 * Functions |
39 *************************************************************************/ |
39 *************************************************************************/ |
40 |
40 |
41 |
41 /** |
42 /** To read the state of a node |
42 * @brief To read the state of a node |
43 * This can be used by the master after having sent a life guard request, |
43 * This can be used by the master after having sent a life guard request, |
44 * of by any node if it is waiting for heartbeat. |
44 * of by any node if it is waiting for heartbeat. |
|
45 * @param *d Pointer on a CAN object data structure |
|
46 * @param nodeId Id of a node |
|
47 * @return e_nodeState State of the node corresponding to the nodeId |
45 */ |
48 */ |
46 e_nodeState getNodeState (CO_Data* d, UNS8 nodeId); |
49 e_nodeState getNodeState (CO_Data* d, UNS8 nodeId); |
47 |
50 |
48 /** Start heartbeat consumer and producer |
51 /** |
49 * with respect to 0x1016 and 0x1017 |
52 * @brief Start heartbeat consumer and producer |
50 * object dictionary entries |
53 * with respect to 0x1016 and 0x1017 |
|
54 * object dictionary entries |
|
55 * @param *d Pointer on a CAN object data structure |
51 */ |
56 */ |
52 void heartbeatInit(CO_Data* d); |
57 void heartbeatInit(CO_Data* d); |
53 |
58 |
54 /** Stop heartbeat consumer and producer |
59 /** |
|
60 * @brief Stop heartbeat consumer and producer |
|
61 * @param *d Pointer on a CAN object data structure |
55 */ |
62 */ |
56 void heartbeatStop(CO_Data* d); |
63 void heartbeatStop(CO_Data* d); |
57 |
64 |
58 /** This function is responsible to process a canopen-message which seams to be an NMT Error Control |
65 /** |
59 * Messages. At them moment we assume that every NMT error control message |
66 * @brief This function is responsible to process a canopen-message which seams to be an NMT Error Control |
60 * is a heartbeat message. |
67 * Messages. At them moment we assume that every NMT error control message |
61 * \param Message The CAN-message which has to be analysed. |
68 * is a heartbeat message. |
62 * If a BootUp message is detected, it will return the nodeId of the Slave who booted up |
69 * If a BootUp message is detected, it will return the nodeId of the Slave who booted up |
|
70 * @param *d Pointer on a CAN object data structure |
|
71 * @param *m Pointer on the CAN-message which has to be analysed. |
63 */ |
72 */ |
64 void proceedNODE_GUARD (CO_Data* d, Message* m); |
73 void proceedNODE_GUARD (CO_Data* d, Message* m); |
65 |
74 |
66 #endif /*__lifegrd_h__ */ |
75 #endif /*__lifegrd_h__ */ |