An embedded server sending sensor information over the network to a remote client side process parsing the data
Dependencies: EthernetInterface NTPClient TimeInterface WebSocketClient mbed-rtos mbed ST_Events-old
Diff: data_logger.h
- Revision:
- 2:5c9125d3ddae
- Child:
- 3:221997836268
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data_logger.h Fri Jul 21 01:56:38 2017 +0000 @@ -0,0 +1,28 @@ +#include "mbed.h" +#include "EthernetInterface.h" +#include "NTPClient.h" +#include "TimeInterface.h" +#include "rtos.h" +#include "Timer.h" +#include "mbed_events.h" +#define SERVER_PORT 7 +#define RATE 10000 + +int data = 711; //Example test data to be sent across the network +int i = 0; +char appbuffer[105]; //Application buffer +int len = 105; //Length of the buffer +float cycle_time; +int p_press = 0; +int id_press = 0; + +//int samples[]; + +void cycle_time_isr_rise(void); +//ISR on the rising edge of the digital input starting the cycle timer and stopping the periodic reporting thread + +void cycle_time_isr_fall(void); +//ISR on the falling edge of the digital input stopping the cycle timer and restarting the periodic reporting thread + +void pressure_report(void); +//sends the XML markup payload with idle hydraulic line pressure data at a prescribed rate