bosko lekovic
/
EthToCom_11
nova proba
Diff: main.cpp
- Revision:
- 19:7bdb1a10043f
- Parent:
- 18:5ee53205451a
- Child:
- 20:d8277082f4e3
--- a/main.cpp Sun May 17 17:16:03 2020 +0200 +++ b/main.cpp Sat May 23 00:30:00 2020 +0200 @@ -66,14 +66,28 @@ printf(" komanda za tred[%d] fleg=%d\n\r", kanal, fleg); } break; - case 'S': + case 'P': case 'p': + restart_TcpClients( ); + break; + case 'S': case 's': { - extern void _semafor_release(void ); - _semafor_release(); + //get_rxStatus( int i ) + puts("TCP Clients Threads satatus:\n\r"); + printf("\n\r TCP statusi T[0]=%d T[1]=%d T[2]=%d T[3]=%d \n\r", get_rxStatus(0), get_rxStatus(1), get_rxStatus(2), get_rxStatus(3)); + printf(" TCP validy T[0]=%d T[1]=%d T[2]=%d T[3]=%d \n\r", get_rxValidy(0), get_rxValidy(1), get_rxValidy(2), get_rxValidy(3)); + } break; - case 'T': - inic_TcpServerToFlash( ); + case 'T': case 't': + { + puts("TCP Clients Thread controll, thread number input:"); + char no = getchar()-'0'; + puts("\n\rTCP Clients Thread controll, thread flag input:"); + char fl = getchar()-'0'; + void restart_TcpClient( int noClient, int typeRestart ); + restart_TcpClientConnection( no, fl & 7 ); + printf("\n\rthread = %d, flag =%d\n\r", no, fl); + } break; case 'R': printf("systemInit()\n\r"); @@ -125,23 +139,11 @@ extern EthernetInterface *gp_eth; init_EthToScom( ); - tcpRxThreadsRiseUp( ); + //tcpRxThreadsRiseUp( ); // gp_eth = ethernet_setup( ); inic_TcpServerToFlash( ); -// if(gp_eth == NULL) printf("ethernet greska\n\r"); -// else -// { -// printf("eth OK\n\r"); -// scomRxThreadRiseUp( ); -// udpRxThreadRiseUp( ); - -// //#if NO_UDP <= 1 -// inic_TcpServerToFlash( ); -// //#endif -// } - extern void test_HTML(void); // test_HTML( );