Spaces:
Sleeping
Sleeping
File size: 1,038 Bytes
8344179 51f51c3 8344179 b83a268 8344179 b83a268 8344179 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
/**
* Consumer client for receiving robot commands in RobotHub TransportServer
*/
import { RoboticsClientCore } from './core.js';
import type { WebSocketMessage, ClientOptions, JointUpdateCallback, StateSyncCallback } from './types.js';
export declare class RoboticsConsumer extends RoboticsClientCore {
private onStateSyncCallback;
private onJointUpdateCallback;
constructor(baseUrl: string, options?: ClientOptions);
connect(workspaceId: string, roomId: string, participantId?: string): Promise<boolean>;
getStateSyncAsync(): Promise<Record<string, number>>;
onStateSync(callback: StateSyncCallback): void;
onJointUpdate(callback: JointUpdateCallback): void;
protected handleRoleSpecificMessage(message: WebSocketMessage): void;
private handleStateSync;
private handleJointUpdate;
/**
* Create a consumer and automatically connect to a room
*/
static createAndConnect(workspaceId: string, roomId: string, baseUrl: string, participantId?: string): Promise<RoboticsConsumer>;
}
|