![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Modularizando o src
Dependencies: EALib EthernetInterface_vz mbed-rtos mbed
Fork of header_main_colinas_V0-20-09-14 by
Diff: debug.h
- Revision:
- 117:e9facba9db27
- Parent:
- 116:39a41ebb675c
- Child:
- 119:ee6a53069455
diff -r 39a41ebb675c -r e9facba9db27 debug.h --- a/debug.h Thu Apr 23 20:24:09 2015 +0000 +++ b/debug.h Thu Apr 23 21:53:28 2015 +0000 @@ -34,22 +34,6 @@ extern bool main_test; ///< Variável de controle para acionamento de algum comando de interesse. -extern bool sizes; - -extern bool debug_reconnect; -extern uint16_t miss_debug_fw_send_pkg; -extern uint16_t miss_sip_registry_send_pkg; -extern uint16_t miss_sip_invite_send_pkg; -extern uint16_t miss_sip_bye_send_pkg; -extern uint16_t miss_sip_unregistry_send_pkg; -extern uint16_t miss_sip_ok_send_pkg; -extern uint16_t miss_sip_rcv_bye_send_pkg; -extern uint16_t miss_wdt_send_pkg; -extern uint16_t miss_sip_inc_pkg; -extern uint16_t miss_udp_prompt_send_pkg; - -extern bool show_uptime; - extern bool debug_sip; ///< Variável de controle que ativa o debug sip. extern bool debug_prompt; @@ -66,6 +50,8 @@ ///< Variável de controle que ativa o debug dos pacotes recebidos do CBx. extern bool debug_cb_tx; ///< Variável de controle que ativa o debug dos pacotes enviados para o CBx. +extern bool debug_cb_tx; +///< Variável de controle que ativa o debug dos pacotes enviados para o CBx. extern bool debug_eth_rx; ///< Variável de controle que ativa o debug dos pacotes recebidos da eth \note não implementado. extern bool debug_eth_tx; @@ -89,7 +75,6 @@ extern bool debug_muted; extern bool debug_cpld; -extern bool debug_show_cpld; extern bool debug_cks_err; extern bool debug_ping; extern bool debug_refresh; @@ -100,23 +85,17 @@ extern bool wdt_show; extern bool debug_rtp; extern bool debug_memory; +//extern bool debug_registry_rcv; extern bool debug_port_match; extern bool debug_fw; -extern bool debug_gp; -extern bool missed_send_udp_pkg; extern bool debug_boot; extern bool debug_fw_print; extern bool debug_uart3; extern bool big_bug_pkg; extern bool flood_bug_pkg; -extern uint16_t miss_ftp_udp_send_pkg; -extern bool reset_missed_send_udp_pkg; -extern bool debug_missed; -extern uint16_t deleted_sip; extern bool dshow_rtp; extern bool dcallshow_rtp; -extern bool debug_reset_rtp; extern bool debug_rtp; extern uint16_t deleted_sip; extern bool print_values; @@ -155,13 +134,11 @@ extern bool drop_ack_pkg; extern bool drop_rtp_from_ast_pkg; extern bool drop_rtp_from_cbx_pkg; -extern bool drop_registry_pkg; extern bool cogumelo; extern bool gnomo; extern bool registra; -extern bool received_audio_from_cb; -extern bool debug_reconnect; -extern uint16_t miss_ftp_udp_send_pkg; +extern bool debug_bootloader; + /** * @Synopsis Função usada anteriormente para formatação da string que debug, não esta mais em uso. * @@ -171,7 +148,6 @@ */ int eth_fw_debug_pkgdebug_pkg( uint8_t * pkg, int size ); -/* #define debug_msg(...) _debug_msg(__VA_ARGS__) #define _debug_msg(...) { \ sprintf(debug_msg1, "%s:%d ", __FILE__, __LINE__); \ @@ -185,47 +161,16 @@ udp_server.sendTo( udp_client, debug_msg1, strlen( debug_msg1 ) ); \ } \ } -*/ - -#define debug_msg(...) _debug_msg(__VA_ARGS__) -#define _debug_msg(...) { \ - sprintf(debug_msg1, "%s:%d ", __FILE__, __LINE__); \ - sprintf(debug_msg2, __VA_ARGS__); \ - strcat(debug_msg1, debug_msg2); \ - if( debug_uart3 && !udp_query && !from_eth ) pc.printf( "%s\n\r> ", debug_msg1 ); \ - if( tcp_session && !udp_query ){ \ - strcat( debug_msg1, "\n\r" ); \ - while( !( tcp_client.send_all( debug_msg1, strlen( debug_msg1 ) ) ) ); \ - } \ - if( udp_query ){ \ - strcat( debug_msg1, "\n\r" ); \ - int send = udp_client.sendTo( udp_server, debug_msg1, strlen( debug_msg1 ) ); \ - if( send != strlen( debug_msg1 ) ) \ - { \ - if( debug_reconnect && debug_uart3 && !from_eth ) pc.printf("\r\nReconnect udp_query client"); \ - reconnect_prompt_udp_socket(); \ - miss_prompt_udp_send_pkg++; \ - } \ - } \ -} #define send_msg(...) _send_msg(__VA_ARGS__) #define _send_msg(...) { \ sprintf( msg_, __VA_ARGS__); \ - if( debug_uart3 && !udp_query && !from_eth ) pc.printf( "%s\n\r> ", msg_ ); \ - if( tcp_session && !udp_query ){ \ + if( debug_uart3 ) pc.printf( "%s\n\r> ", msg_ ); \ + if( tcp_session ){ \ strcat( msg_, "\n\r> " ); \ while( !( tcp_client.send_all( msg_, strlen( msg_ ) ) ) ); \ - } \ - if( udp_query ){ \ - strcat( msg_, "\n\r> " ); \ - int send = udp_client.sendTo( udp_server, msg_, strlen( msg_ ) ); \ - if( send != strlen( msg_ ) ) \ - { \ - if( debug_reconnect && debug_uart3 ) pc.printf ("\n\rReconnect udp_query client\n\r"); \ - reconnect_prompt_udp_socket(); \ - miss_prompt_udp_send_pkg++; \ - } \ + }else if( udp_request ){ \ + udp_server.sendTo( udp_client, debug_msg1, strlen( debug_msg1 ) ); \ } \ }