Modularizando o src

Dependencies:   EALib EthernetInterface_vz mbed-rtos mbed

Fork of header_main_colinas_V0-20-09-14 by VZTECH

Revision:
108:18a3702650f3
Parent:
107:cf1e43414adb
Child:
109:a5b8264ffbbc
--- a/prompt.cpp	Mon Mar 16 14:05:05 2015 +0000
+++ b/prompt.cpp	Wed Mar 18 13:33:54 2015 +0000
@@ -14,6 +14,7 @@
 char tmp_cmd[ DEBUGBUFSIZE ] = "help";
 char last_debug_buf[ DEBUGBUFSIZE ] = "help";
 char eth_buffer[ __PROMPT_ETH_BUFFER_SIZE__ ];
+char eth_udp_buffer[ __PROMPT_ETH_BUFFER_SIZE__ ];
 char gp_buff[ DEBUGBUFSIZE ];
 
 FILE *fip, *fmask, *fgate, *fport, *fsip, *fsport, *fext, *fserext, *fudpport, *ftcpport, *ffwip, *ffwport, *fmax, *fmin, *fshift_port;
@@ -110,7 +111,9 @@
                 from_eth = true;
                 bufret = 1;
     
-                if( !( strcmp( eth_buffer, "quit" ) ) ) {
+                if( !( strcmp( eth_buffer, "quit" ) ) )
+                {
+                    tcp_timer.stop();
                     tcp_timer.reset();
                     debug_buf = __debug_buf__;
                     bufptr = last_bufptr;
@@ -417,6 +420,16 @@
                 }
             }
         }
+        
+        else if( xstrmatch( (uint8_t*)debug_buf, (uint8_t*) "rtp" ) ) {
+            miss_match = false;
+            dshow_rtp = true;
+        }
+        
+        else if( xstrmatch( (uint8_t*)debug_buf, (uint8_t*) "callrtp" ) ) {
+            miss_match = false;
+            dcallshow_rtp = true;
+        }
 
         else if( xstrmatch( (uint8_t*)debug_buf, (uint8_t*) "test" ) ) {
             miss_match = false;
@@ -742,6 +755,37 @@
             }
         }
         
+        else if( xmemmatch( (uint8_t*)debug_buf, (uint8_t*) "dresetrtp ", 10 ) ) {
+            if (xmemmatch( (uint8_t*)(debug_buf + 10 ), (uint8_t*) "on", 2 ) ) {
+                miss_match = false;
+                if( debug_uart3 && !( from_eth ) ) pc.printf( "\n\rReset RTP Debug ON\n\r" );
+                if( from_eth ) {
+                    snprintf( debug_buf, __PROMPT_ETH_BUFFER_SIZE__, "Reset RTP Debug On\n\r");
+                    debug_buf[ strlen( debug_buf ) - 1 ] = '\0';
+                    if( tcp_session && !udp_query ) {
+                        tcp_client.send_all( debug_buf, strlen( debug_buf ) );
+                    } else if( udp_query ) {
+                        udp_query_send_msg( debug_buf );
+                    }
+                }
+                debug_reset_rtp = true;
+            }
+            if (xmemmatch( (uint8_t*)(debug_buf + 10 ), (uint8_t*) "off",3 )) {
+                miss_match = false;
+                if( debug_uart3 && !( from_eth ) ) pc.printf( "\n\rReset RTP Debug OFF\n\r" );
+                if( from_eth ) {
+                    snprintf( debug_buf, __PROMPT_ETH_BUFFER_SIZE__, "Reset RTP Debug Off\n\r");
+                    debug_buf[ strlen( debug_buf ) - 1 ] = '\0';
+                    if( tcp_session && !udp_query ) {
+                        tcp_client.send_all( debug_buf, strlen( debug_buf ) );
+                    } else if( udp_query ) {
+                        udp_query_send_msg( debug_buf );
+                    }
+                }
+                debug_reset_rtp = false;
+            }
+        }
+        
         
         else if( xmemmatch( (uint8_t*)debug_buf, (uint8_t*) "drtp ", 5 ) ) {
             if (xmemmatch( (uint8_t*)(debug_buf + 5 ), (uint8_t*) "on", 2 ) ) {