Modularizando o src

Dependencies:   EALib EthernetInterface_vz mbed-rtos mbed

Fork of header_main_colinas_V0-20-09-14 by VZTECH

Revision:
132:05cd37f7e007
Parent:
128:3ae1c74773a8
--- a/power_source_monitoring.h	Tue Jul 21 20:03:35 2015 +0000
+++ b/power_source_monitoring.h	Tue Sep 01 17:21:11 2015 +0000
@@ -6,16 +6,22 @@
 #include "EthernetInterface.h"
 #include "debug.h"
 #include "vz_protocol.h"
-
-const uint16_t PWR_SRC_PORT = 4000;
+%: include "config_manager.h"
+%: include "shared_variables.h"
+%: include "string.h"
 
-extern Timer pwr_src_timer;
+const uint16_t u16_POWER_SOURCE_PORT = 4000;
+const uint8_t u8_WAIT_TO_WARN = 60;
+const uint8_t u8_POWER_MSG_LENGTH = strlen ( "mainpowerisdown" );
+
+extern Timer power_source_timer;
 extern DigitalIn pwr_src_in;
-extern UDPSocket pwr_src_client;
+extern UDPSocket power_source_client;
 extern Endpoint pwr_src_server;
-extern uint8_t pwr_src_status;
+extern uint8_t power_source_status;
 
 /* Inicializacao da comunicacao UDP com o servidor para monitoramento de fonte de alimentacao */
-int init_pwr_src();
+int init_power_source ();
+int reconnect_power_source ( void );
 
 #endif
\ No newline at end of file