Modularizando o src
Dependencies: EALib EthernetInterface_vz mbed-rtos mbed
Fork of header_main_colinas_V0-20-09-14 by
power_source_monitoring.h@137:32dd35a6dbc9, 2015-11-24 (annotated)
- Committer:
- klauss
- Date:
- Tue Nov 24 14:06:22 2015 +0000
- Revision:
- 137:32dd35a6dbc9
- Parent:
- 132:05cd37f7e007
core source of the .bin (09/21/2015) in the field
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
klauss | 128:3ae1c74773a8 | 1 | #ifndef __POWER_SOURCE_MONITORING_H__ |
klauss | 128:3ae1c74773a8 | 2 | #define __POWER_SOURCE_MONITORING_H__ |
klauss | 128:3ae1c74773a8 | 3 | |
klauss | 128:3ae1c74773a8 | 4 | #include "mbed.h" |
klauss | 128:3ae1c74773a8 | 5 | #include "bits.h" |
klauss | 128:3ae1c74773a8 | 6 | #include "EthernetInterface.h" |
klauss | 128:3ae1c74773a8 | 7 | #include "debug.h" |
klauss | 128:3ae1c74773a8 | 8 | #include "vz_protocol.h" |
klauss | 132:05cd37f7e007 | 9 | %: include "config_manager.h" |
klauss | 132:05cd37f7e007 | 10 | %: include "shared_variables.h" |
klauss | 132:05cd37f7e007 | 11 | %: include "string.h" |
klauss | 128:3ae1c74773a8 | 12 | |
klauss | 132:05cd37f7e007 | 13 | const uint16_t u16_POWER_SOURCE_PORT = 4000; |
klauss | 132:05cd37f7e007 | 14 | const uint8_t u8_WAIT_TO_WARN = 60; |
klauss | 132:05cd37f7e007 | 15 | const uint8_t u8_POWER_MSG_LENGTH = strlen ( "mainpowerisdown" ); |
klauss | 132:05cd37f7e007 | 16 | |
klauss | 132:05cd37f7e007 | 17 | extern Timer power_source_timer; |
klauss | 128:3ae1c74773a8 | 18 | extern DigitalIn pwr_src_in; |
klauss | 132:05cd37f7e007 | 19 | extern UDPSocket power_source_client; |
klauss | 128:3ae1c74773a8 | 20 | extern Endpoint pwr_src_server; |
klauss | 132:05cd37f7e007 | 21 | extern uint8_t power_source_status; |
klauss | 128:3ae1c74773a8 | 22 | |
klauss | 128:3ae1c74773a8 | 23 | /* Inicializacao da comunicacao UDP com o servidor para monitoramento de fonte de alimentacao */ |
klauss | 132:05cd37f7e007 | 24 | int init_power_source (); |
klauss | 132:05cd37f7e007 | 25 | int reconnect_power_source ( void ); |
klauss | 128:3ae1c74773a8 | 26 | |
klauss | 128:3ae1c74773a8 | 27 | #endif |