StateSubscriber QML Type
Subscribes to lifecycle_msgs::msg::State messages — Primary state definitions as depicted in: http://design.ros2.org/articles/node_lifecycle.html. More...
| Import Statement: | import QtRos2.LifecycleMsgs |
| Inherits: | |
| Status: | Experimental Extension |
Properties
Signals
- messageReceived(state msg)
Detailed Description
These are the primary states. State changes can only be requested when the node is in one of these states.
StateSubscriber receives state values from a ROS 2 topic. Set the topic and node properties, then connect to the messageReceived() signal.
See also StatePublisher and state.
Property Documentation
id : uint8_t
The id field of the last received message. Updated whenever a new message arrives. idChanged is emitted on every update.
label : string
The label field of the last received message. Updated whenever a new message arrives. labelChanged is emitted on every update.
message : state
The last message received on topic. Updated whenever a new message arrives.
Signal Documentation
messageReceived(state msg)
Emitted when a new state 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.