![](/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
main_app_var_configs.h@120:770f00554b1e, 2015-05-04 (annotated)
- Committer:
- klauss
- Date:
- Mon May 04 17:25:29 2015 +0000
- Revision:
- 120:770f00554b1e
- Child:
- 121:ee02790d00b7
clock request to server XXX port 123
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
klauss | 120:770f00554b1e | 1 | #ifndef __MAIN_INCLUDES_CONFIGS__ |
klauss | 120:770f00554b1e | 2 | #define __MAIN_INCLUDES_CONFIGS__ |
klauss | 120:770f00554b1e | 3 | |
klauss | 120:770f00554b1e | 4 | #include "eth.h" |
klauss | 120:770f00554b1e | 5 | #include "bits.h" |
klauss | 120:770f00554b1e | 6 | #include "UART3Interrupt.h" // for RXBuffer[ CB_BUFFER_SIZE ]; |
klauss | 120:770f00554b1e | 7 | #include "utils.h" |
klauss | 120:770f00554b1e | 8 | #include "parallelcpld.h" |
klauss | 120:770f00554b1e | 9 | #include "debug.h" |
klauss | 120:770f00554b1e | 10 | #include "flood.h" |
klauss | 120:770f00554b1e | 11 | #include "call_manager.h" |
klauss | 120:770f00554b1e | 12 | #include "call_box_manager.h" |
klauss | 120:770f00554b1e | 13 | #include "sip_manager.h" |
klauss | 120:770f00554b1e | 14 | #include "shared_variables.h" |
klauss | 120:770f00554b1e | 15 | #include "prompt.h" |
klauss | 120:770f00554b1e | 16 | #include "configs.h" |
klauss | 120:770f00554b1e | 17 | #include "sdram.h" |
klauss | 120:770f00554b1e | 18 | #include "fw.h" |
klauss | 120:770f00554b1e | 19 | #include "bootloader.h" |
klauss | 120:770f00554b1e | 20 | #include "clock.h" |
klauss | 120:770f00554b1e | 21 | |
klauss | 120:770f00554b1e | 22 | int header_app_init ( void ); |
klauss | 120:770f00554b1e | 23 | int try_reconnect_with_eth ( void ); |
klauss | 120:770f00554b1e | 24 | int show_stats ( void ); |
klauss | 120:770f00554b1e | 25 | int reset_stats ( void ); |
klauss | 120:770f00554b1e | 26 | int show_cb_list ( Vector * v_cb ); |
klauss | 120:770f00554b1e | 27 | int show_cb_long_list ( Vector * v_cb ); |
klauss | 120:770f00554b1e | 28 | int show_cb ( Vector * v_cb ); |
klauss | 120:770f00554b1e | 29 | int show_cb_sip ( Vector * v_cb ); |
klauss | 120:770f00554b1e | 30 | int show_sizes ( void ); |
klauss | 120:770f00554b1e | 31 | int check_udp_packages_pending ( Vector * v_cb ); |
klauss | 120:770f00554b1e | 32 | int show_cb_content ( void ); |
klauss | 120:770f00554b1e | 33 | int show_cb_content_all ( void ); |
klauss | 120:770f00554b1e | 34 | int show_rtp ( void ); |
klauss | 120:770f00554b1e | 35 | int fuck_rtp ( Vector * v_cb ); |
klauss | 120:770f00554b1e | 36 | int show_hex_cb_content ( void ); |
klauss | 120:770f00554b1e | 37 | int show_hex_cb_content_all ( void ); |
klauss | 120:770f00554b1e | 38 | int show_cB_sip ( void ); |
klauss | 120:770f00554b1e | 39 | int show_cB_sip_all ( void ); |
klauss | 120:770f00554b1e | 40 | int show_cB_hex_sip ( void ); |
klauss | 120:770f00554b1e | 41 | int show_rtp_on_call ( void ); |
klauss | 120:770f00554b1e | 42 | int show_call ( void ); |
klauss | 120:770f00554b1e | 43 | int show_hex_call ( void ); |
klauss | 120:770f00554b1e | 44 | int show_cb_rtp ( void ); |
klauss | 120:770f00554b1e | 45 | int show_cb_hex_rtp ( void ); |
klauss | 120:770f00554b1e | 46 | int reset_stats_cks ( void ); |
klauss | 120:770f00554b1e | 47 | int show_cb_stats ( void ); |
klauss | 120:770f00554b1e | 48 | |
klauss | 120:770f00554b1e | 49 | // zera os contadores de pacotes que resultaram em falha de envio vio ETH |
klauss | 120:770f00554b1e | 50 | int reset_missed_send_udp ( void ); |
klauss | 120:770f00554b1e | 51 | |
klauss | 120:770f00554b1e | 52 | // exibe estatisticas de pacotes que resultaram em falha de envio na interface ETH |
klauss | 120:770f00554b1e | 53 | int show_missed_send_udp_pkg ( void ); |
klauss | 120:770f00554b1e | 54 | |
klauss | 120:770f00554b1e | 55 | int invite_ack_to_cb_handler ( Vector * v_cb, Vector * v_call ); |
klauss | 120:770f00554b1e | 56 | |
klauss | 120:770f00554b1e | 57 | int check_audio_from_ast ( Vector * v_cb, Vector * v_call ); |
klauss | 120:770f00554b1e | 58 | |
klauss | 120:770f00554b1e | 59 | int wake_up_or_refresh_handler ( Vector * v_cb ); |
klauss | 120:770f00554b1e | 60 | |
klauss | 120:770f00554b1e | 61 | int check_sip_messages_from_ast ( Vector * v_cb, Vector * v_call ); |
klauss | 120:770f00554b1e | 62 | |
klauss | 120:770f00554b1e | 63 | /* rotina de verificação de TS's perdidos */ |
klauss | 120:770f00554b1e | 64 | int check_for_runaways_ts ( Vector * v_cb, Timeslice * ts ); |
klauss | 120:770f00554b1e | 65 | |
klauss | 120:770f00554b1e | 66 | int show_wdt_status ( void ); |
klauss | 120:770f00554b1e | 67 | |
klauss | 120:770f00554b1e | 68 | int wdt_update ( void ); |
klauss | 120:770f00554b1e | 69 | |
klauss | 120:770f00554b1e | 70 | |
klauss | 120:770f00554b1e | 71 | /* rotina "zeradora" de portas RTP */ |
klauss | 120:770f00554b1e | 72 | int check_for_unwanted_rtp_ports ( Vector * v_cb ); |
klauss | 120:770f00554b1e | 73 | |
klauss | 120:770f00554b1e | 74 | extern short int eth_status; |
klauss | 120:770f00554b1e | 75 | |
klauss | 120:770f00554b1e | 76 | extern Timer sync_timer; |
klauss | 120:770f00554b1e | 77 | extern Timer led_sync_timer; |
klauss | 120:770f00554b1e | 78 | |
klauss | 120:770f00554b1e | 79 | /* representa ramal do call box */ |
klauss | 120:770f00554b1e | 80 | extern int ext; |
klauss | 120:770f00554b1e | 81 | |
klauss | 120:770f00554b1e | 82 | /* representa porta do call box */ |
klauss | 120:770f00554b1e | 83 | extern int port; |
klauss | 120:770f00554b1e | 84 | |
klauss | 120:770f00554b1e | 85 | /* buffer para onde se copia os dados vindos do cb para tratameno interno */ |
klauss | 120:770f00554b1e | 86 | extern uint8_t buffer[ CB_BUFFER_SIZE ]; |
klauss | 120:770f00554b1e | 87 | |
klauss | 120:770f00554b1e | 88 | /* buffer de escrita do pacote de saida que sera enviado pro cb / servidor */ |
klauss | 120:770f00554b1e | 89 | extern uint8_t write_buffer[ CB_BUFFER_SIZE ]; |
klauss | 120:770f00554b1e | 90 | |
klauss | 120:770f00554b1e | 91 | /* ponteiro que aponta para os dados vindo do CPLD */ |
klauss | 120:770f00554b1e | 92 | extern uint8_t * buffer_from_cb_ptr; |
klauss | 120:770f00554b1e | 93 | |
klauss | 120:770f00554b1e | 94 | /* Armazena o ultimo pacote recebido dos CBx */ |
klauss | 120:770f00554b1e | 95 | extern uint8_t cb_rx_buffer[ CB_BUFFER_SIZE ]; |
klauss | 120:770f00554b1e | 96 | |
klauss | 120:770f00554b1e | 97 | /* referencia para os dados contidos no pacote, sem o header */ |
klauss | 120:770f00554b1e | 98 | extern uint8_t * data; |
klauss | 120:770f00554b1e | 99 | |
klauss | 120:770f00554b1e | 100 | /* gerencia o tipo do pacote para providenciar tratamento adequado */ |
klauss | 120:770f00554b1e | 101 | extern volatile uint8_t type; |
klauss | 120:770f00554b1e | 102 | |
klauss | 120:770f00554b1e | 103 | /* representa a lista dos Call Boxes atualmente recfonhecidos pela cabeceira */ |
klauss | 120:770f00554b1e | 104 | extern Vector * v_cb; |
klauss | 120:770f00554b1e | 105 | |
klauss | 120:770f00554b1e | 106 | /* representa a lista de ligacoes ativas na cabeceira */ |
klauss | 120:770f00554b1e | 107 | extern Vector * v_call; |
klauss | 120:770f00554b1e | 108 | |
klauss | 120:770f00554b1e | 109 | /* gerencia a distribuicao de timeslice para os call boxes */ |
klauss | 120:770f00554b1e | 110 | extern Timeslice * ts; |
klauss | 120:770f00554b1e | 111 | |
klauss | 120:770f00554b1e | 112 | extern uint8_t count; |
klauss | 120:770f00554b1e | 113 | |
klauss | 120:770f00554b1e | 114 | extern uint8_t max_registered_cbx; |
klauss | 120:770f00554b1e | 115 | |
klauss | 120:770f00554b1e | 116 | extern bool wake_all; |
klauss | 120:770f00554b1e | 117 | |
klauss | 120:770f00554b1e | 118 | extern uint16_t pkg_wdt; |
klauss | 120:770f00554b1e | 119 | |
klauss | 120:770f00554b1e | 120 | extern uint16_t eth_wdt; |
klauss | 120:770f00554b1e | 121 | |
klauss | 120:770f00554b1e | 122 | extern Timer invite_retry_timer; |
klauss | 120:770f00554b1e | 123 | |
klauss | 120:770f00554b1e | 124 | extern volatile u16_t lpc_low_level_input_counter; |
klauss | 120:770f00554b1e | 125 | #endif |