examples/DS401_Slave_Gui/CallBack.cpp
changeset 382 860e858685d3
parent 378 d2abf6c8c27b
child 407 384c3cd7afa2
equal deleted inserted replaced
381:854c43cdc24a 382:860e858685d3
    24 #include <wx/textctrl.h>
    24 #include <wx/textctrl.h>
    25 #include <iostream>
    25 #include <iostream>
    26 
    26 
    27 #include "CallBack.h"
    27 #include "CallBack.h"
    28 #include "main.h"
    28 #include "main.h"
    29 extern "C" 
    29 extern "C"
    30   {
    30 {
    31 	#include "ObjDict.h"
    31 #include "ObjDict.h"
    32   }
    32 }
    33 
    33 
    34 
    34 
    35 extern wxTextCtrl 	*textLog;
    35 extern wxTextCtrl *textLog;
    36 
    36 
    37 /*****************************************************************************/
    37 /*****************************************************************************/
    38 void Call_heartbeatError(CO_Data* d, UNS8 heartbeatID)
    38 void
       
    39 Call_heartbeatError (CO_Data * d, UNS8 heartbeatID)
    39 {
    40 {
    40 	//*textLog << wxT("HeartbeatError\n");
    41   //*textLog << wxT("HeartbeatError\n");
    41 }
    42 }
    42 
    43 
    43 void Call_initialisation(CO_Data* d)
    44 void
       
    45 Call_initialisation (CO_Data * d)
    44 {
    46 {
    45 	//*textLog << wxT("Initialisation\n");
    47   //*textLog << wxT("Initialisation\n");
    46 }
    48 }
    47 
    49 
    48 void Call_preOperational(CO_Data* d)
    50 void
       
    51 Call_preOperational (CO_Data * d)
    49 {
    52 {
    50 	//*textLog << wxT("PreOperational\n");
    53   //*textLog << wxT("PreOperational\n");
    51 }
    54 }
    52 
    55 
    53 void Call_operational(CO_Data* d)
    56 void
       
    57 Call_operational (CO_Data * d)
    54 {
    58 {
    55 	//*textLog << wxT("Operational\n");
    59   //*textLog << wxT("Operational\n");
    56 }
    60 }
    57 
    61 
    58 void Call_stopped(CO_Data* d)
    62 void
       
    63 Call_stopped (CO_Data * d)
    59 {
    64 {
    60 	//*textLog << wxT("Stopped\n");
    65   //*textLog << wxT("Stopped\n");
    61 }
    66 }
    62 
    67 
    63 void Call_post_sync(CO_Data* d)
    68 void
       
    69 Call_post_sync (CO_Data * d)
    64 {
    70 {
    65     //*textLog << wxT("Post_sync\n");
    71   //*textLog << wxT("Post_sync\n");
    66 	printf("POST SYNC:\n");
    72   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]);
    73   printf
    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]);
    74     ("     Write_Outputs: %x \n     Analogue_Output1: %d \n     Analogue_Output2: %d \n",
       
    75      Write_Outputs_8_Bit[0], Write_Analogue_Output_16_Bit[0],
       
    76      Write_Analogue_Output_16_Bit[1]);
       
    77   printf
       
    78     ("     Read_Input: %x \n     Analogue_Input1: %d \n     Analogue_Input2: %d \n",
       
    79      Read_Inputs_8_Bit[0], Read_Analogue_Input_16_Bit[0],
       
    80      Read_Analogue_Input_16_Bit[1]);
    69 }
    81 }
    70 
    82 
    71 void Call_post_TPDO(CO_Data* d)
    83 void
       
    84 Call_post_TPDO (CO_Data * d)
    72 {
    85 {
    73 	//*textLog << wxT("Post_TPDO\n");
    86   //*textLog << wxT("Post_TPDO\n");
    74 }
    87 }
    75 
    88 
    76 void Call_storeODSubIndex(CO_Data* d, UNS16 wIndex, UNS8 bSubindex)
    89 void
       
    90 Call_storeODSubIndex (CO_Data * d, UNS16 wIndex, UNS8 bSubindex)
    77 {
    91 {
    78 	printf("StoreODSubIndex : %4.4x %2.2x\n", wIndex,  bSubindex);
    92   printf ("StoreODSubIndex : %4.4x %2.2x\n", wIndex, bSubindex);
    79 	//*textLog << wxT("StoreODSubIndex :\n");
    93   //*textLog << wxT("StoreODSubIndex :\n");
    80 }
    94 }