On this page

metricsMessage QML Value Type

A generic metrics message providing statistics for measurements from different sources. For example, measure a system's CPU % for a given window yields the following data points over a window of time:. More...

Import Statement: import QtRos2.StatisticsMsgs
Status: Experimental Extension

Properties

Detailed Description

  • average cpu %
  • std deviation
  • min
  • max
  • sample count

These are all represented as different 'StatisticDataPoint's.

metricsMessage is a structured value type usable in QML. It maps directly to the statistics_msgs::msg::MetricsMessage ROS 2 message type.

Construct a metricsMessage in QML by assigning a JavaScript object whose keys are its component properties, or by setting those properties individually.

See also MetricsMessagePublisher and MetricsMessageSubscriber.

Property Documentation

measurementSourceName : string

Name metric measurement source, e.g., node, topic, or process name

metricsSource : string

Name of the metric being measured, e.g. cpu_percentage, free_memory_mb, message_age, etc.

statistics : list<statisticDataPoint>

A list of statistics data point, defined in StatisticDataPoint.msg

unit : string

Unit of measure of the metric, e.g. percent, mb, seconds, etc.

windowStart : time

Measurement window start time

windowStop : time

Measurement window end time

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.