import { MessageDefinition } from "@lichtblick/message-definition"; import { HttpServer, XmlRpcValue } from "@lichtblick/xmlrpc"; import { EventEmitter } from "eventemitter3"; import { LoggerService } from "./LoggerService"; import { Publication } from "./Publication"; import { RosFollower } from "./RosFollower"; import { RosFollowerClient } from "./RosFollowerClient"; import { RosMasterClient } from "./RosMasterClient"; import { RosParamClient } from "./RosParamClient"; import { Subscription } from "./Subscription"; import { TcpSocketCreate, TcpServer, TcpAddress, NetworkInterface } from "./TcpTypes"; export type RosGraph = { publishers: Map>; subscribers: Map>; services: Map>; }; export type SubscribeOpts = { topic: string; dataType: string; md5sum?: string; tcpNoDelay?: boolean; }; export type PublishOpts = { topic: string; dataType: string; latching?: boolean; messageDefinition?: MessageDefinition[]; messageDefinitionText?: string; md5sum?: string; }; export type ParamUpdateArgs = { key: string; value: XmlRpcValue; prevValue: XmlRpcValue; callerId: string; }; export type PublisherUpdateArgs = { topic: string; publishers: string[]; prevPublishers: string[]; callerId: string; }; export interface RosNodeEvents { paramUpdate: (args: ParamUpdateArgs) => void; publisherUpdate: (args: PublisherUpdateArgs) => void; error: (err: Error) => void; } export declare class RosNode extends EventEmitter { #private; readonly name: string; readonly hostname: string; readonly pid: number; rosMasterClient: RosMasterClient; rosParamClient: RosParamClient; rosFollower: RosFollower; subscriptions: Map; publications: Map; parameters: Map; constructor(options: { name: string; hostname: string; pid: number; rosMasterUri: string; httpServer: HttpServer; tcpSocketCreate: TcpSocketCreate; tcpServer?: TcpServer; log?: LoggerService; }); start(port?: number): Promise; shutdown(_msg?: string): void; subscribe(options: SubscribeOpts): Subscription; advertise(options: PublishOpts): Promise; publish(topic: string, message: unknown): Promise; isSubscribedTo(topic: string): boolean; isAdvertising(topic: string): boolean; unsubscribe(topic: string): boolean; unadvertise(topic: string): boolean; getParamNames(): Promise; setParameter(key: string, value: XmlRpcValue): Promise; subscribeParam(key: string): Promise; unsubscribeParam(key: string): Promise; subscribeAllParams(): Promise>>; unsubscribeAllParams(): Promise; getPublishedTopics(subgraph?: string): Promise<[topic: string, dataType: string][]>; getSystemState(): Promise; tcpServerAddress(): Promise; receivedBytes(): number; static RequestTopic(name: string, topic: string, apiClient: RosFollowerClient): Promise<{ address: string; port: number; }>; static GetRosHostname(getEnvVar: (envVar: string) => string | undefined, getHostname: () => string | undefined, getNetworkInterfaces: () => NetworkInterface[]): string; static IsPrivateIP(ip: string): boolean; } //# sourceMappingURL=RosNode.d.ts.map