|
1 /* |
|
2 This file is part of CanFestival, a library implementing CanOpen Stack. |
|
3 |
|
4 Copyright (C): Edouard TISSERANT and Francis DUPIN |
|
5 |
|
6 See COPYING file for copyrights details. |
|
7 |
|
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. |
|
12 |
|
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. |
|
17 |
|
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 |
|
21 */ |
|
22 #include <wx/wxprec.h> |
|
23 #include <wx/wx.h> |
|
24 #include <wx/textctrl.h> |
|
25 #include <iostream> |
|
26 |
|
27 #include "CallBack.h" |
|
28 #include "main.h" |
|
29 extern "C" |
|
30 { |
|
31 #include "ObjDict.h" |
|
32 } |
|
33 |
|
34 |
|
35 extern wxTextCtrl *textLog; |
|
36 |
|
37 /*****************************************************************************/ |
|
38 void Call_heartbeatError(UNS8 heartbeatID) |
|
39 { |
|
40 *textLog << wxT("HeartbeatError\n"); |
|
41 } |
|
42 |
|
43 void Call_initialisation() |
|
44 { |
|
45 *textLog << wxT("Initialisation\n"); |
|
46 } |
|
47 |
|
48 void Call_preOperational() |
|
49 { |
|
50 *textLog << wxT("PreOperational\n"); |
|
51 } |
|
52 |
|
53 void Call_operational() |
|
54 { |
|
55 *textLog << wxT("Operational\n"); |
|
56 } |
|
57 |
|
58 void Call_stopped() |
|
59 { |
|
60 *textLog << wxT("Stopped\n"); |
|
61 } |
|
62 |
|
63 void Call_post_sync() |
|
64 { |
|
65 *textLog << wxT("Post_sync\n"); |
|
66 printf("POST SYNC:\n"); |
|
67 printf(" Write_Outputs: %x \n Analogue_Output1: %d \n Analogue_Output2: %d \n", Write_Outputs_8_Bit[0], Write_Analogue_Output_16_Bit[0], Write_Analogue_Output_16_Bit[1]); |
|
68 printf(" Read_Input: %x \n Analogue_Input1: %d \n Analogue_Input2: %d \n", Read_Inputs_8_Bit[0], Read_Analogue_Input_16_Bit[0], Read_Analogue_Input_16_Bit[1]); |
|
69 } |
|
70 |
|
71 void Call_post_TPDO() |
|
72 { |
|
73 *textLog << wxT("Post_TPDO\n"); |
|
74 } |
|
75 |
|
76 void Call_storeODSubIndex(UNS16 wIndex, UNS8 bSubindex) |
|
77 { |
|
78 printf("StoreODSubIndex : %4.4x %2.2x\n", wIndex, bSubindex); |
|
79 *textLog << wxT("StoreODSubIndex :\n"); |
|
80 } |