![](/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: shared_variables.h
- Revision:
- 117:e9facba9db27
- Parent:
- 116:39a41ebb675c
- Child:
- 119:ee6a53069455
--- a/shared_variables.h Thu Apr 23 20:24:09 2015 +0000 +++ b/shared_variables.h Thu Apr 23 21:53:28 2015 +0000 @@ -17,16 +17,13 @@ extern TCPSocketConnection tcp_client; ///< Representa a presença de algum cliente logado em uma sessão TCP. -extern bool human_session; - -extern Endpoint udp_server; +extern UDPSocket udp_server; ///< Socket responsavel por ouvir determinada porta udp. -extern UDPSocket udp_client; +extern Endpoint udp_client; ///< Representa a presença de algum cliente udp. extern bool udp_request; -extern bool udp_query; ///< Variável de controle que nos diz se trata-se de um request vindo da porta UDP. extern bool debug_alive; @@ -55,40 +52,38 @@ extern bool r_stats; ///< Variável de controle para resetar os contadores de pacotes recebidos por tipo. -extern uint32_t boot_counter; +extern uint16_t boot_counter; ///< Contador dos pacotes de BOOT recebidos -extern uint32_t registry_counter; +extern uint16_t registry_counter; ///< Contador dos pacotes de REGISTRY recebidos -extern uint32_t invite_counter; +extern uint16_t invite_counter; ///< Contador dos pacotes de INVITE recebidos -extern uint32_t audio_counter; +extern uint16_t audio_counter; ///< Contador dos pacotes de AUDIO recebidos -extern uint32_t telemetry_counter; +extern uint16_t telemetry_counter; ///< Contador dos pacotes de TELEMETRY recebidos -extern uint32_t cb_stats_counter; +extern uint16_t cb_stats_counter; -extern uint32_t cb_bye_counter; +extern uint16_t cb_bye_counter; ///< Contador dos pacotes de CB_BYE recebidos -extern uint32_t prompt_counter; +extern uint16_t prompt_counter; ///< Contador dos pacotes de PROMPT recebidos -extern uint32_t flood_counter; +extern uint16_t flood_counter; ///< Contador dos pacotes de FLOOD recebidos -extern uint32_t bootloader_cbx_counter; +extern uint16_t bootloader_cbx_counter; ///< Contador dos pacotes de BOOTLOADER_CBX recebidos -extern uint32_t out_of_range; +extern uint16_t out_of_range; ///< Contador de pacotes recebidos fora do range. -extern uint32_t fw_counter; - extern Serial pc; ///< Objeto que possibilita a excrita ( via printf ) de texto na serial @@ -122,13 +117,9 @@ extern uint16_t sip_socket_send_failure; extern bool show_sip; extern uint32_t delayed_pkg_to_cb; -extern uint16_t miss_prompt_udp_send_pkg; -extern uint16_t miss_prompt_udp_rcv_pkg; extern int print_this_cb; extern int print_hex_this_cb; -extern uint16_t miss_prompt_udp_rcv_pkg; extern int print_this_sip; -extern uint16_t miss_prompt_udp_send_pkg; extern int print_hex_this_sip; extern int print_this_call; extern int print_hex_this_call; @@ -137,20 +128,10 @@ extern int frtp_target; extern int rescue_rtp_target; extern int rescue_rtp_value; -extern uint32_t uptime; -extern bool extern_process; - -const uint8_t __RTP_HEADER_OFFSET__ = 12; +#define __RTP_HEADER_OFFSET__ 12 ///< Identifica o inicio dos dados de audio ( payload ) -const uint8_t __RTP_HEADER_SIZE__ = 12; +#define __RTP_HEADER_SIZE__ 12 ///< Indica o tamanho ( em bytes ) ocupado pelo cabeçalho rtp. -#define reconnect_prompt_udp_socket( ) { \ - udp_client.close(); \ - udp_client.bind( UDP_PORT_LISTENER ); \ -} - -void udp_query_send_msg( char * msg ); - #endif \ No newline at end of file