Firmware
Public Member Functions | List of all members
MavlinkOrbSubscription Class Reference
Inheritance diagram for MavlinkOrbSubscription:
ListNode< MavlinkOrbSubscription *>

Public Member Functions

 MavlinkOrbSubscription (const orb_id_t topic, int instance)
 
bool update (uint64_t *time, void *data)
 Check if subscription updated based on timestamp. More...
 
bool update (void *data)
 Copy topic data to given buffer. More...
 
bool update_if_changed (void *data)
 Check if the subscription has been updated. More...
 
bool is_published ()
 Check if the topic has been published. More...
 
void subscribe_from_beginning (bool from_beginning)
 
orb_id_t get_topic () const
 
int get_instance () const
 
int get_fd ()
 
- Public Member Functions inherited from ListNode< MavlinkOrbSubscription *>
void setSibling (MavlinkOrbSubscription * sibling)
 
const MavlinkOrbSubscriptiongetSibling () const
 

Additional Inherited Members

- Protected Attributes inherited from ListNode< MavlinkOrbSubscription *>
MavlinkOrbSubscription_sibling
 

Member Function Documentation

§ is_published()

bool MavlinkOrbSubscription::is_published ( )

Check if the topic has been published.

This call will return true if the topic was ever published.

Returns
true if the topic has been published at least once. If no data is available the buffer will be filled with zeros.

§ update() [1/2]

bool MavlinkOrbSubscription::update ( uint64_t *  time,
void *  data 
)

Check if subscription updated based on timestamp.

Returns
true only if topic was updated based on a timestamp and copied to buffer successfully. If topic was not updated since last check it will return false but still copy the data. If no data available data buffer will be filled with zeros.

§ update() [2/2]

bool MavlinkOrbSubscription::update ( void *  data)

Copy topic data to given buffer.

Returns
true only if topic data copied successfully.

§ update_if_changed()

bool MavlinkOrbSubscription::update_if_changed ( void *  data)

Check if the subscription has been updated.

Returns
true if there has been an update which has been copied successfully.

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