mavtables
0.2.1
MAVLink router and firewall.
|
#include <Interface.hpp>
Public Member Functions | |
virtual | ~Interface () |
virtual void | send_packet (const std::chrono::nanoseconds &timeout)=0 |
virtual void | receive_packet (const std::chrono::nanoseconds &timeout)=0 |
Protected Member Functions | |
virtual std::ostream & | print_ (std::ostream &os) const =0 |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Interface &interface) |
The base class for all interfaces.
Derived classes should add one or more connections to queue packets for sending.
Definition at line 33 of file Interface.hpp.
|
virtual |
Definition at line 27 of file Interface.cpp.
|
protectedpure virtual |
Print the interface to the given output stream.
os | The output stream to print to. |
Implemented in UDPInterface, and SerialInterface.
|
pure virtual |
Receive a packet on the interface.
timeout | The maximum amount of time to wait for incoming data. |
Implemented in UDPInterface, and SerialInterface.
|
pure virtual |
Send a packet from one of the interface's connections.
timeout | The maximum amount of time to wait for a packet to be available for sending. |
Implemented in UDPInterface, and SerialInterface.
|
friend |
Print the given Interface to the given output stream.
Some examples are:
os | The output stream to print to. |
interface | The interface (or any child of the Interface) to print. |
Definition at line 58 of file Interface.cpp.