UDP interface. More...
#include <udp.h>
Public Member Functions | |
void | close () |
Close connection. | |
bool | is_open () |
MAVConnUDP (uint8_t system_id=1, uint8_t component_id=MAV_COMP_ID_UDP_BRIDGE, std::string bind_host="localhost", unsigned short bind_port=14555, std::string remote_host="", unsigned short remote_port=14550) | |
void | send_bytes (const uint8_t *bytes, size_t length) |
Send raw bytes (for some quirks) | |
void | send_message (const mavlink_message_t *message, uint8_t sysid, uint8_t compid) |
Send message Can be used in message_received signal. | |
~MAVConnUDP () | |
Private Member Functions | |
void | async_receive_end (boost::system::error_code, size_t bytes_transferred) |
void | async_sendto_end (boost::system::error_code, size_t bytes_transferred) |
void | do_recvfrom () |
void | do_sendto (bool check_tx_state) |
Private Attributes | |
boost::asio::ip::udp::endpoint | bind_ep |
boost::asio::io_service | io_service |
std::thread | io_thread |
std::unique_ptr < boost::asio::io_service::work > | io_work |
boost::asio::ip::udp::endpoint | last_remote_ep |
std::recursive_mutex | mutex |
boost::asio::ip::udp::endpoint | remote_ep |
std::atomic< bool > | remote_exists |
uint8_t | rx_buf [MsgBuffer::MAX_SIZE] |
boost::asio::ip::udp::socket | socket |
std::atomic< bool > | tx_in_progress |
std::list< MsgBuffer * > | tx_q |