APM:Libraries
RCInput_UDP.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RCInput.h"
5 #include "RCInput_UDP_Protocol.h"
6 
7 #define RCINPUT_UDP_DEF_PORT 777
8 
9 namespace Linux {
10 
11 class RCInput_UDP : public RCInput
12 {
13 public:
14  RCInput_UDP();
15  void init();
16  void _timer_tick(void);
17 private:
18  SocketAPM _socket{true};
19  uint16_t _port;
20  struct rc_udp_packet _buf;
21  uint64_t _last_buf_ts;
22  uint16_t _last_buf_seq;
23 };
24 
25 }
SocketAPM _socket
Definition: RCInput_UDP.h:18
uint64_t _last_buf_ts
Definition: RCInput_UDP.h:21
struct rc_udp_packet _buf
Definition: RCInput_UDP.h:20
void _timer_tick(void)
Definition: RCInput_UDP.cpp:29
uint16_t _last_buf_seq
Definition: RCInput_UDP.h:22