uORB: remove lost message count per DeviceNode

- update 'uorb status' to print basic info for all advertised DeviceNodes
 - report vehicle_command gaps in commander, navigator, mavlink
This commit is contained in:
Daniel Agar
2020-08-04 10:34:11 -04:00
committed by GitHub
parent 4282b3dd47
commit c40cf9a626
8 changed files with 44 additions and 52 deletions
+5 -11
View File
@@ -176,18 +176,16 @@ public:
int update_queue_size(unsigned int queue_size);
/**
* Print statistics (nr of lost messages)
* @param reset if true, reset statistics afterwards
* @return true if printed something, false otherwise (if no lost messages)
* Print statistics
* @param max_topic_length max topic name length for printing
* @return true if printed something, false otherwise
*/
bool print_statistics(bool reset);
bool print_statistics(int max_topic_length);
uint8_t get_queue_size() const { return _queue_size; }
int8_t subscriber_count() const { return _subscriber_count; }
uint32_t lost_message_count() const { return _lost_messages; }
unsigned published_message_count() const { return _generation.load(); }
const orb_metadata *get_meta() const { return _meta; }
@@ -239,7 +237,7 @@ private:
* @return bool
* Returns true if the data was copied.
*/
bool copy_locked(void *dst, unsigned &generation);
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 */
@@ -259,10 +257,6 @@ private:
px4::atomic<unsigned> _generation{0}; /**< object generation count */
List<uORB::SubscriptionCallback *> _callbacks;
// statistics
uint32_t _lost_messages = 0; /**< nr of lost messages for all subscribers. If two subscribers lose the same
message, it is counted as two. */
ORB_PRIO _priority; /**< priority of the topic */
const uint8_t _instance; /**< orb multi instance identifier */
bool _advertised{false}; /**< has ever been advertised (not necessarily published data yet) */