STIMA  3
udp_thread.h
1 #include <WiFiUdp.h>
2 #include "ozgps.h"
3 #include <cmath>
4 
5 #ifndef UDP_THREAD_H_
6 #define UDP_THREAD_H_
7 
8 /*
9 Android-GPSd-Forwarder send a burst of UDP packets > 6
10 so we have trouble to do not lost some packets
11 in lwip the buffer size for UDP is defined by
12 CONFIG_LWIP_UDP_RECVMBOX_SIZE
13 with default to 6
14 In arduino we cannot change this value because the librari is precompiled.
15 We can only speed up the task and hope.
16 The priority is set to 3 and delay is very short.
17 */
18 
19 struct udp_data_t {
20  int id;
21  frtosLogging* logger;
22  udpStatus_t* status;
23  georef_t* georef;
24 };
25 
26 using namespace cpp_freertos;
27 
28 class udpThread : public Thread {
29 
30  public:
37  udpThread(udp_data_t* udp_data);
38  ~udpThread();
39  virtual void Cleanup();
40 
41  protected:
42  virtual void Run();
43 
44  private:
45  void doUdp();
46  udp_data_t* data;
47 
48 };
49 
50 #endif
Definition: udp_thread.h:28
Definition: typedef.h:58
Definition: typedef.h:173
Definition: udp_thread.h:19