PX4 Firmware
PX4 Autopilot Software http://px4.io
MavlinkRateLimiter Class Reference

#include <mavlink_rate_limiter.h>

Collaboration diagram for MavlinkRateLimiter:

Public Member Functions

 MavlinkRateLimiter ()=default
 
 MavlinkRateLimiter (unsigned int interval)
 
 ~MavlinkRateLimiter ()=default
 
void set_interval (unsigned int interval)
 
bool check (const hrt_abstime &t)
 

Private Attributes

hrt_abstime _last_sent {0}
 
hrt_abstime _interval {1000000}
 

Detailed Description

Definition at line 47 of file mavlink_rate_limiter.h.

Constructor & Destructor Documentation

◆ MavlinkRateLimiter() [1/2]

MavlinkRateLimiter::MavlinkRateLimiter ( )
default

◆ MavlinkRateLimiter() [2/2]

MavlinkRateLimiter::MavlinkRateLimiter ( unsigned int  interval)
inline

Definition at line 55 of file mavlink_rate_limiter.h.

References ~MavlinkRateLimiter().

Here is the call graph for this function:

◆ ~MavlinkRateLimiter()

MavlinkRateLimiter::~MavlinkRateLimiter ( )
default

Referenced by MavlinkRateLimiter().

Here is the caller graph for this function:

Member Function Documentation

◆ check()

bool MavlinkRateLimiter::check ( const hrt_abstime t)

Definition at line 44 of file mavlink_rate_limiter.cpp.

References _interval, _last_sent, and dt.

Referenced by MavlinkMissionManager::send(), and set_interval().

Here is the caller graph for this function:

◆ set_interval()

void MavlinkRateLimiter::set_interval ( unsigned int  interval)
inline

Definition at line 59 of file mavlink_rate_limiter.h.

References _interval, check(), and hrt_abstime.

Here is the call graph for this function:

Member Data Documentation

◆ _interval

hrt_abstime MavlinkRateLimiter::_interval {1000000}
private

Definition at line 51 of file mavlink_rate_limiter.h.

Referenced by check(), and set_interval().

◆ _last_sent

hrt_abstime MavlinkRateLimiter::_last_sent {0}
private

Definition at line 50 of file mavlink_rate_limiter.h.

Referenced by check().


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