2 This file is part of CanFestival, a library implementing CanOpen Stack.
4 Copyright (C): Edouard TISSERANT and Francis DUPIN
6 See COPYING file for copyrights details.
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
18 You should have received a copy of the GNU Lesser General Public
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
25 #include "TestMasterSlave.h"
27 /*****************************************************************************/
28 void TestMaster_heartbeatError(UNS8 heartbeatID)
30 eprintf("TestMaster_heartbeatError %d\n", heartbeatID);
33 /*****************************************************************************/
34 void TestMaster_SDOtimeoutError (UNS8 line)
36 eprintf("TestMaster_SDOtimeoutError %d\n", line);
39 /*****************************************************************************/
40 void TestMaster_initialisation()
42 eprintf("TestMaster_initialisation\n");
45 void TestMaster_preOperational()
47 eprintf("TestMaster_preOperational\n");
50 void TestMaster_operational()
52 eprintf("TestMaster_operational\n");
55 void TestMaster_stopped()
57 eprintf("TestMaster_stopped\n");
60 void TestMaster_post_sync()
62 eprintf("TestMaster_post_sync\n");
63 eprintf("Master: %d %d %d %d\n",MasterMap1, MasterMap2, MasterMap3, MasterMap4);
66 char query_result = 0;
67 char waiting_answer = 0;
69 void TestMaster_post_TPDO()
71 eprintf("TestMaster_post_TPDO\n");
75 // if(MasterMap4 > 0x80){
78 // TestSlave_Data->bDeviceNodeId,
90 switch(getReadResultNetworkDict (
92 *TestSlave_Data.bDeviceNodeId,
98 /* Do something with result here !!*/
99 eprintf("Got SDO answer (0x2002, 0x00), %d %d\n",query_result,size);
100 case SDO_ABORTED_RCV:
101 case SDO_ABORTED_INTERNAL:
106 *TestSlave_Data. bDeviceNodeId,
109 case SDO_DOWNLOAD_IN_PROGRESS:
110 case SDO_UPLOAD_IN_PROGRESS:
113 }else if(MasterMap1 % 10 == 0){
116 *TestSlave_Data.bDeviceNodeId,