import { XmlRpcValue } from "@lichtblick/xmlrpc"; import { RosXmlRpcClient } from "./RosXmlRpcClient"; import { RosXmlRpcResponse } from "./XmlRpcTypes"; export type ProtocolParams = [string, ...XmlRpcValue[]]; export class RosFollowerClient extends RosXmlRpcClient { async getBusStats(callerId: string): Promise { return await this._methodCall("getBusStats", [callerId]); } async getBusInfo(callerId: string): Promise { return await this._methodCall("getBusInfo", [callerId]); } async shutdown(callerId: string, msg = ""): Promise { return await this._methodCall("shutdown", [callerId, msg]); } async getPid(callerId: string): Promise { return await this._methodCall("getPid", [callerId]); } async getSubscriptions(callerId: string): Promise { return await this._methodCall("getSubscriptions", [callerId]); } async getPublications(callerId: string): Promise { return await this._methodCall("getPublications", [callerId]); } async paramUpdate( callerId: string, parameterKey: string, parameterValue: XmlRpcValue, ): Promise { return await this._methodCall("paramUpdate", [callerId, parameterKey, parameterValue]); } async publisherUpdate( callerId: string, topic: string, publishers: string[], ): Promise { return await this._methodCall("publisherUpdate", [callerId, topic, publishers]); } async requestTopic( callerId: string, topic: string, protocols: ProtocolParams[], ): Promise { return await this._methodCall("requestTopic", [callerId, topic, protocols]); } }