PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <SubscriptionCallback.hpp>
Public Member Functions | |
SubscriptionCallback (const orb_metadata *meta, uint8_t interval_ms=0, uint8_t instance=0) | |
Constructor. More... | |
virtual | ~SubscriptionCallback () |
bool | registerCallback () |
void | unregisterCallback () |
virtual void | call ()=0 |
Public Member Functions inherited from uORB::SubscriptionInterval | |
SubscriptionInterval (const orb_metadata *meta, uint32_t interval_us=0, uint8_t instance=0) | |
Constructor. More... | |
SubscriptionInterval () | |
~SubscriptionInterval ()=default | |
bool | subscribe () |
bool | advertised () |
bool | updated () |
Check if there is a new update. More... | |
bool | update (void *dst) |
Copy the struct if updated. More... | |
bool | copy (void *dst) |
Copy the struct. More... | |
bool | valid () const |
uint8_t | get_instance () const |
orb_id_t | get_topic () const |
void | set_interval_us (uint32_t interval) |
Set the interval in microseconds. More... | |
void | set_interval_ms (uint32_t interval) |
Set the interval in milliseconds. More... | |
Public Member Functions inherited from ListNode< SubscriptionCallback *> | |
void | setSibling (SubscriptionCallback * sibling) |
const SubscriptionCallback * | getSibling () const |
Additional Inherited Members | |
Protected Attributes inherited from uORB::SubscriptionInterval | |
Subscription | _subscription |
uint64_t | _last_update {0} |
uint32_t | _interval_us {0} |
Protected Attributes inherited from ListNode< SubscriptionCallback *> | |
SubscriptionCallback * | _list_node_sibling |
Definition at line 49 of file SubscriptionCallback.hpp.
|
inline |
Constructor.
meta | The uORB metadata (usually from the ORB_ID() macro) for the topic. |
interval_ms | The requested maximum update interval in milliseconds. |
instance | The instance for multi sub. |
Definition at line 59 of file SubscriptionCallback.hpp.
|
inlinevirtual |
Definition at line 64 of file SubscriptionCallback.hpp.
References unregisterCallback().
|
pure virtual |
Implemented in uORB::SubscriptionCallbackWorkItem.
Referenced by unregisterCallback().
|
inline |
Definition at line 69 of file SubscriptionCallback.hpp.
References uORB::SubscriptionInterval::_subscription, fd, uORB::Subscription::get_instance(), uORB::Subscription::get_node(), uORB::Subscription::get_topic(), orb_subscribe_multi(), orb_unsubscribe(), uORB::DeviceNode::register_callback(), and uORB::Subscription::subscribe().
Referenced by MulticopterRateControl::init(), MulticopterAttitudeControl::init(), AttitudeEstimatorQ::init(), FixedwingAttitudeControl::init(), MulticopterPositionControl::init(), VtolAttitudeControl::init(), Ekf2::init(), BlockLocalPositionEstimator::init(), FixedwingPositionControl::init(), VehicleAcceleration::Start(), and VehicleAngularVelocity::Start().
|
inline |
Definition at line 95 of file SubscriptionCallback.hpp.
References uORB::SubscriptionInterval::_subscription, call(), uORB::Subscription::get_node(), and uORB::DeviceNode::unregister_callback().
Referenced by MulticopterRateControl::Run(), MulticopterAttitudeControl::Run(), AttitudeEstimatorQ::Run(), FixedwingAttitudeControl::Run(), MulticopterPositionControl::Run(), VtolAttitudeControl::Run(), Ekf2::Run(), FixedwingPositionControl::Run(), BlockLocalPositionEstimator::Run(), VehicleAcceleration::Stop(), VehicleAngularVelocity::Stop(), and ~SubscriptionCallback().