Public Member Functions | Private Member Functions | Private Attributes | Friends
mavconn::MAVConnTCPClient Class Reference

TCP client interface. More...

#include <tcp.h>

Inheritance diagram for mavconn::MAVConnTCPClient:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void close ()
 Close connection.
bool is_open ()
 MAVConnTCPClient (uint8_t system_id=1, uint8_t component_id=MAV_COMP_ID_UDP_BRIDGE, std::string server_host="localhost", unsigned short server_port=5760)
 MAVConnTCPClient (uint8_t system_id, uint8_t component_id, boost::asio::io_service &server_io)
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.
 ~MAVConnTCPClient ()

Private Member Functions

void async_receive_end (boost::system::error_code, size_t bytes_transferred)
void async_send_end (boost::system::error_code, size_t bytes_transferred)
void client_connected (int server_channel)
void do_recv ()
void do_send (bool check_tx_state)

Private Attributes

boost::asio::io_service io_service
std::thread io_thread
std::unique_ptr
< boost::asio::io_service::work > 
io_work
std::recursive_mutex mutex
uint8_t rx_buf [MsgBuffer::MAX_SIZE]
boost::asio::ip::tcp::endpoint server_ep
boost::asio::ip::tcp::socket socket
std::atomic< bool > tx_in_progress
std::list< MsgBuffer * > tx_q

Friends

class MAVConnTCPServer

Detailed Description

TCP client interface.

Note:
IPv4 only

Definition at line 33 of file tcp.h.


The documentation for this class was generated from the following files:


libmavconn
Author(s): Vladimir Ermakov
autogenerated on Thu Feb 9 2017 04:00:13