Topic class

Wrapper to interact with ROS topics.

Constructors

Topic({required Ros ros, required String name, required String type, String compression = 'none', int throttleRate = 0, bool latch = false, int queueSize = 100, int queueLength = 0, bool reconnectOnClose = true})

Properties

advertiseId ↔ String?
Advertiser ID provided by ros.
getter/setter pair
compression ↔ String
The type of compression to use, like 'png' or 'cbor'.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
isAdvertised → bool
Checks whether or not the topic is currently advertising.
no setter
latch ↔ bool
Latch the topic when publishing.
getter/setter pair
name ↔ String
Name of the topic.
getter/setter pair
publishId ↔ String
Publisher ID provided by ros.
getter/setter pair
queueLength ↔ int
The queue length at the bridge side used when subscribing.
getter/setter pair
queueSize ↔ int
The queue created at the bridge side for republishing topics.
getter/setter pair
reconnectOnClose ↔ bool
Flag to enable resubscription and readvertisement on a ROS connection close event.
getter/setter pair
ros ↔ Ros
The ROS connection.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
subscribeId ↔ String?
Subscription ID provided by ros.
getter/setter pair
subscription ↔ Stream<Map<String, dynamic>>?
Stream subscribers to the topic can listen to.
getter/setter pair
throttleRate ↔ int
The rate (in ms between messages) at which to throttle the topic.
getter/setter pair
type ↔ String
Message type the topic uses.
getter/setter pair

Methods

Advertise the topic.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
publish(dynamic message) → Future<void>
Publish a message to the topic.
safeSend(Request message) → Future<void>
Safely send a message to ROS.
subscribe(SubscribeHandler subscribeHandler) → Future<void>
toString() → String
A string representation of this object.
inherited
unadvertise() → Future<void>
Stop advertising the topic.
unsubscribe() → Future<void>
Unsubscribe from the topic.
watchForClose() → Future<void>
Wait for the connection to close and then reset advertising variables.

Operators

operator ==(Object other) → bool
The equality operator.
inherited