mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 09:53:33 +08:00
uORB::DeviceNode replace SubscriptionData with uORB::SubscriptionInterval
This commit is contained in:
@@ -229,31 +229,6 @@ protected:
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Copies data and the corresponding generation
|
||||
* from a node to the buffer provided. Caller handles locking.
|
||||
*
|
||||
* @param dst
|
||||
* The buffer into which the data is copied.
|
||||
* @param generation
|
||||
* The generation that was copied.
|
||||
* @return bool
|
||||
* Returns true if the data was copied.
|
||||
*/
|
||||
bool copy_locked(void *dst, unsigned &generation) const;
|
||||
|
||||
struct UpdateIntervalData {
|
||||
uint64_t last_update{0}; /**< time at which the last update was provided, used when update_interval is nonzero */
|
||||
unsigned interval{0}; /**< if nonzero minimum interval between updates */
|
||||
};
|
||||
|
||||
struct SubscriberData {
|
||||
~SubscriberData() { if (update_interval) { delete (update_interval); } }
|
||||
|
||||
unsigned generation{0}; /**< last generation the subscriber has seen */
|
||||
UpdateIntervalData *update_interval{nullptr}; /**< if null, no update interval */
|
||||
};
|
||||
|
||||
const orb_metadata *_meta; /**< object metadata information */
|
||||
|
||||
uint8_t *_data{nullptr}; /**< allocated object buffer */
|
||||
@@ -265,15 +240,4 @@ private:
|
||||
bool _advertised{false}; /**< has ever been advertised (not necessarily published data yet) */
|
||||
uint8_t _queue_size; /**< maximum number of elements in the queue */
|
||||
int8_t _subscriber_count{0};
|
||||
|
||||
/**
|
||||
* Check whether a topic appears updated to a subscriber.
|
||||
*
|
||||
* Lock must already be held when calling this.
|
||||
*
|
||||
* @param sd The subscriber for whom to check.
|
||||
* @return True if the topic should appear updated to the subscriber
|
||||
*/
|
||||
bool appears_updated(cdev::file_t *filp);
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user