Firmware
Public Member Functions | List of all members
uORB::Subscription< T > Class Template Reference

Subscription wrapper class. More...

#include <Subscription.hpp>

Inheritance diagram for uORB::Subscription< T >:
uORB::SubscriptionNode uORB::SubscriptionBase ListNode< SubscriptionNode *>

Public Member Functions

 Subscription (const struct orb_metadata *meta, unsigned interval=0, unsigned instance=0, List< SubscriptionNode *> *list=nullptr)
 Constructor. More...
 
 Subscription (const Subscription &)=delete
 
Subscriptionoperator= (const Subscription &)=delete
 
 Subscription (Subscription &&)=delete
 
Subscriptionoperator= (Subscription &&)=delete
 
bool update () override
 Create an update function that uses the embedded struct.
 
bool forcedUpdate () override
 Like update(), but does not check first if there is data available.
 
const T & get () const
 
- Public Member Functions inherited from uORB::SubscriptionNode
 SubscriptionNode (const struct orb_metadata *meta, unsigned interval=0, unsigned instance=0, List< SubscriptionNode *> *list=nullptr)
 Constructor. More...
 
- Public Member Functions inherited from uORB::SubscriptionBase
 SubscriptionBase (const struct orb_metadata *meta, unsigned interval=0, unsigned instance=0)
 Constructor. More...
 
 SubscriptionBase (const SubscriptionBase &)=delete
 
SubscriptionBaseoperator= (const SubscriptionBase &)=delete
 
 SubscriptionBase (SubscriptionBase &&)=delete
 
SubscriptionBaseoperator= (SubscriptionBase &&)=delete
 
bool updated ()
 Check if there is a new update.
 
bool update (void *data)
 Update the struct. More...
 
int getHandle () const
 
const orb_metadatagetMeta () const
 
unsigned getInstance () const
 
- Public Member Functions inherited from ListNode< SubscriptionNode *>
void setSibling (SubscriptionNode * sibling)
 
const SubscriptionNode * getSibling () const
 

Additional Inherited Members

- Protected Attributes inherited from uORB::SubscriptionBase
const struct orb_metadata_meta
 
unsigned _instance
 
int _handle {-1}
 
- Protected Attributes inherited from ListNode< SubscriptionNode *>
SubscriptionNode * _sibling
 

Detailed Description

template<class T>
class uORB::Subscription< T >

Subscription wrapper class.

Constructor & Destructor Documentation

§ Subscription()

template<class T>
uORB::Subscription< T >::Subscription ( const struct orb_metadata meta,
unsigned  interval = 0,
unsigned  instance = 0,
List< SubscriptionNode *> *  list = nullptr 
)
inline

Constructor.

Parameters
metaThe uORB metadata (usually from the ORB_ID() macro) for the topic.
intervalThe minimum interval in milliseconds between updates
listA list interface for adding to list during construction

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