Modularizando o src
Dependencies: EALib EthernetInterface_vz mbed-rtos mbed
Fork of header_main_colinas_V0-20-09-14 by
Diff: prompt.cpp
- Revision:
- 52:12930cef17c4
- Parent:
- 51:5fc3a8f02fdf
- Child:
- 53:bb492a8f115a
--- a/prompt.cpp Mon Oct 20 19:37:33 2014 +0000 +++ b/prompt.cpp Mon Oct 20 19:44:16 2014 +0000 @@ -27,6 +27,7 @@ bool tcp_session = false; bool cb_session = false; bool cb_status = false; +bool reset_cks = false; uint8_t test_debug = 1; #define PVERSION 4 // Sempre atualizar a versao do prompt @@ -694,6 +695,13 @@ } } + if( xstrmatch( (uint8_t*)debug_buf, (uint8_t*) "reset_cks" ) ){ + miss_match = false; + reset_cks = true; + } + + + if( xstrmatch( (uint8_t*)debug_buf, (uint8_t*) "status" ) ){ miss_match = false; cb_status = true; @@ -992,6 +1000,7 @@ udp_server.sendTo( udp_client, debug_buf, strlen( debug_buf ) ); } } + pc.printf("ifconfig - mostra o arquivo de configuracao do sistema\n\r"); if( from_eth ){ snprintf( debug_buf,__PROMPT_ETH_BUFFER_SIZE__, "ifconfig - mostra o arquivo de configuracao do sistema\n\r" ); @@ -1145,6 +1154,17 @@ udp_server.sendTo( udp_client, debug_buf, strlen( debug_buf ) ); } } + pc.printf("reset_cks - reseta estatisticas de check sum\n\r"); + if( from_eth ){ + snprintf( debug_buf,__PROMPT_ETH_BUFFER_SIZE__, "reset_cks - reseta estatisticas de check sum\n\r" ); + if( tcp_session ) tcp_client.send_all( debug_buf, strlen( debug_buf ) ); + + else if( udp_request ){ + udp_server.sendTo( udp_client, debug_buf, strlen( debug_buf ) ); + } + } + + pc.printf(". - executa o comando anterior novamente\n\r"); if( from_eth ){ snprintf( debug_buf,__PROMPT_ETH_BUFFER_SIZE__, ". - executa o comando anterior novamente\n\r" );