MAVConn connection handling library. More...
Namespaces | |
mavconn | |
Classes | |
class | mavconn::DeviceError |
Common exception for communication error. More... | |
struct | mavconn::MAVConnInterface::IOStat |
class | mavconn::MAVConnInterface |
Generic mavlink interface. More... | |
class | mavconn::MAVConnSerial |
Serial interface. More... | |
class | mavconn::MAVConnTCPClient |
TCP client interface. More... | |
class | mavconn::MAVConnTCPServer |
TCP server interface. More... | |
class | mavconn::MAVConnUDP |
UDP interface. More... | |
struct | mavconn::MsgBuffer |
Message buffer for internal use in libmavconn. More... | |
Macros | |
#define | CONSOLE_BRIDGE_logDebug(fmt, ...) console_bridge::log(__FILE__, __LINE__, console_bridge::CONSOLE_BRIDGE_LOG_DEBUG, fmt, ##__VA_ARGS__) |
#define | CONSOLE_BRIDGE_logError(fmt, ...) console_bridge::log(__FILE__, __LINE__, console_bridge::CONSOLE_BRIDGE_LOG_ERROR, fmt, ##__VA_ARGS__) |
#define | CONSOLE_BRIDGE_logInform(fmt, ...) console_bridge::log(__FILE__, __LINE__, console_bridge::CONSOLE_BRIDGE_LOG_INFO, fmt, ##__VA_ARGS__) |
#define | CONSOLE_BRIDGE_logWarn(fmt, ...) console_bridge::log(__FILE__, __LINE__, console_bridge::CONSOLE_BRIDGE_LOG_WARN, fmt, ##__VA_ARGS__) |
#define | PFX "mavconn: " |
#define | PFX "mavconn: tcp" |
#define | PFX "mavconn: udp" |
#define | PFX "mavconn: serial" |
#define | PFXd PFX "%zu: " |
#define | PFXd PFX "%zu: " |
#define | PFXd PFX "%zu: " |
Typedefs | |
using | mavconn::MAVConnInterface::ClosedCb = std::function< void(void)> |
using | mavconn::MAVConnInterface::ConstPtr = std::shared_ptr< MAVConnInterface const > |
using | mavconn::lock_guard = std::lock_guard< std::recursive_mutex > |
using | mavconn::MAVConnInterface::Ptr = std::shared_ptr< MAVConnInterface > |
using | mavconn::MAVConnInterface::ReceivedCb = std::function< void(const mavlink::mavlink_message_t *message, const Framing framing)> |
using | mavconn::steady_clock = std::chrono::steady_clock |
using | mavconn::MAVConnInterface::WeakPtr = std::weak_ptr< MAVConnInterface > |
Enumerations | |
enum | mavconn::Framing : uint8_t { mavconn::Framing::incomplete = mavlink::MAVLINK_FRAMING_INCOMPLETE, mavconn::Framing::ok = mavlink::MAVLINK_FRAMING_OK, mavconn::Framing::bad_crc = mavlink::MAVLINK_FRAMING_BAD_CRC, mavconn::Framing::bad_signature = mavlink::MAVLINK_FRAMING_BAD_SIGNATURE } |
Rx packer framing status. (same as mavlink::mavlink_framing_t ) More... | |
enum | mavconn::Protocol : uint8_t { mavconn::Protocol::V10 = 1, mavconn::Protocol::V20 = 2 } |
MAVLink protocol version. More... | |
Functions | |
void | mavconn::MAVConnTCPServer::client_closed (std::weak_ptr< MAVConnTCPClient > weak_instp) |
void | mavconn::MAVConnTCPClient::client_connected (size_t server_channel) |
void | mavconn::MAVConnSerial::close () override |
Close connection. More... | |
void | mavconn::MAVConnUDP::close () override |
Close connection. More... | |
void | mavconn::MAVConnTCPClient::close () override |
Close connection. More... | |
void | mavconn::MAVConnTCPServer::close () override |
Close connection. More... | |
virtual void | mavconn::MAVConnInterface::close ()=0 |
Close connection. More... | |
template<typename T > | |
mavconn::DeviceError::DeviceError (const char *module, T msg) | |
void | mavconn::MAVConnTCPServer::do_accept () |
void | mavconn::MAVConnSerial::do_read () |
void | mavconn::MAVConnTCPClient::do_recv () |
void | mavconn::MAVConnUDP::do_recvfrom () |
void | mavconn::MAVConnTCPClient::do_send (bool check_tx_state) |
void | mavconn::MAVConnUDP::do_sendto (bool check_tx_state) |
void | mavconn::MAVConnSerial::do_write (bool check_tx_state) |
uint8_t * | mavconn::MsgBuffer::dpos () |
mavlink::mavlink_message_t * | mavconn::MAVConnInterface::get_buffer_p () |
uint8_t | mavconn::MAVConnInterface::get_component_id () |
IOStat | mavconn::MAVConnTCPServer::get_iostat () override |
virtual IOStat | mavconn::MAVConnInterface::get_iostat () |
static std::vector< std::string > | mavconn::MAVConnInterface::get_known_dialects () |
Protocol | mavconn::MAVConnInterface::get_protocol_version () |
mavlink::mavlink_status_t | mavconn::MAVConnTCPServer::get_status () override |
virtual mavlink::mavlink_status_t | mavconn::MAVConnInterface::get_status () |
mavlink::mavlink_status_t * | mavconn::MAVConnInterface::get_status_p () |
uint8_t | mavconn::MAVConnInterface::get_system_id () |
static void | mavconn::MAVConnInterface::init_msg_entry () |
void | mavconn::MAVConnInterface::iostat_rx_add (size_t bytes) |
void | mavconn::MAVConnInterface::iostat_tx_add (size_t bytes) |
bool | mavconn::MAVConnSerial::is_open () override |
bool | mavconn::MAVConnUDP::is_open () override |
bool | mavconn::MAVConnTCPClient::is_open () override |
bool | mavconn::MAVConnTCPServer::is_open () override |
virtual bool | mavconn::MAVConnInterface::is_open ()=0 |
void | mavconn::MAVConnInterface::log_recv (const char *pfx, mavlink::mavlink_message_t &msg, Framing framing) |
void | mavconn::MAVConnInterface::log_send (const char *pfx, const mavlink::mavlink_message_t *msg) |
void | mavconn::MAVConnInterface::log_send_obj (const char *pfx, const mavlink::Message &msg) |
template<typename T > | |
static std::string | mavconn::DeviceError::make_message (const char *module, T msg) |
mavconn::MAVConnInterface::MAVConnInterface (const MAVConnInterface &)=delete | |
mavconn::MAVConnInterface::MAVConnInterface (uint8_t system_id=1, uint8_t component_id=MAV_COMP_ID_UDP_BRIDGE) | |
mavconn::MAVConnSerial::MAVConnSerial (uint8_t system_id=1, uint8_t component_id=MAV_COMP_ID_UDP_BRIDGE, std::string device=DEFAULT_DEVICE, unsigned baudrate=DEFAULT_BAUDRATE, bool hwflow=false) | |
mavconn::MAVConnTCPClient::MAVConnTCPClient (uint8_t system_id=1, uint8_t component_id=MAV_COMP_ID_UDP_BRIDGE, std::string server_host=DEFAULT_SERVER_HOST, unsigned short server_port=DEFAULT_SERVER_PORT) | |
mavconn::MAVConnTCPClient::MAVConnTCPClient (uint8_t system_id, uint8_t component_id, boost::asio::io_service &server_io) | |
mavconn::MAVConnTCPServer::MAVConnTCPServer (uint8_t system_id=1, uint8_t component_id=MAV_COMP_ID_UDP_BRIDGE, std::string bind_host=DEFAULT_BIND_HOST, unsigned short bind_port=DEFAULT_BIND_PORT) | |
mavconn::MAVConnUDP::MAVConnUDP (uint8_t system_id=1, uint8_t component_id=MAV_COMP_ID_UDP_BRIDGE, std::string bind_host=DEFAULT_BIND_HOST, unsigned short bind_port=DEFAULT_BIND_PORT, std::string remote_host=DEFAULT_REMOTE_HOST, unsigned short remote_port=DEFAULT_REMOTE_PORT) | |
static std::string | mavconn::DeviceError::msg_to_string (const char *description) |
static std::string | mavconn::DeviceError::msg_to_string (int errnum) |
static std::string | mavconn::DeviceError::msg_to_string (boost::system::system_error &err) |
mavconn::MsgBuffer::MsgBuffer () | |
mavconn::MsgBuffer::MsgBuffer (const mavlink::mavlink_message_t *msg) | |
Buffer constructor from mavlink_message_t. More... | |
mavconn::MsgBuffer::MsgBuffer (const mavlink::Message &obj, mavlink::mavlink_status_t *status, uint8_t sysid, uint8_t compid) | |
Buffer constructor for mavlink::Message derived object. More... | |
mavconn::MsgBuffer::MsgBuffer (const uint8_t *bytes, ssize_t nbytes) | |
Buffer constructor for send_bytes() More... | |
ssize_t | mavconn::MsgBuffer::nbytes () |
static Ptr | mavconn::MAVConnInterface::open_url (std::string url, uint8_t system_id=1, uint8_t component_id=MAV_COMP_ID_UDP_BRIDGE) |
Construct connection from URL. More... | |
void | mavconn::MAVConnInterface::parse_buffer (const char *pfx, uint8_t *buf, const size_t bufsize, size_t bytes_received) |
void | mavconn::MAVConnTCPServer::recv_message (const mavlink::mavlink_message_t *message, const Framing framing) |
static bool | mavconn::resolve_address_tcp (io_service &io, size_t chan, std::string host, unsigned short port, tcp::endpoint &ep) |
static bool | mavconn::resolve_address_udp (io_service &io, size_t chan, std::string host, unsigned short port, udp::endpoint &ep) |
void | mavconn::MAVConnSerial::send_bytes (const uint8_t *bytes, size_t length) override |
Send raw bytes (for some quirks) More... | |
void | mavconn::MAVConnUDP::send_bytes (const uint8_t *bytes, size_t length) override |
Send raw bytes (for some quirks) More... | |
void | mavconn::MAVConnTCPClient::send_bytes (const uint8_t *bytes, size_t length) override |
Send raw bytes (for some quirks) More... | |
void | mavconn::MAVConnTCPServer::send_bytes (const uint8_t *bytes, size_t length) override |
Send raw bytes (for some quirks) More... | |
virtual void | mavconn::MAVConnInterface::send_bytes (const uint8_t *bytes, size_t length)=0 |
Send raw bytes (for some quirks) More... | |
void | mavconn::MAVConnSerial::send_message (const mavlink::mavlink_message_t *message) override |
Send message (mavlink_message_t) More... | |
void | mavconn::MAVConnSerial::send_message (const mavlink::Message &message, const uint8_t source_compid) override |
Send message (child of mavlink::Message) More... | |
void | mavconn::MAVConnUDP::send_message (const mavlink::mavlink_message_t *message) override |
Send message (mavlink_message_t) More... | |
void | mavconn::MAVConnUDP::send_message (const mavlink::Message &message, const uint8_t source_compid) override |
Send message (child of mavlink::Message) More... | |
void | mavconn::MAVConnTCPClient::send_message (const mavlink::mavlink_message_t *message) override |
Send message (mavlink_message_t) More... | |
void | mavconn::MAVConnTCPClient::send_message (const mavlink::Message &message, const uint8_t source_compid) override |
Send message (child of mavlink::Message) More... | |
void | mavconn::MAVConnTCPServer::send_message (const mavlink::mavlink_message_t *message) override |
Send message (mavlink_message_t) More... | |
void | mavconn::MAVConnTCPServer::send_message (const mavlink::Message &message, const uint8_t source_compid) override |
Send message (child of mavlink::Message) More... | |
virtual void | mavconn::MAVConnInterface::send_message (const mavlink::mavlink_message_t *message)=0 |
Send message (mavlink_message_t) More... | |
virtual void | mavconn::MAVConnInterface::send_message (const mavlink::Message &message) |
Send message (child of mavlink::Message) More... | |
virtual void | mavconn::MAVConnInterface::send_message (const mavlink::Message &message, const uint8_t src_compid)=0 |
Send message (child of mavlink::Message) More... | |
void | mavconn::MAVConnInterface::send_message_ignore_drop (const mavlink::mavlink_message_t *message) |
Send message and ignore possible drop due to Tx queue limit. More... | |
void | mavconn::MAVConnInterface::send_message_ignore_drop (const mavlink::Message &message) |
Send message and ignore possible drop due to Tx queue limit. More... | |
void | mavconn::MAVConnInterface::send_message_ignore_drop (const mavlink::Message &message, const uint8_t src_compid) |
Send message and ignore possible drop due to Tx queue limit. More... | |
void | mavconn::MAVConnInterface::set_component_id (uint8_t compid) |
void | mavconn::MAVConnInterface::set_protocol_version (Protocol pver) |
void | mavconn::MAVConnInterface::set_system_id (uint8_t sysid) |
static void | mavconn::url_parse_host (std::string host, std::string &host_out, int &port_out, const std::string def_host, const int def_port) |
static void | mavconn::url_parse_query (std::string query, uint8_t &sysid, uint8_t &compid) |
static MAVConnInterface::Ptr | mavconn::url_parse_serial (std::string path, std::string query, uint8_t system_id, uint8_t component_id, bool hwflow) |
static MAVConnInterface::Ptr | mavconn::url_parse_tcp_client (std::string host, std::string query, uint8_t system_id, uint8_t component_id) |
static MAVConnInterface::Ptr | mavconn::url_parse_tcp_server (std::string host, std::string query, uint8_t system_id, uint8_t component_id) |
static MAVConnInterface::Ptr | mavconn::url_parse_udp (std::string hosts, std::string query, uint8_t system_id, uint8_t component_id, bool is_udpb, bool permanent_broadcast) |
mavconn::MAVConnSerial::~MAVConnSerial () | |
mavconn::MAVConnTCPClient::~MAVConnTCPClient () | |
mavconn::MAVConnTCPServer::~MAVConnTCPServer () | |
mavconn::MAVConnUDP::~MAVConnUDP () | |
virtual | mavconn::MsgBuffer::~MsgBuffer () |
Friends | |
class | mavconn::MAVConnTCPClient::MAVConnTCPServer |
const mavlink::mavlink_msg_entry_t * | mavconn::MAVConnInterface::mavlink::mavlink_get_msg_entry (uint32_t msgid) |
MAVConn connection handling library.
This lib provide simple interface to MAVLink enabled devices such as autopilots.
#define CONSOLE_BRIDGE_logDebug | ( | fmt, | |
... | |||
) | console_bridge::log(__FILE__, __LINE__, console_bridge::CONSOLE_BRIDGE_LOG_DEBUG, fmt, ##__VA_ARGS__) |
Definition at line 39 of file console_bridge_compat.h.
#define CONSOLE_BRIDGE_logError | ( | fmt, | |
... | |||
) | console_bridge::log(__FILE__, __LINE__, console_bridge::CONSOLE_BRIDGE_LOG_ERROR, fmt, ##__VA_ARGS__) |
Definition at line 54 of file console_bridge_compat.h.
#define CONSOLE_BRIDGE_logInform | ( | fmt, | |
... | |||
) | console_bridge::log(__FILE__, __LINE__, console_bridge::CONSOLE_BRIDGE_LOG_INFO, fmt, ##__VA_ARGS__) |
Definition at line 44 of file console_bridge_compat.h.
#define CONSOLE_BRIDGE_logWarn | ( | fmt, | |
... | |||
) | console_bridge::log(__FILE__, __LINE__, console_bridge::CONSOLE_BRIDGE_LOG_WARN, fmt, ##__VA_ARGS__) |
Definition at line 49 of file console_bridge_compat.h.
#define PFX "mavconn: " |
Definition at line 29 of file interface.cpp.
#define PFX "mavconn: serial" |
Definition at line 36 of file serial.cpp.
#define PFXd PFX "%zu: " |
Definition at line 37 of file serial.cpp.
using mavconn::MAVConnInterface::ClosedCb = std::function<void (void)> |
Definition at line 103 of file interface.h.
using mavconn::MAVConnInterface::ConstPtr = std::shared_ptr<MAVConnInterface const> |
Definition at line 105 of file interface.h.
using mavconn::lock_guard = typedef std::lock_guard<std::recursive_mutex> |
Definition at line 42 of file interface.h.
using mavconn::MAVConnInterface::Ptr = std::shared_ptr<MAVConnInterface> |
Definition at line 104 of file interface.h.
using mavconn::MAVConnInterface::ReceivedCb = std::function<void (const mavlink::mavlink_message_t *message, const Framing framing)> |
Definition at line 102 of file interface.h.
using mavconn::steady_clock = typedef std::chrono::steady_clock |
Definition at line 41 of file interface.h.
using mavconn::MAVConnInterface::WeakPtr = std::weak_ptr<MAVConnInterface> |
Definition at line 106 of file interface.h.
|
strong |
Rx packer framing status. (same as mavlink::mavlink_framing_t
)
Enumerator | |
---|---|
incomplete | |
ok | |
bad_crc | |
bad_signature |
Definition at line 48 of file interface.h.
|
strong |
MAVLink protocol version.
Enumerator | |
---|---|
V10 |
MAVLink v1.0. |
V20 |
MAVLink v2.0. |
Definition at line 56 of file interface.h.
|
private |
|
private |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
pure virtual |
Close connection.
Implemented in mavconn::MAVConnTCPServer, mavconn::MAVConnTCPClient, mavconn::MAVConnUDP, and mavconn::MAVConnSerial.
|
inline |
Construct error.
Definition at line 70 of file interface.h.
|
private |
Definition at line 207 of file serial.cpp.
|
private |
|
private |
|
private |
Definition at line 224 of file serial.cpp.
|
inline |
Definition at line 86 of file msgbuffer.h.
|
inlineprotected |
Definition at line 261 of file interface.h.
|
inline |
Definition at line 207 of file interface.h.
|
overridevirtual |
Reimplemented from mavconn::MAVConnInterface.
|
virtual |
Reimplemented in mavconn::MAVConnTCPServer.
Definition at line 60 of file interface.cpp.
|
static |
Protocol mavconn::MAVConnInterface::get_protocol_version | ( | ) |
Definition at line 192 of file interface.cpp.
|
overridevirtual |
Reimplemented from mavconn::MAVConnInterface.
|
virtual |
Reimplemented in mavconn::MAVConnTCPServer.
Definition at line 55 of file interface.cpp.
|
inlineprotected |
Definition at line 257 of file interface.h.
|
inline |
Definition at line 201 of file interface.h.
|
staticprivate |
Initialize message_entries map
autogenerated. placed in mavlink_helpers.cpp
|
protected |
Definition at line 90 of file interface.cpp.
|
protected |
Definition at line 85 of file interface.cpp.
|
inlineoverridevirtual |
Implements mavconn::MAVConnInterface.
|
inlineoverridevirtual |
Implements mavconn::MAVConnInterface.
|
inlineoverridevirtual |
Implements mavconn::MAVConnInterface.
|
inlineoverridevirtual |
Implements mavconn::MAVConnInterface.
|
pure virtual |
Implemented in mavconn::MAVConnTCPServer, mavconn::MAVConnTCPClient, mavconn::MAVConnUDP, and mavconn::MAVConnSerial.
|
protected |
Definition at line 128 of file interface.cpp.
|
protected |
Definition at line 143 of file interface.cpp.
|
protected |
Definition at line 153 of file interface.cpp.
|
inlinestatic |
Definition at line 75 of file interface.h.
|
privatedelete |
mavconn::MAVConnInterface::MAVConnInterface | ( | uint8_t | system_id = 1 , |
uint8_t | component_id = MAV_COMP_ID_UDP_BRIDGE |
||
) |
[in] | system_id | sysid for send_message |
[in] | component_id | compid for send_message |
Definition at line 40 of file interface.cpp.
mavconn::MAVConnSerial::MAVConnSerial | ( | uint8_t | system_id = 1 , |
uint8_t | component_id = MAV_COMP_ID_UDP_BRIDGE , |
||
std::string | device = DEFAULT_DEVICE , |
||
unsigned | baudrate = DEFAULT_BAUDRATE , |
||
bool | hwflow = false |
||
) |
Open and run serial link.
[in] | device | TTY device path |
[in] | baudrate | serial baudrate |
Definition at line 40 of file serial.cpp.
mavconn::MAVConnTCPClient::MAVConnTCPClient | ( | uint8_t | system_id = 1 , |
uint8_t | component_id = MAV_COMP_ID_UDP_BRIDGE , |
||
std::string | server_host = DEFAULT_SERVER_HOST , |
||
unsigned short | server_port = DEFAULT_SERVER_PORT |
||
) |
|
explicit |
Special client variation for use in MAVConnTCPServer
mavconn::MAVConnTCPServer::MAVConnTCPServer | ( | uint8_t | system_id = 1 , |
uint8_t | component_id = MAV_COMP_ID_UDP_BRIDGE , |
||
std::string | bind_host = DEFAULT_BIND_HOST , |
||
unsigned short | bind_port = DEFAULT_BIND_PORT |
||
) |
mavconn::MAVConnUDP::MAVConnUDP | ( | uint8_t | system_id = 1 , |
uint8_t | component_id = MAV_COMP_ID_UDP_BRIDGE , |
||
std::string | bind_host = DEFAULT_BIND_HOST , |
||
unsigned short | bind_port = DEFAULT_BIND_PORT , |
||
std::string | remote_host = DEFAULT_REMOTE_HOST , |
||
unsigned short | remote_port = DEFAULT_REMOTE_PORT |
||
) |
|
inlinestatic |
Definition at line 81 of file interface.h.
|
inlinestatic |
Definition at line 85 of file interface.h.
|
inlinestatic |
Definition at line 89 of file interface.h.
|
inline |
Definition at line 34 of file msgbuffer.h.
|
inlineexplicit |
Buffer constructor from mavlink_message_t.
Definition at line 42 of file msgbuffer.h.
|
inline |
Buffer constructor for mavlink::Message derived object.
Definition at line 53 of file msgbuffer.h.
|
inline |
Buffer constructor for send_bytes()
[in] | nbytes | should be less than MAX_SIZE |
Definition at line 73 of file msgbuffer.h.
|
inline |
Definition at line 90 of file msgbuffer.h.
|
static |
Construct connection from URL.
Supported URL schemas:
Please see user's documentation for details.
[in] | url | resource locator |
[in] | system_id | optional system id |
[in] | component_id | optional component id |
Definition at line 345 of file interface.cpp.
|
protected |
Parse buffer and emit massage_received.
Definition at line 95 of file interface.cpp.
|
private |
|
static |
|
static |
|
overridevirtual |
Send raw bytes (for some quirks)
std::length_error | On exceeding Tx queue limit (MAX_TXQ_SIZE) |
Implements mavconn::MAVConnInterface.
Definition at line 147 of file serial.cpp.
|
overridevirtual |
Send raw bytes (for some quirks)
std::length_error | On exceeding Tx queue limit (MAX_TXQ_SIZE) |
Implements mavconn::MAVConnInterface.
|
overridevirtual |
Send raw bytes (for some quirks)
std::length_error | On exceeding Tx queue limit (MAX_TXQ_SIZE) |
Implements mavconn::MAVConnInterface.
|
overridevirtual |
Send raw bytes (for some quirks)
std::length_error | On exceeding Tx queue limit (MAX_TXQ_SIZE) |
Implements mavconn::MAVConnInterface.
|
pure virtual |
Send raw bytes (for some quirks)
std::length_error | On exceeding Tx queue limit (MAX_TXQ_SIZE) |
Implemented in mavconn::MAVConnTCPServer, mavconn::MAVConnTCPClient, mavconn::MAVConnUDP, and mavconn::MAVConnSerial.
|
overridevirtual |
Send message (mavlink_message_t)
Can be used to forward messages from other connection channel.
std::length_error | On exceeding Tx queue limit (MAX_TXQ_SIZE) |
[in] | *message | not changed |
Implements mavconn::MAVConnInterface.
|
overridevirtual |
Send message (child of mavlink::Message)
Does serialization inside. System ID = from this object. Component ID passed by argument.
std::length_error | On exceeding Tx queue limit (MAX_TXQ_SIZE) |
[in] | &message | not changed |
[in] | src_compid | sets the component ID of the message source |
Implements mavconn::MAVConnInterface.
Definition at line 187 of file serial.cpp.
|
overridevirtual |
Send message (mavlink_message_t)
Can be used to forward messages from other connection channel.
std::length_error | On exceeding Tx queue limit (MAX_TXQ_SIZE) |
[in] | *message | not changed |
Implements mavconn::MAVConnInterface.
|
overridevirtual |
Send message (child of mavlink::Message)
Does serialization inside. System ID = from this object. Component ID passed by argument.
std::length_error | On exceeding Tx queue limit (MAX_TXQ_SIZE) |
[in] | &message | not changed |
[in] | src_compid | sets the component ID of the message source |
Implements mavconn::MAVConnInterface.
|
overridevirtual |
Send message (mavlink_message_t)
Can be used to forward messages from other connection channel.
std::length_error | On exceeding Tx queue limit (MAX_TXQ_SIZE) |
[in] | *message | not changed |
Implements mavconn::MAVConnInterface.
|
overridevirtual |
Send message (child of mavlink::Message)
Does serialization inside. System ID = from this object. Component ID passed by argument.
std::length_error | On exceeding Tx queue limit (MAX_TXQ_SIZE) |
[in] | &message | not changed |
[in] | src_compid | sets the component ID of the message source |
Implements mavconn::MAVConnInterface.
|
overridevirtual |
Send message (mavlink_message_t)
Can be used to forward messages from other connection channel.
std::length_error | On exceeding Tx queue limit (MAX_TXQ_SIZE) |
[in] | *message | not changed |
Implements mavconn::MAVConnInterface.
|
overridevirtual |
Send message (child of mavlink::Message)
Does serialization inside. System ID = from this object. Component ID passed by argument.
std::length_error | On exceeding Tx queue limit (MAX_TXQ_SIZE) |
[in] | &message | not changed |
[in] | src_compid | sets the component ID of the message source |
Implements mavconn::MAVConnInterface.
|
pure virtual |
Send message (mavlink_message_t)
Can be used to forward messages from other connection channel.
std::length_error | On exceeding Tx queue limit (MAX_TXQ_SIZE) |
[in] | *message | not changed |
Implemented in mavconn::MAVConnTCPServer, mavconn::MAVConnTCPClient, mavconn::MAVConnUDP, and mavconn::MAVConnSerial.
|
inlinevirtual |
Send message (child of mavlink::Message)
Does serialization inside. System and Component ID = from this object.
std::length_error | On exceeding Tx queue limit (MAX_TXQ_SIZE) |
[in] | &message | not changed |
Definition at line 147 of file interface.h.
|
pure virtual |
Send message (child of mavlink::Message)
Does serialization inside. System ID = from this object. Component ID passed by argument.
std::length_error | On exceeding Tx queue limit (MAX_TXQ_SIZE) |
[in] | &message | not changed |
[in] | src_compid | sets the component ID of the message source |
Implemented in mavconn::MAVConnTCPServer, mavconn::MAVConnTCPClient, mavconn::MAVConnUDP, and mavconn::MAVConnSerial.
void mavconn::MAVConnInterface::send_message_ignore_drop | ( | const mavlink::mavlink_message_t * | message | ) |
Send message and ignore possible drop due to Tx queue limit.
Definition at line 158 of file interface.cpp.
|
inline |
Send message and ignore possible drop due to Tx queue limit.
System and Component ID = from this object.
Definition at line 180 of file interface.h.
void mavconn::MAVConnInterface::send_message_ignore_drop | ( | const mavlink::Message & | message, |
const uint8_t | src_compid | ||
) |
Send message and ignore possible drop due to Tx queue limit.
System ID = from this object. Component ID passed by argument.
Definition at line 171 of file interface.cpp.
|
inline |
Definition at line 210 of file interface.h.
void mavconn::MAVConnInterface::set_protocol_version | ( | Protocol | pver | ) |
Set protocol used for encoding mavlink::Mavlink messages.
Definition at line 184 of file interface.cpp.
|
inline |
Definition at line 204 of file interface.h.
|
static |
Parse host:port pairs
Definition at line 203 of file interface.cpp.
|
static |
Parse ?ids=sid,cid
Definition at line 239 of file interface.cpp.
|
static |
Definition at line 270 of file interface.cpp.
|
static |
Definition at line 315 of file interface.cpp.
|
static |
Definition at line 330 of file interface.cpp.
|
static |
Definition at line 285 of file interface.cpp.
mavconn::MAVConnSerial::~MAVConnSerial | ( | ) |
Definition at line 122 of file serial.cpp.
|
inlinevirtual |
Definition at line 81 of file msgbuffer.h.
|
private |
|
private |
|
private |
|
static |
|
private |
|
protected |
Connection Component Id.
Definition at line 244 of file interface.h.
|
protected |
Channel number used for logging.
Definition at line 255 of file interface.h.
|
staticprivate |
monotonic counter (increment only)
Definition at line 289 of file interface.h.
uint8_t mavconn::MsgBuffer::data[MAX_SIZE] |
Definition at line 30 of file msgbuffer.h.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
staticprivate |
init_msg_entry() once flag
Definition at line 292 of file interface.h.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 284 of file interface.h.
|
private |
|
private |
|
private |
Definition at line 286 of file interface.h.
|
private |
|
private |
Definition at line 285 of file interface.h.
|
private |
Definition at line 285 of file interface.h.
ssize_t mavconn::MsgBuffer::len |
Definition at line 31 of file msgbuffer.h.
|
private |
Definition at line 281 of file interface.h.
|
private |
Definition at line 280 of file interface.h.
|
static |
Same as mavlink::common::MAV_COMPONENT::COMP_ID_UDP_BRIDGE
.
Definition at line 45 of file interface.h.
|
staticprotected |
Maximum mavlink packet size + some extra bytes for padding.
Definition at line 247 of file interface.h.
|
static |
Maximum buffer size with padding for CRC bytes (280 + padding)
Definition at line 29 of file msgbuffer.h.
|
staticprotected |
Maximum count of transmission buffers.
Definition at line 249 of file interface.h.
|
staticprotected |
This map merge all dialect mavlink_msg_entry_t structs. Needed for packet parser.
Definition at line 252 of file interface.h.
ReceivedCb mavconn::MAVConnInterface::message_received_cb |
Message receive callback.
Definition at line 193 of file interface.h.
|
static |
ClosedCb mavconn::MAVConnInterface::port_closed_cb |
Port closed notification callback.
Definition at line 195 of file interface.h.
ssize_t mavconn::MsgBuffer::pos |
Definition at line 32 of file msgbuffer.h.
|
private |
|
private |
|
private |
|
private |
|
private |
float mavconn::MAVConnInterface::IOStat::rx_speed |
current receive speed [B/s]
Definition at line 112 of file interface.h.
size_t mavconn::MAVConnInterface::IOStat::rx_total_bytes |
total bytes received
Definition at line 110 of file interface.h.
|
private |
Definition at line 283 of file interface.h.
|
private |
|
private |
|
private |
|
private |
|
protected |
Connection System Id.
Definition at line 243 of file interface.h.
|
private |
|
private |
float mavconn::MAVConnInterface::IOStat::tx_speed |
current transfer speed [B/s]
Definition at line 111 of file interface.h.
size_t mavconn::MAVConnInterface::IOStat::tx_total_bytes |
total bytes transferred
Definition at line 109 of file interface.h.
|
private |
Definition at line 283 of file interface.h.
|
friend |