Modularizando o src
Dependencies: EALib EthernetInterface_vz mbed-rtos mbed
Fork of header_main_colinas_V0-20-09-14 by
utils.h@63:0d95da692bb4, 2014-10-28 (annotated)
- Committer:
- klauss
- Date:
- Tue Oct 28 12:44:45 2014 +0000
- Revision:
- 63:0d95da692bb4
- Parent:
- 62:07e5bdc9f8f7
- Child:
- 68:b54993674190
stats implementado, conta o nro de pacotes recebidos por determinado tipo
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
klauss | 0:4d17cd9c8f9d | 1 | #ifndef __UTILS_H__ |
klauss | 0:4d17cd9c8f9d | 2 | #define __UTILS_H__ |
klauss | 0:4d17cd9c8f9d | 3 | |
klauss | 0:4d17cd9c8f9d | 4 | #include <iostream> |
klauss | 0:4d17cd9c8f9d | 5 | #include <string.h> |
klauss | 14:22a35f575502 | 6 | #include "debug.h" |
klauss | 0:4d17cd9c8f9d | 7 | #include "mbed.h" |
klauss | 0:4d17cd9c8f9d | 8 | #include "EthernetInterface.h" |
klauss | 0:4d17cd9c8f9d | 9 | #include "vz_protocol.h" |
klauss | 0:4d17cd9c8f9d | 10 | #include "vector.h" |
klauss | 0:4d17cd9c8f9d | 11 | #include "sip.h" |
klauss | 0:4d17cd9c8f9d | 12 | #include "call.h" |
klauss | 0:4d17cd9c8f9d | 13 | #include "call_box.h" |
klauss | 0:4d17cd9c8f9d | 14 | #include "timeslice.h" |
klauss | 0:4d17cd9c8f9d | 15 | #include "parallelcpld.h" |
klauss | 0:4d17cd9c8f9d | 16 | #include "test.h" |
klauss | 31:bb5fb28a77df | 17 | #include "prompt.h" |
klauss | 48:195c97f12e8e | 18 | #include "configs.h" |
klauss | 0:4d17cd9c8f9d | 19 | |
klauss | 63:0d95da692bb4 | 20 | /* Armazena o ultimo pacote enviado para os CBx */ |
klauss | 63:0d95da692bb4 | 21 | extern uint8_t cb_tx_buffer[ __CB_BUFFER_SIZE__ ]; |
klauss | 63:0d95da692bb4 | 22 | |
klauss | 0:4d17cd9c8f9d | 23 | using namespace std; |
klauss | 0:4d17cd9c8f9d | 24 | |
klauss | 0:4d17cd9c8f9d | 25 | extern DigitalOut led1; |
klauss | 0:4d17cd9c8f9d | 26 | extern DigitalOut led2; |
klauss | 0:4d17cd9c8f9d | 27 | extern DigitalOut led3; |
klauss | 0:4d17cd9c8f9d | 28 | extern DigitalOut led4; |
klauss | 48:195c97f12e8e | 29 | extern EthernetInterface eth; |
klauss | 14:22a35f575502 | 30 | #define set_status(a,b) _set_status(a,b) |
klauss | 14:22a35f575502 | 31 | #define _set_status(a,b){ \ |
klauss | 31:bb5fb28a77df | 32 | if( a != b ) if( debug_sip )debug_msg("Anterior %d -- Atual %d", a, b ); \ |
klauss | 14:22a35f575502 | 33 | if( a != NULL || b != NULL ) a = b; \ |
klauss | 31:bb5fb28a77df | 34 | else if( debug_sip ) debug_msg("Paramento sip null"); \ |
klauss | 14:22a35f575502 | 35 | } |
klauss | 0:4d17cd9c8f9d | 36 | |
klauss | 0:4d17cd9c8f9d | 37 | void reverse( char str[], int length ); |
klauss | 0:4d17cd9c8f9d | 38 | char* itoa(int num, char* str, int base); |
klauss | 0:4d17cd9c8f9d | 39 | void reset_leds( void ); |
klauss | 48:195c97f12e8e | 40 | int __init_eth__( void ); |
klauss | 0:4d17cd9c8f9d | 41 | |
klauss | 0:4d17cd9c8f9d | 42 | Call_Box * __find_CB__( Vector * v_cb, int ext ); |
klauss | 0:4d17cd9c8f9d | 43 | VZ_call * __find_Call__( Vector * v_call, int ext ); |
klauss | 0:4d17cd9c8f9d | 44 | void registry_aging( Vector * v_cb, uint8_t * data, uint8_t * write_buffer ); |
klauss | 0:4d17cd9c8f9d | 45 | int sip_manager( Vector * v_cb, Vector * v_call, uint8_t * write_buffer ); |
klauss | 0:4d17cd9c8f9d | 46 | void call_manager( Vector * v_call, Vector * v_cb, uint8_t * data, uint8_t * write_buffer, Timeslice * ts ); |
klauss | 0:4d17cd9c8f9d | 47 | void build_telemetry_report( int ext, int port, char * data ); |
klauss | 0:4d17cd9c8f9d | 48 | void __send_to_cb__( uint8_t * buffer ); |
klauss | 62:07e5bdc9f8f7 | 49 | int ls_comp( const void * a, const void * b ); |
klauss | 0:4d17cd9c8f9d | 50 | |
klauss | 0:4d17cd9c8f9d | 51 | #endif |