VZTECH / Mbed 2 deprecated header_main_publish

Dependencies:   EthernetInterface NTPClient mbed-rtos_old mbed

Fork of header_main_public by VZTECH

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers utils.h Source File

utils.h

00001 #ifndef __UTILS_H__
00002 #define __UTILS_H__
00003 
00004 #include <iostream>
00005 #include <string.h>
00006 #include "debug.h"
00007 #include "mbed.h"
00008 #include "EthernetInterface.h"
00009 #include "vz_protocol.h"
00010 #include "vector.h"
00011 #include "sip.h"
00012 #include "call.h"
00013 #include "call_box.h"
00014 #include "timeslice.h"
00015 #include "NTPClient.h"
00016 #include "parallelcpld.h"
00017 #include "test.h"
00018 
00019 using namespace std;
00020 
00021 extern DigitalOut led1;
00022 extern DigitalOut led2;
00023 extern DigitalOut led3;
00024 extern DigitalOut led4;
00025 #define set_status(a,b) _set_status(a,b)
00026 #define _set_status(a,b){ \
00027   if( a != b ) debug_msg("Anterior %d -- Atual %d", a, b ); \
00028   if( a != NULL || b != NULL ) a = b; \
00029   else debug_msg("Paramento sip null"); \
00030 }
00031 
00032 void reverse( char str[], int length );
00033 char* itoa(int num, char* str, int base);
00034 void reset_leds( void );
00035 int __init_eth__( EthernetInterface * eth );
00036 
00037 Call_Box * __find_CB__( Vector * v_cb, int ext );
00038 VZ_call * __find_Call__( Vector * v_call, int ext );
00039 void registry_aging( Vector * v_cb, uint8_t * data, uint8_t * write_buffer );
00040 int sip_manager( Vector * v_cb, Vector * v_call, uint8_t * write_buffer );
00041 void call_manager( Vector * v_call, Vector * v_cb, uint8_t * data, uint8_t * write_buffer, Timeslice * ts );
00042 void build_telemetry_report( int ext, int port, char * data );
00043 void __send_to_cb__( uint8_t * buffer );
00044 
00045 #endif