Firmware
|
The subscription base class as a list node. More...
#include <Subscription.hpp>
Public Member Functions | |
SubscriptionNode (const struct orb_metadata *meta, unsigned interval=0, unsigned instance=0, List< SubscriptionNode *> *list=nullptr) | |
Constructor. More... | |
virtual bool | update ()=0 |
This function is the callback for list traversal updates, a child class must implement it. | |
virtual bool | forcedUpdate ()=0 |
Like update(), but does not check first if there is data available. | |
![]() | |
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 |
![]() | |
void | setSibling (SubscriptionNode * sibling) |
const SubscriptionNode * | getSibling () const |
Additional Inherited Members | |
![]() | |
const struct orb_metadata * | _meta |
unsigned | _instance |
int | _handle {-1} |
![]() | |
SubscriptionNode * | _sibling |
The subscription base class as a list node.
uORB::SubscriptionNode::SubscriptionNode | ( | const struct orb_metadata * | meta, |
unsigned | interval = 0 , |
||
unsigned | instance = 0 , |
||
List< SubscriptionNode *> * | list = nullptr |
||
) |
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. |
list | A pointer to a list of subscriptions that this should be appended to. |