Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
mavros::std_plugins::SystemTimePlugin Class Reference

System time plugin. More...

Inheritance diagram for mavros::std_plugins::SystemTimePlugin:
Inheritance graph

Public Types

using TSM = UAS::timesync_mode
- Public Types inherited from mavros::plugin::PluginBase
using ConstPtr = boost::shared_ptr< PluginBase const >
using HandlerCb = mavconn::MAVConnInterface::ReceivedCb
 generic message handler callback More...
using HandlerInfo = std::tuple< mavlink::msgid_t, const char *, size_t, HandlerCb >
 Tuple: MSG ID, MSG NAME, message type into hash_code, message handler callback. More...
using Ptr = boost::shared_ptr< PluginBase >
using Subscriptions = std::vector< HandlerInfo >
 Subscriptions vector. More...

Public Member Functions

Subscriptions get_subscriptions ()
 Return vector of MAVLink message subscriptions (handlers) More...
void initialize (UAS &uas_)
 Plugin initializer. More...
 SystemTimePlugin ()
- Public Member Functions inherited from mavros::plugin::PluginBase
virtual ~PluginBase ()

Private Member Functions

void add_sample (int64_t offset_ns)
void add_timesync_observation (int64_t offset_ns, uint64_t local_time_ns, uint64_t remote_time_ns)
uint64_t get_monotonic_now (void)
void handle_system_time (const mavlink::mavlink_message_t *msg, mavlink::common::msg::SYSTEM_TIME &mtime)
void handle_timesync (const mavlink::mavlink_message_t *msg, mavlink::common::msg::TIMESYNC &tsync)
void reset_filter ()
void send_timesync_msg (uint64_t tc1, uint64_t ts1)
bool sync_converged ()
void sys_time_cb (const ros::TimerEvent &event)
void timesync_cb (const ros::TimerEvent &event)

Private Attributes

int convergence_window
TimeSyncStatus dt_diag
double filter_alpha
float filter_alpha_final
float filter_alpha_initial
double filter_beta
float filter_beta_final
float filter_beta_initial
int high_deviation_count
int high_rtt_count
int max_cons_high_deviation
int max_cons_high_rtt
int max_deviation_sample
int max_rtt_sample
ros::NodeHandle nh
uint32_t sequence
ros::Timer sys_time_timer
double time_offset
ros::Publisher time_ref_pub
std::string time_ref_source
double time_skew
ros::Publisher timesync_status_pub
ros::Timer timesync_timer

Additional Inherited Members

- Protected Member Functions inherited from mavros::plugin::PluginBase
virtual void connection_cb (bool connected)
void enable_connection_cb ()
template<class _C >
HandlerInfo make_handler (const mavlink::msgid_t id, void(_C::*fn)(const mavlink::mavlink_message_t *msg, const mavconn::Framing framing))
template<class _C , class _T >
HandlerInfo make_handler (void(_C::*fn)(const mavlink::mavlink_message_t *, _T &))
 PluginBase ()
 Plugin constructor Should not do anything before initialize() More...
- Protected Attributes inherited from mavros::plugin::PluginBase

Detailed Description

System time plugin.

Definition at line 137 of file sys_time.cpp.

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

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