File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed
MavLinkCom/src/serial_com Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 9
9
class Port {
10
10
public:
11
11
// write to the port, return number of bytes written or -1 if error.
12
- virtual int write (const uint8_t *ptr, int count){} ;
12
+ virtual int write (const uint8_t *ptr, int count) = 0 ;
13
13
14
14
// read a given number of bytes from the port (blocking until the requested bytes are available).
15
15
// return the number of bytes read or -1 if error.
16
- virtual int read (uint8_t *buffer, int bytesToRead){} ;
16
+ virtual int read (uint8_t *buffer, int bytesToRead) = 0 ;
17
17
18
18
// close the port.
19
- virtual void close (){} ;
19
+ virtual void close () = 0 ;
20
20
21
- virtual bool isClosed (){} ;
21
+ virtual bool isClosed () = 0 ;
22
22
23
- virtual int getRssi (const char *ifaceName){} ;
23
+ virtual int getRssi (const char *ifaceName) = 0 ;
24
24
25
- Port () = default ;
26
25
virtual ~Port () = default ;
27
26
};
28
27
Original file line number Diff line number Diff line change 5
5
#include " SocketInit.hpp"
6
6
#include " Utils.hpp"
7
7
#include " wifi.h"
8
- #include < stdio.h >
9
- #include < string.h >
8
+ #include < cstdio >
9
+ #include < cstring >
10
10
11
11
using namespace mavlink_utils ;
12
12
Original file line number Diff line number Diff line change 5
5
#define SERIAL_COM_UDPCLIENTPORT_HPP
6
6
7
7
#include " Port.h"
8
+ #include < memory>
9
+ #include < string>
8
10
9
11
class UdpClientPort : public Port {
10
12
public:
You can’t perform that action at this time.
0 commit comments