mavlink_diag.h
Go to the documentation of this file.
1 
9 /*
10  * Copyright 2014 Vladimir Ermakov.
11  *
12  * This file is part of the mavros package and subject to the license terms
13  * in the top-level LICENSE file of the mavros repository.
14  * https://github.com/mavlink/mavros/tree/master/LICENSE.md
15  */
16 
17 #pragma once
18 
20 #include <mavconn/interface.h>
21 
22 namespace mavros {
24 {
25 public:
26  explicit MavlinkDiag(std::string name);
27 
29 
31  weak_link = link;
32  }
33 
34  void set_connection_status(bool connected) {
35  is_connected = connected;
36  }
37 
38 private:
40  unsigned int last_drop_count;
41  std::atomic<bool> is_connected;
42 };
43 }; // namespace mavros
44 
mavconn::MAVConnInterface::WeakPtr weak_link
Definition: mavlink_diag.h:39
std::atomic< bool > is_connected
Definition: mavlink_diag.h:41
void set_connection_status(bool connected)
Definition: mavlink_diag.h:34
std::weak_ptr< MAVConnInterface > WeakPtr
unsigned int last_drop_count
Definition: mavlink_diag.h:40
MavlinkDiag(std::string name)
void run(diagnostic_updater::DiagnosticStatusWrapper &stat)
void set_mavconn(const mavconn::MAVConnInterface::Ptr &link)
Definition: mavlink_diag.h:30
std::shared_ptr< MAVConnInterface > Ptr


mavros
Author(s): Vladimir Ermakov
autogenerated on Mon Jul 8 2019 03:20:11