equal
deleted
inserted
replaced
19 License along with this library; if not, write to the Free Software |
19 License along with this library; if not, write to the Free Software |
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 */ |
21 */ |
22 |
22 |
23 #include "nmtMaster.h" |
23 #include "nmtMaster.h" |
|
24 #include "canfestival.h" |
24 |
25 |
25 /******************************************************************************/ |
26 /******************************************************************************/ |
26 UNS8 masterSendNMTstateChange(CO_Data* d, UNS8 Node_ID, UNS8 cs) |
27 UNS8 masterSendNMTstateChange(CO_Data* d, UNS8 Node_ID, UNS8 cs) |
27 { |
28 { |
28 Message m; |
29 Message m; |
34 m.rtr = NOT_A_REQUEST; |
35 m.rtr = NOT_A_REQUEST; |
35 m.len = 2; |
36 m.len = 2; |
36 m.data[0] = cs; |
37 m.data[0] = cs; |
37 m.data[1] = Node_ID; |
38 m.data[1] = Node_ID; |
38 |
39 |
39 return (*d->canSend)(&m); |
40 return canSend(d->canHandle,&m); |
40 } |
41 } |
41 |
42 |
42 |
43 |
43 /****************************************************************************/ |
44 /****************************************************************************/ |
44 UNS8 masterSendNMTnodeguard(CO_Data* d, UNS8 nodeId) |
45 UNS8 masterSendNMTnodeguard(CO_Data* d, UNS8 nodeId) |
50 /* message configuration */ |
51 /* message configuration */ |
51 m.cob_id.w = nodeId | (NODE_GUARD << 7); |
52 m.cob_id.w = nodeId | (NODE_GUARD << 7); |
52 m.rtr = REQUEST; |
53 m.rtr = REQUEST; |
53 m.len = 1; |
54 m.len = 1; |
54 |
55 |
55 return (*d->canSend)(&m); |
56 return canSend(d->canHandle,&m); |
56 } |
57 } |
57 |
58 |
58 /******************************************************************************/ |
59 /******************************************************************************/ |
59 void masterRequestNodeState(CO_Data* d, UNS8 nodeId) |
60 void masterRequestNodeState(CO_Data* d, UNS8 nodeId) |
60 { |
61 { |