![](/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@14:22a35f575502, 2014-09-16 (annotated)
- Committer:
- klauss
- Date:
- Tue Sep 16 21:02:37 2014 +0000
- Revision:
- 14:22a35f575502
- Parent:
- 8:e3bfe62a477e
- Child:
- 17:67a6b557eda5
stable version
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 | 0:4d17cd9c8f9d | 18 | |
klauss | 0:4d17cd9c8f9d | 19 | using namespace std; |
klauss | 0:4d17cd9c8f9d | 20 | |
klauss | 0:4d17cd9c8f9d | 21 | extern DigitalOut led1; |
klauss | 0:4d17cd9c8f9d | 22 | extern DigitalOut led2; |
klauss | 0:4d17cd9c8f9d | 23 | extern DigitalOut led3; |
klauss | 0:4d17cd9c8f9d | 24 | extern DigitalOut led4; |
klauss | 14:22a35f575502 | 25 | #define set_status(a,b) _set_status(a,b) |
klauss | 14:22a35f575502 | 26 | #define _set_status(a,b){ \ |
klauss | 14:22a35f575502 | 27 | if( a != b ) debug_msg("Anterior %d -- Atual %d", a, b ); \ |
klauss | 14:22a35f575502 | 28 | if( a != NULL || b != NULL ) a = b; \ |
klauss | 14:22a35f575502 | 29 | else debug_msg("Paramento sip null"); \ |
klauss | 14:22a35f575502 | 30 | } |
klauss | 0:4d17cd9c8f9d | 31 | |
klauss | 0:4d17cd9c8f9d | 32 | void reverse( char str[], int length ); |
klauss | 0:4d17cd9c8f9d | 33 | char* itoa(int num, char* str, int base); |
klauss | 0:4d17cd9c8f9d | 34 | void reset_leds( void ); |
klauss | 8:e3bfe62a477e | 35 | int __init_eth__( EthernetInterface * eth ); |
klauss | 0:4d17cd9c8f9d | 36 | |
klauss | 0:4d17cd9c8f9d | 37 | Call_Box * __find_CB__( Vector * v_cb, int ext ); |
klauss | 0:4d17cd9c8f9d | 38 | VZ_call * __find_Call__( Vector * v_call, int ext ); |
klauss | 0:4d17cd9c8f9d | 39 | void registry_aging( Vector * v_cb, uint8_t * data, uint8_t * write_buffer ); |
klauss | 0:4d17cd9c8f9d | 40 | int sip_manager( Vector * v_cb, Vector * v_call, uint8_t * write_buffer ); |
klauss | 0:4d17cd9c8f9d | 41 | void call_manager( Vector * v_call, Vector * v_cb, uint8_t * data, uint8_t * write_buffer, Timeslice * ts ); |
klauss | 0:4d17cd9c8f9d | 42 | void build_telemetry_report( int ext, int port, char * data ); |
klauss | 0:4d17cd9c8f9d | 43 | void __send_to_cb__( uint8_t * buffer ); |
klauss | 0:4d17cd9c8f9d | 44 | |
klauss | 0:4d17cd9c8f9d | 45 | #endif |