00001
00002
00020 #include "white_interface.h"
00021
00022 char * strcpy (char *to, const char *from);
00023
00024 int vccPrintPdxDebugInfo(const char *format, ...);
00025
00026
00040
00041 int connected = 0;
00042
00048
00049 char string_to_GBI[20];
00050
00055
00056 char string_from_GBI[20];
00057
00058
00065 void poin_entry_Init() {
00066
00067
00068 Start_Run_Post(1);
00069
00070
00071 if(Master_Value())
00072 vccPrintPdxDebugInfo("%_START_ MASTER : GBI-Test ->Start_Run_Post(1) to GBI %_END_");
00073 else
00074 vccPrintPdxDebugInfo("%_START_ SLAVE : GBI-Test ->Start_Run_Post(1) to GBI %_END_");
00075 }
00076
00077
00103 void poin_entry_Run() {
00104
00105
00106
00107
00108 if(Set_Enabled()){
00109 if(Set_Value()){
00110 connected = 1;
00111 }
00112 }
00113
00114 if(Input_Enabled()) {
00115
00116
00117
00118
00119 strcpy(string_from_GBI, Input_Value());
00120
00121
00122 if(Master_Value())
00123 vccPrintPdxDebugInfo("%_START_ Master : GBI-Test <-received [%s] from GBI %_END_", string_from_GBI);
00124 else
00125 vccPrintPdxDebugInfo("%_START_ Slave : GBI-Test <-received [%s] from GBI %_END_", string_from_GBI);
00126
00127
00128
00129 NET_Out_Post(string_from_GBI);
00130
00131
00132 if(Master_Value())
00133 vccPrintPdxDebugInfo("%_START_ Master : GBI-Test -Input_Enabled() ->send [%s] to NET_Out %_END_", string_to_GBI);
00134 else
00135 vccPrintPdxDebugInfo("%_START_ Slave : GBI-Test -Input_Enabled() ->send [%s] to NET_Out %_END_", string_to_GBI);
00136
00137 }
00138
00139 if(NET_In_Enabled()) {
00140
00141
00142 strcpy(string_to_GBI, NET_In_Value());
00143
00144
00145
00146 Output_Post(string_to_GBI);
00147 }
00148 }
00149