On this page

FieldTypeSubscriber QML Type

Subscribes to type_description_interfaces::msg::FieldType messages — Represents the type of a field and related meta-data. More...

Import Statement: import QtRos2.TypeDescriptionInterfaces
Inherits:

SubscriberBase

Status: Experimental Extension

Properties

Signals

Detailed Description

A constant for each type supported according to: http://design.ros2.org/articles/legacy_interface_definition.html and: http://design.ros2.org/articles/idl_interface_definition.html Order is loosely coupled to the order of appearance in the IDL 4.2 spec: https://www.omg.org/spec/IDL/4.2

Layout of constants across the 0-255 decimal values in the uint8:

- 000 : Reserved for "not set" - 001-048: Primitive types, strings, and reserved space for future primitive types - 049-096: Fixed sized array of primitive and string types - 097-144: Bounded Sequences of primitive and string types - 145-192: Unbounded Sequences of primitive and string types - 193-255: Reserved space for future array/sequence-like types

FieldTypeSubscriber receives fieldType values from a ROS 2 topic. Set the topic and node properties, then connect to the messageReceived() signal.

See also FieldTypePublisher and fieldType.

Property Documentation

capacity : uint64_t

The capacity field of the last received message. Updated whenever a new message arrives. capacityChanged is emitted on every update.

message : fieldType

The last message received on topic. Updated whenever a new message arrives.

nestedTypeName : string

The nestedTypeName field of the last received message. Updated whenever a new message arrives. nestedTypeNameChanged is emitted on every update.

stringCapacity : uint64_t

The stringCapacity field of the last received message. Updated whenever a new message arrives. stringCapacityChanged is emitted on every update.

typeId : uint8_t

The typeId field of the last received message. Updated whenever a new message arrives. typeIdChanged is emitted on every update.

Signal Documentation

messageReceived(fieldType msg)

Emitted when a new fieldType arrives on topic. msg contains the received value.

Note: The corresponding handler is onMessageReceived.

© 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.