Firmware
|
Base subscription wrapper class, used in list traversal of various subscriptions. More...
#include <Subscription.hpp>
Public Member Functions | |
SubscriptionBase (const struct orb_metadata *meta, unsigned interval=0, unsigned instance=0) | |
Constructor. More... | |
SubscriptionBase (const SubscriptionBase &)=delete | |
SubscriptionBase & | operator= (const SubscriptionBase &)=delete |
SubscriptionBase (SubscriptionBase &&)=delete | |
SubscriptionBase & | operator= (SubscriptionBase &&)=delete |
bool | updated () |
Check if there is a new update. | |
bool | update (void *data) |
Update the struct. More... | |
int | getHandle () const |
const orb_metadata * | getMeta () const |
unsigned | getInstance () const |
Protected Attributes | |
const struct orb_metadata * | _meta |
unsigned | _instance |
int | _handle {-1} |
Base subscription wrapper class, used in list traversal of various subscriptions.
uORB::SubscriptionBase::SubscriptionBase | ( | const struct orb_metadata * | meta, |
unsigned | interval = 0 , |
||
unsigned | instance = 0 |
||
) |
Constructor.
meta | The uORB metadata (usually from the ORB_ID() macro) for the topic. |
interval | The minimum interval in milliseconds between updates |
instance | The instance for multi sub. |
bool uORB::SubscriptionBase::update | ( | void * | data | ) |
Update the struct.
data | The uORB message struct we are updating. |