![](/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
shared_variables.cpp@116:39a41ebb675c, 2015-04-23 (annotated)
- Committer:
- klauss
- Date:
- Thu Apr 23 20:24:09 2015 +0000
- Revision:
- 116:39a41ebb675c
- Parent:
- 115:a1e1e2e60a2c
- Child:
- 117:e9facba9db27
inicio do merge da vers?o da ultima vistoria com a da sprint 0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
klauss | 74:81c47fff88a5 | 1 | #include "shared_variables.h" |
klauss | 74:81c47fff88a5 | 2 | |
klauss | 74:81c47fff88a5 | 3 | bool from_eth = false; |
klauss | 74:81c47fff88a5 | 4 | |
klauss | 74:81c47fff88a5 | 5 | bool tcp_session = false; |
klauss | 74:81c47fff88a5 | 6 | |
klauss | 74:81c47fff88a5 | 7 | bool reset_cks = false; |
klauss | 74:81c47fff88a5 | 8 | |
klauss | 116:39a41ebb675c | 9 | bool human_session = false; |
klauss | 116:39a41ebb675c | 10 | |
klauss | 74:81c47fff88a5 | 11 | TCPSocketServer tcp_server; |
klauss | 74:81c47fff88a5 | 12 | |
klauss | 74:81c47fff88a5 | 13 | TCPSocketConnection tcp_client; |
klauss | 74:81c47fff88a5 | 14 | |
klauss | 74:81c47fff88a5 | 15 | Timer udp_timer; |
klauss | 74:81c47fff88a5 | 16 | |
klauss | 75:bd3c647b860b | 17 | bool debug_alive = false; |
klauss | 74:81c47fff88a5 | 18 | |
klauss | 116:39a41ebb675c | 19 | Endpoint udp_server; |
klauss | 74:81c47fff88a5 | 20 | |
klauss | 116:39a41ebb675c | 21 | UDPSocket udp_client; |
klauss | 116:39a41ebb675c | 22 | |
klauss | 116:39a41ebb675c | 23 | bool udp_query = false; |
klauss | 74:81c47fff88a5 | 24 | |
klauss | 75:bd3c647b860b | 25 | bool pcks_s = false; |
klauss | 74:81c47fff88a5 | 26 | |
klauss | 74:81c47fff88a5 | 27 | bool list = false; |
klauss | 74:81c47fff88a5 | 28 | |
klauss | 74:81c47fff88a5 | 29 | bool r_stats; |
klauss | 74:81c47fff88a5 | 30 | |
klauss | 74:81c47fff88a5 | 31 | bool rx = false; |
klauss | 74:81c47fff88a5 | 32 | |
klauss | 74:81c47fff88a5 | 33 | bool tx = false; |
klauss | 74:81c47fff88a5 | 34 | |
klauss | 74:81c47fff88a5 | 35 | bool stats = false; |
klauss | 74:81c47fff88a5 | 36 | |
klauss | 116:39a41ebb675c | 37 | uint32_t boot_counter = 0; |
klauss | 74:81c47fff88a5 | 38 | |
klauss | 116:39a41ebb675c | 39 | uint32_t registry_counter = 0; |
klauss | 116:39a41ebb675c | 40 | |
klauss | 116:39a41ebb675c | 41 | uint32_t invite_counter = 0; |
klauss | 74:81c47fff88a5 | 42 | |
klauss | 116:39a41ebb675c | 43 | uint32_t audio_counter = 0; |
klauss | 74:81c47fff88a5 | 44 | |
klauss | 116:39a41ebb675c | 45 | uint32_t telemetry_counter = 0; |
klauss | 74:81c47fff88a5 | 46 | |
klauss | 116:39a41ebb675c | 47 | uint32_t cb_stats_counter = 0; |
klauss | 99:e80850c51106 | 48 | |
klauss | 116:39a41ebb675c | 49 | uint32_t cb_bye_counter = 0; |
klauss | 74:81c47fff88a5 | 50 | |
klauss | 116:39a41ebb675c | 51 | uint32_t prompt_counter = 0; |
klauss | 74:81c47fff88a5 | 52 | |
klauss | 116:39a41ebb675c | 53 | uint32_t flood_counter = 0; |
klauss | 79:9bc12aa305a9 | 54 | |
klauss | 116:39a41ebb675c | 55 | uint32_t out_of_range = 0; |
klauss | 74:81c47fff88a5 | 56 | |
klauss | 116:39a41ebb675c | 57 | uint32_t fw_counter = 0; |
klauss | 105:a930035b6556 | 58 | |
klauss | 116:39a41ebb675c | 59 | uint32_t bootloader_cbx_counter = 0; |
klauss | 74:81c47fff88a5 | 60 | |
klauss | 80:61d61c9eb75c | 61 | int max_ext = 0; |
klauss | 80:61d61c9eb75c | 62 | |
klauss | 80:61d61c9eb75c | 63 | int min_ext = 0; |
klauss | 80:61d61c9eb75c | 64 | |
klauss | 75:bd3c647b860b | 65 | bool pshowcb = false; |
klauss | 74:81c47fff88a5 | 66 | |
klauss | 81:3656f00ab3db | 67 | uint16_t external_wdt = EXTERN_WDT_IDLE; |
klauss | 81:3656f00ab3db | 68 | |
klauss | 78:1353744f01e1 | 69 | volatile uint8_t status = __WAITING__; |
klauss | 78:1353744f01e1 | 70 | |
klauss | 74:81c47fff88a5 | 71 | Serial pc (USBTX,USBRX); |
klauss | 74:81c47fff88a5 | 72 | |
klauss | 74:81c47fff88a5 | 73 | DigitalOut led1(LED1); |
klauss | 74:81c47fff88a5 | 74 | |
klauss | 74:81c47fff88a5 | 75 | DigitalOut led2(LED2); |
klauss | 74:81c47fff88a5 | 76 | |
klauss | 74:81c47fff88a5 | 77 | DigitalOut led3(LED3); |
klauss | 74:81c47fff88a5 | 78 | |
klauss | 74:81c47fff88a5 | 79 | DigitalOut led4(LED4); |
klauss | 74:81c47fff88a5 | 80 | |
klauss | 81:3656f00ab3db | 81 | DigitalOut CAB_LED(p24); |
klauss | 81:3656f00ab3db | 82 | |
klauss | 85:b6f2dc1d0f4f | 83 | uint32_t missed_pkg = 0; |
klauss | 85:b6f2dc1d0f4f | 84 | uint8_t cb_new_counter = 0; |
klauss | 85:b6f2dc1d0f4f | 85 | uint8_t cb_delete_counter = 0; |
klauss | 85:b6f2dc1d0f4f | 86 | uint8_t sip_new_counter = 0; |
klauss | 85:b6f2dc1d0f4f | 87 | uint8_t sip_delete_counter = 0; |
klauss | 87:679ee0d594a9 | 88 | uint16_t rtp_header_new_counter = 0; |
klauss | 87:679ee0d594a9 | 89 | uint16_t rtp_body_new_counter = 0; |
klauss | 87:679ee0d594a9 | 90 | uint16_t rtp_header_delete_counter = 0; |
klauss | 87:679ee0d594a9 | 91 | uint16_t rtp_body_delete_counter = 0; |
klauss | 91:c2a86b1f8aaa | 92 | uint16_t call_new_counter = 0; |
klauss | 91:c2a86b1f8aaa | 93 | uint16_t call_delete_counter = 0; |
klauss | 87:679ee0d594a9 | 94 | bool memory_is_over = false; |
klauss | 92:92df17f538a8 | 95 | volatile uint16_t received_cpld_pkg = 0; |
klauss | 97:8985817e8847 | 96 | uint16_t sip_socket_send_failure = 0; |
klauss | 99:e80850c51106 | 97 | bool show_sip = false; |
klauss | 100:09a23fcd3bdf | 98 | uint32_t delayed_pkg_to_cb = 0; |
klauss | 99:e80850c51106 | 99 | uint32_t cpld_pkg_tx_counter = 0; |
klauss | 104:62646ef786a3 | 100 | uint32_t cpld_pkg_rx_counter = 0; |
klauss | 116:39a41ebb675c | 101 | uint16_t miss_prompt_udp_send_pkg = 0; |
klauss | 116:39a41ebb675c | 102 | uint16_t miss_prompt_udp_rcv_pkg = 0; |
klauss | 116:39a41ebb675c | 103 | bool extern_process = false; |
klauss | 109:a5b8264ffbbc | 104 | int print_this_cb = 0; |
klauss | 109:a5b8264ffbbc | 105 | int print_hex_this_cb = 0; |
klauss | 109:a5b8264ffbbc | 106 | int print_this_sip = 0; |
klauss | 109:a5b8264ffbbc | 107 | int print_hex_this_sip = 0; |
klauss | 109:a5b8264ffbbc | 108 | int print_this_call = 0; |
klauss | 109:a5b8264ffbbc | 109 | int print_hex_this_call = 0; |
klauss | 109:a5b8264ffbbc | 110 | int print_this_rtp = 0; |
klauss | 109:a5b8264ffbbc | 111 | int print_hex_this_rtp = 0; |
klauss | 109:a5b8264ffbbc | 112 | int frtp_target = 0; |
klauss | 109:a5b8264ffbbc | 113 | int rescue_rtp_target = 0; |
klauss | 115:a1e1e2e60a2c | 114 | int rescue_rtp_value = 0; |
klauss | 116:39a41ebb675c | 115 | uint32_t uptime = 0; |
klauss | 116:39a41ebb675c | 116 | |
klauss | 116:39a41ebb675c | 117 | void udp_query_send_msg( char * msg ) |
klauss | 116:39a41ebb675c | 118 | { |
klauss | 116:39a41ebb675c | 119 | if( ( msg != NULL ) && ( strlen( msg ) > 0 ) ) |
klauss | 116:39a41ebb675c | 120 | { |
klauss | 116:39a41ebb675c | 121 | int send = udp_client.sendTo( udp_server, msg, strlen( msg ) ); |
klauss | 116:39a41ebb675c | 122 | |
klauss | 116:39a41ebb675c | 123 | if( send != strlen( msg ) ) |
klauss | 116:39a41ebb675c | 124 | { |
klauss | 116:39a41ebb675c | 125 | if( debug_reconnect ) send_msg("Reconnect UDP_request client"); |
klauss | 116:39a41ebb675c | 126 | reconnect_prompt_udp_socket(); |
klauss | 116:39a41ebb675c | 127 | miss_prompt_udp_send_pkg++; |
klauss | 116:39a41ebb675c | 128 | } |
klauss | 116:39a41ebb675c | 129 | } |
klauss | 116:39a41ebb675c | 130 | } |