import Ros from "./Ros.js"; import EventEmitter2 from "eventemitter2"; interface TopicOptions { ros: Ros; name: string; messageType: string; compression: "png" | "cbor" | "cbor-raw" | "none"; throttle_rate: number; queue_size: number; latch: boolean; queue_length: number; reconnect_on_close: boolean; } /** * Publish and/or subscribe to a topic in ROS. * * Emits the following events: * * 'warning' - if there are any warning during the Topic creation * * 'message' - the message data from rosbridge * * @constructor * @param options - object with following keys: * * ros - the ROSLIB.Ros connection handle * * name - the topic name, like /cmd_vel * * messageType - the message type, like 'std_msgs/String' * * compression - the type of compression to use, like 'png', 'cbor', or 'cbor-raw' * * throttle_rate - the rate (in ms in between messages) at which to throttle the topics * * queue_size - the queue created at bridge side for re-publishing webtopics (defaults to 100) * * latch - latch the topic when publishing * * queue_length - the queue length at bridge side used when subscribing (defaults to 0, no queueing). * * reconnect_on_close - the flag to enable resubscription and readvertisement on close event(defaults to true). */ declare class Topic extends EventEmitter2 { options: TopicOptions; ros: Ros; isAdvertised: boolean; waitForReconnect: boolean; subscribeId?: string; advertiseId?: string; callForSubscribeAndAdvertise: (message: any) => void; reconnectFunc: () => void; _messageCallback: (message: any) => void; constructor(options: Partial); subscribe(callback: (message: any) => void): void; unsubscribe(callback?: (message: any) => void): void; advertise(): void; unadvertise(): void; publish(message: any): void; } export default Topic; //# sourceMappingURL=Topic.d.ts.map