Modularizando o src

Dependencies:   EALib EthernetInterface_vz mbed-rtos mbed

Fork of header_main_colinas_V0-20-09-14 by VZTECH

Revision:
117:e9facba9db27
Parent:
116:39a41ebb675c
Child:
119:ee6a53069455
--- a/prompt.h	Thu Apr 23 20:24:09 2015 +0000
+++ b/prompt.h	Thu Apr 23 21:53:28 2015 +0000
@@ -12,6 +12,7 @@
 #include <stdint.h>
 #include "mbed.h"
 #include "EthernetInterface.h"
+#include "telemetry.h" // used for __TELEMETRY_SERVER_IP__ and __TELEMETRY_SERVER_PORT__
 #include "utils.h" // need for convert_ext_to_port()
 #include "flood.h"
 #include "shared_variables.h"
@@ -19,18 +20,17 @@
 #include "wdt_manager.h"
 #include "file_system_manager.h"
 #include "fw.h"
+#include "bootloader.h"
 
-const uint8_t PVERSION = 25;
-const uint8_t PROMPT_UDP_COMMAND_SIZE = 64;
-const uint8_t PERSISTENT_TCP_IDLE_MAX_TIME = 30;
+#define PVERSION 25
 
-const uint16_t TCP_IDLE_MAX_TIME = 360;
+#define TCP_IDLE_MAX_TIME 360//90
 ///< Define o tempo maximo de espera por um novo comando via eth, dado que já estamos em uma sessão TCP.
 
-const uint16_t TCP_ALIVE_IDLE_MAX_TIME = 360;
+#define TCP_ALIVE_IDLE_MAX_TIME 360
 ///< Define o tempo maximo de espera por um novo comando via eth dado que já estamos em uma sessão TCP e a flag tcp_alive esta on.
 
-const uint16_t  DEBUGBUFSIZE = __PROMPT_ETH_BUFFER_SIZE__;
+#define DEBUGBUFSIZE 50
 ///< Define o tamanho do buffer de entrada de dados.
 
 extern uint8_t dog;
@@ -49,7 +49,8 @@
 
 extern FILE *fudpport;      ///< arquivo de porta udp que a header escuta
 extern FILE *ftcpport;      ///< arquivo de porta tcp que a header escuta
-extern FILE *fshift_port;
+extern FILE *ftip;          ///< arquivo de IP do servidor para envio de telemetria
+extern FILE *ftport;        ///< arquivo de Porta UDP do servidor para envio de telemetria
 
 extern bool flood_silence;
 extern bool delayed_flood;
@@ -78,7 +79,7 @@
  * ...
  * @endcode
  */
-char * prompt_process( char * msg_from_cb, int length );
+char * prompt_process( char * ethernet_pkg );
 
 /**
  * @Synopsis Init file system and check if files exist
@@ -107,11 +108,4 @@
 extern char * debug_buf;
 ///< Buffer de entrada dos dados via serial.
 
-inline void reconnect_udp_prompt_process( void )
-{
-  udp_client.close();
-  udp_client.set_blocking( false, 0 );
-  udp_client.bind( UDP_PORT_LISTENER );
-}
-
 #endif
\ No newline at end of file