![](/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
utils.h@48:195c97f12e8e, 2014-10-20 (annotated)
- Committer:
- klauss
- Date:
- Mon Oct 20 16:13:10 2014 +0000
- Revision:
- 48:195c97f12e8e
- Parent:
- 31:bb5fb28a77df
- Child:
- 62:07e5bdc9f8f7
versao em validacao
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 "NTPClient.h" |
klauss | 0:4d17cd9c8f9d | 16 | #include "parallelcpld.h" |
klauss | 0:4d17cd9c8f9d | 17 | #include "test.h" |
klauss | 31:bb5fb28a77df | 18 | #include "prompt.h" |
klauss | 48:195c97f12e8e | 19 | #include "configs.h" |
klauss | 0:4d17cd9c8f9d | 20 | |
klauss | 0:4d17cd9c8f9d | 21 | using namespace std; |
klauss | 0:4d17cd9c8f9d | 22 | |
klauss | 0:4d17cd9c8f9d | 23 | extern DigitalOut led1; |
klauss | 0:4d17cd9c8f9d | 24 | extern DigitalOut led2; |
klauss | 0:4d17cd9c8f9d | 25 | extern DigitalOut led3; |
klauss | 0:4d17cd9c8f9d | 26 | extern DigitalOut led4; |
klauss | 48:195c97f12e8e | 27 | extern EthernetInterface eth; |
klauss | 14:22a35f575502 | 28 | #define set_status(a,b) _set_status(a,b) |
klauss | 14:22a35f575502 | 29 | #define _set_status(a,b){ \ |
klauss | 31:bb5fb28a77df | 30 | if( a != b ) if( debug_sip )debug_msg("Anterior %d -- Atual %d", a, b ); \ |
klauss | 14:22a35f575502 | 31 | if( a != NULL || b != NULL ) a = b; \ |
klauss | 31:bb5fb28a77df | 32 | else if( debug_sip ) debug_msg("Paramento sip null"); \ |
klauss | 14:22a35f575502 | 33 | } |
klauss | 0:4d17cd9c8f9d | 34 | |
klauss | 0:4d17cd9c8f9d | 35 | void reverse( char str[], int length ); |
klauss | 0:4d17cd9c8f9d | 36 | char* itoa(int num, char* str, int base); |
klauss | 0:4d17cd9c8f9d | 37 | void reset_leds( void ); |
klauss | 48:195c97f12e8e | 38 | int __init_eth__( void ); |
klauss | 0:4d17cd9c8f9d | 39 | |
klauss | 0:4d17cd9c8f9d | 40 | Call_Box * __find_CB__( Vector * v_cb, int ext ); |
klauss | 0:4d17cd9c8f9d | 41 | VZ_call * __find_Call__( Vector * v_call, int ext ); |
klauss | 0:4d17cd9c8f9d | 42 | void registry_aging( Vector * v_cb, uint8_t * data, uint8_t * write_buffer ); |
klauss | 0:4d17cd9c8f9d | 43 | int sip_manager( Vector * v_cb, Vector * v_call, uint8_t * write_buffer ); |
klauss | 0:4d17cd9c8f9d | 44 | void call_manager( Vector * v_call, Vector * v_cb, uint8_t * data, uint8_t * write_buffer, Timeslice * ts ); |
klauss | 0:4d17cd9c8f9d | 45 | void build_telemetry_report( int ext, int port, char * data ); |
klauss | 0:4d17cd9c8f9d | 46 | void __send_to_cb__( uint8_t * buffer ); |
klauss | 0:4d17cd9c8f9d | 47 | |
klauss | 0:4d17cd9c8f9d | 48 | #endif |