Public Member Functions | Private Member Functions | Private Attributes | List of all members
mavrosflight::MavlinkUDP Class Reference

#include <mavlink_udp.h>

Inheritance diagram for mavrosflight::MavlinkUDP:
Inheritance graph
[legend]

Public Member Functions

 MavlinkUDP (std::string bind_host, uint16_t bind_port, std::string remote_host, uint16_t remote_port)
 Instantiates the class and begins communication on the specified serial port. More...
 
 ~MavlinkUDP ()
 Stops communication and closes the serial port before the object is destroyed. More...
 
- Public Member Functions inherited from mavrosflight::MavlinkComm
void close ()
 Stops communication and closes the port. More...
 
 MavlinkComm ()
 Instantiates the class and begins communication on the specified serial port. More...
 
void open ()
 Opens the port and begins communication. More...
 
void register_mavlink_listener (MavlinkListenerInterface *const listener)
 Register a listener for mavlink messages. More...
 
void send_message (const mavlink_message_t &msg)
 Send a mavlink message. More...
 
void unregister_mavlink_listener (MavlinkListenerInterface *const listener)
 Unregister a listener for mavlink messages. More...
 
 ~MavlinkComm ()
 Stops communication and closes the serial port before the object is destroyed. More...
 

Private Member Functions

virtual void do_async_read (const boost::asio::mutable_buffers_1 &buffer, boost::function< void(const boost::system::error_code &, size_t)> handler)
 
virtual void do_async_write (const boost::asio::const_buffers_1 &buffer, boost::function< void(const boost::system::error_code &, size_t)> handler)
 
virtual void do_close ()
 
virtual void do_open ()
 
virtual bool is_open ()
 

Private Attributes

boost::asio::ip::udp::endpoint bind_endpoint_
 
std::string bind_host_
 
uint16_t bind_port_
 
boost::asio::ip::udp::endpoint remote_endpoint_
 
std::string remote_host_
 
uint16_t remote_port_
 
boost::asio::ip::udp::socket socket_
 

Additional Inherited Members

- Protected Attributes inherited from mavrosflight::MavlinkComm
boost::asio::io_service io_service_
 boost io service provider More...
 

Detailed Description

Definition at line 50 of file mavlink_udp.h.

Constructor & Destructor Documentation

mavrosflight::MavlinkUDP::MavlinkUDP ( std::string  bind_host,
uint16_t  bind_port,
std::string  remote_host,
uint16_t  remote_port 
)

Instantiates the class and begins communication on the specified serial port.

Parameters
bind_hostHost where this node is running
bind_portPort number for this node
remote_hostHost where the other node is running
remote_portPort number for the other node

Definition at line 47 of file mavlink_udp.cpp.

mavrosflight::MavlinkUDP::~MavlinkUDP ( )

Stops communication and closes the serial port before the object is destroyed.

Definition at line 57 of file mavlink_udp.cpp.

Member Function Documentation

void mavrosflight::MavlinkUDP::do_async_read ( const boost::asio::mutable_buffers_1 &  buffer,
boost::function< void(const boost::system::error_code &, size_t)>  handler 
)
privatevirtual

Implements mavrosflight::MavlinkComm.

Definition at line 97 of file mavlink_udp.cpp.

void mavrosflight::MavlinkUDP::do_async_write ( const boost::asio::const_buffers_1 &  buffer,
boost::function< void(const boost::system::error_code &, size_t)>  handler 
)
privatevirtual

Implements mavrosflight::MavlinkComm.

Definition at line 102 of file mavlink_udp.cpp.

void mavrosflight::MavlinkUDP::do_close ( )
privatevirtual

Implements mavrosflight::MavlinkComm.

Definition at line 92 of file mavlink_udp.cpp.

void mavrosflight::MavlinkUDP::do_open ( )
privatevirtual

Implements mavrosflight::MavlinkComm.

Definition at line 67 of file mavlink_udp.cpp.

bool mavrosflight::MavlinkUDP::is_open ( )
privatevirtual

Implements mavrosflight::MavlinkComm.

Definition at line 62 of file mavlink_udp.cpp.

Member Data Documentation

boost::asio::ip::udp::endpoint mavrosflight::MavlinkUDP::bind_endpoint_
private

Definition at line 91 of file mavlink_udp.h.

std::string mavrosflight::MavlinkUDP::bind_host_
private

Definition at line 84 of file mavlink_udp.h.

uint16_t mavrosflight::MavlinkUDP::bind_port_
private

Definition at line 85 of file mavlink_udp.h.

boost::asio::ip::udp::endpoint mavrosflight::MavlinkUDP::remote_endpoint_
private

Definition at line 92 of file mavlink_udp.h.

std::string mavrosflight::MavlinkUDP::remote_host_
private

Definition at line 87 of file mavlink_udp.h.

uint16_t mavrosflight::MavlinkUDP::remote_port_
private

Definition at line 88 of file mavlink_udp.h.

boost::asio::ip::udp::socket mavrosflight::MavlinkUDP::socket_
private

Definition at line 90 of file mavlink_udp.h.


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


rosflight
Author(s): Daniel Koch , James Jackson
autogenerated on Wed Jul 3 2019 20:00:14