spot-sdk-ts
Version:
TypeScript bindings based on protobufs (proto3) provided by Boston Dynamics
248 lines • 17.4 kB
TypeScript
import { SetScreenResponse, GetScreenResponse, ListScreensResponse, GetVisibleCamerasResponse, SetIrColormapResponse, GetIrColormapResponse, SetIrMeterOverlayResponse, SetScreenRequest, GetScreenRequest, ListScreensRequest, GetVisibleCamerasRequest, SetIrColormapRequest, GetIrColormapRequest, SetIrMeterOverlayRequest } from "./compositor";
import { SetStreamParamsResponse, GetStreamParamsResponse, EnableCongestionControlResponse, SetStreamParamsRequest, GetStreamParamsRequest, EnableCongestionControlRequest } from "./streamquality";
import { SetPowerStatusResponse, GetPowerStatusResponse, CyclePowerResponse, SetPowerStatusRequest, GetPowerStatusRequest, CyclePowerRequest } from "./power";
import { SetLEDBrightnessResponse, GetLEDBrightnessResponse, SetLEDBrightnessRequest, GetLEDBrightnessRequest } from "./LED";
import { StoreResponse, GetStatusResponse, TagResponse, DebugResponse, ListCamerasResponse, RetrieveRawDataResponse, RetrieveResponse, DeleteResponse, ListLogpointsResponse, SetPassphraseResponse, StoreRequest, GetStatusRequest, TagRequest, DebugRequest, ListCamerasRequest, RetrieveRawDataRequest, RetrieveRequest, DeleteRequest, ListLogpointsRequest, SetPassphraseRequest } from "./logging";
import { Observable } from "rxjs";
import { SetPtzPositionResponse, GetPtzPositionResponse, SetPtzVelocityResponse, GetPtzVelocityResponse, ListPtzResponse, InitializeLensResponse, SetPtzPositionRequest, GetPtzPositionRequest, SetPtzVelocityRequest, GetPtzVelocityRequest, ListPtzRequest, InitializeLensRequest } from "./ptz";
import { PlaySoundResponse, LoadSoundResponse, DeleteSoundResponse, ListSoundsResponse, SetVolumeResponse, GetVolumeResponse, SetAudioCaptureChannelResponse, GetAudioCaptureChannelResponse, SetAudioCaptureGainResponse, GetAudioCaptureGainResponse, PlaySoundRequest, DeleteSoundRequest, ListSoundsRequest, SetVolumeRequest, GetVolumeRequest, SetAudioCaptureChannelRequest, GetAudioCaptureChannelRequest, SetAudioCaptureGainRequest, GetAudioCaptureGainRequest, LoadSoundRequest } from "./audio";
import { GetTemperatureResponse, GetBITStatusResponse, ClearBITEventsResponse, GetSystemLogResponse, GetTemperatureRequest, GetBITStatusRequest, ClearBITEventsRequest, GetSystemLogRequest } from "./health";
import { SetICEConfigurationResponse, GetICEConfigurationResponse, SetICEConfigurationRequest, GetICEConfigurationRequest } from "./network";
import { GetSoftwareVersionResponse, GetSoftwareVersionRequest } from "./version";
export declare const protobufPackage = "bosdyn.api.spot_cam";
/** Change the layout of of the video stream between available presets. */
export interface CompositorService {
/** SetScreen changes the current view that is streamed over the network */
SetScreen(request: SetScreenRequest): Promise<SetScreenResponse>;
/** GetScreen returns the currently-selected screen */
GetScreen(request: GetScreenRequest): Promise<GetScreenResponse>;
/** ListScreens returns a list of available screens */
ListScreens(request: ListScreensRequest): Promise<ListScreensResponse>;
/** GetVisibleCameras returns a list of currently visible windows, with any available metadata */
GetVisibleCameras(request: GetVisibleCamerasRequest): Promise<GetVisibleCamerasResponse>;
/** set the mapping between radiometric IR samples to color, for video */
SetIrColormap(request: SetIrColormapRequest): Promise<SetIrColormapResponse>;
/** get the mapping between radiometric IR samples to color, for video */
GetIrColormap(request: GetIrColormapRequest): Promise<GetIrColormapResponse>;
/** apply settings for the 'ir meter overlay' */
SetIrMeterOverlay(request: SetIrMeterOverlayRequest): Promise<SetIrMeterOverlayResponse>;
}
export declare class CompositorServiceClientImpl implements CompositorService {
private readonly rpc;
constructor(rpc: Rpc);
SetScreen(request: SetScreenRequest): Promise<SetScreenResponse>;
GetScreen(request: GetScreenRequest): Promise<GetScreenResponse>;
ListScreens(request: ListScreensRequest): Promise<ListScreensResponse>;
GetVisibleCameras(request: GetVisibleCamerasRequest): Promise<GetVisibleCamerasResponse>;
SetIrColormap(request: SetIrColormapRequest): Promise<SetIrColormapResponse>;
GetIrColormap(request: GetIrColormapRequest): Promise<GetIrColormapResponse>;
SetIrMeterOverlay(request: SetIrMeterOverlayRequest): Promise<SetIrMeterOverlayResponse>;
}
/** Set quality parameters for the stream, such as compression and image postprocessing settings. */
export interface StreamQualityService {
SetStreamParams(request: SetStreamParamsRequest): Promise<SetStreamParamsResponse>;
GetStreamParams(request: GetStreamParamsRequest): Promise<GetStreamParamsResponse>;
EnableCongestionControl(request: EnableCongestionControlRequest): Promise<EnableCongestionControlResponse>;
}
export declare class StreamQualityServiceClientImpl implements StreamQualityService {
private readonly rpc;
constructor(rpc: Rpc);
SetStreamParams(request: SetStreamParamsRequest): Promise<SetStreamParamsResponse>;
GetStreamParams(request: GetStreamParamsRequest): Promise<GetStreamParamsResponse>;
EnableCongestionControl(request: EnableCongestionControlRequest): Promise<EnableCongestionControlResponse>;
}
/** Turn hardware components' power on or off. */
export interface PowerService {
/**
* Turn components' power on or off. This should not be used to power cycle a component
* Turning PTZ power off for too long will cause the video stream to fail
*/
SetPowerStatus(request: SetPowerStatusRequest): Promise<SetPowerStatusResponse>;
/** Get current status of a component */
GetPowerStatus(request: GetPowerStatusRequest): Promise<GetPowerStatusResponse>;
/** Cycle power for a component */
CyclePower(request: CyclePowerRequest): Promise<CyclePowerResponse>;
}
export declare class PowerServiceClientImpl implements PowerService {
private readonly rpc;
constructor(rpc: Rpc);
SetPowerStatus(request: SetPowerStatusRequest): Promise<SetPowerStatusResponse>;
GetPowerStatus(request: GetPowerStatusRequest): Promise<GetPowerStatusResponse>;
CyclePower(request: CyclePowerRequest): Promise<CyclePowerResponse>;
}
/** Change the brightness level of individual LEDs. */
export interface LightingService {
SetLEDBrightness(request: SetLEDBrightnessRequest): Promise<SetLEDBrightnessResponse>;
GetLEDBrightness(request: GetLEDBrightnessRequest): Promise<GetLEDBrightnessResponse>;
}
export declare class LightingServiceClientImpl implements LightingService {
private readonly rpc;
constructor(rpc: Rpc);
SetLEDBrightness(request: SetLEDBrightnessRequest): Promise<SetLEDBrightnessResponse>;
GetLEDBrightness(request: GetLEDBrightnessRequest): Promise<GetLEDBrightnessResponse>;
}
/** Trigger data acquisitions, and retrieve resulting data. */
export interface MediaLogService {
/**
* Store queues up a Logpoint, which is a bit of media that the user wishes to store to disk
* (still images are supported for now, more media types will be supported in the future)
*/
Store(request: StoreRequest): Promise<StoreResponse>;
/**
* GetStatus reads the 'name' field of the Logpoint contained in GetStatusRequest, and fills in
* the rest of the fields. Mainly useful for getting the 'state' of the logpoint.
*/
GetStatus(request: GetStatusRequest): Promise<GetStatusResponse>;
/** Tag updates the 'tag' field of the Logpoint that's passed, which must exist. */
Tag(request: TagRequest): Promise<TagResponse>;
/** EnableDebug starts the periodic logging of health data to the database; this increases disk utilization, but will record data that is useful post-mortum */
EnableDebug(request: DebugRequest): Promise<DebugResponse>;
/** ListCameras returns a list of strings that identify valid cameras for logging */
ListCameras(request: ListCamerasRequest): Promise<ListCamerasResponse>;
/** Retrieve returns all raw data associated with a given logpoint */
RetrieveRawData(request: RetrieveRawDataRequest): Observable<RetrieveRawDataResponse>;
/** Retrieve returns all data associated with a given logpoint */
Retrieve(request: RetrieveRequest): Observable<RetrieveResponse>;
/** Delete removes a Logpoint from the system */
Delete(request: DeleteRequest): Promise<DeleteResponse>;
/**
* ListLogpoints returns a list of all logpoints in the database.
* Warning: this may be a lot of data.
*/
ListLogpoints(request: ListLogpointsRequest): Observable<ListLogpointsResponse>;
/**
* SetPassphrase sets the eCryptFS passphrase used by the filesystem.
* there is no symmetry here, because key material is write-only
* This rpc is now deprecated as of the switch from EXT4 to NTFS and returns UnimplementedError
*/
SetPassphrase(request: SetPassphraseRequest): Promise<SetPassphraseResponse>;
}
export declare class MediaLogServiceClientImpl implements MediaLogService {
private readonly rpc;
constructor(rpc: Rpc);
Store(request: StoreRequest): Promise<StoreResponse>;
GetStatus(request: GetStatusRequest): Promise<GetStatusResponse>;
Tag(request: TagRequest): Promise<TagResponse>;
EnableDebug(request: DebugRequest): Promise<DebugResponse>;
ListCameras(request: ListCamerasRequest): Promise<ListCamerasResponse>;
RetrieveRawData(request: RetrieveRawDataRequest): Observable<RetrieveRawDataResponse>;
Retrieve(request: RetrieveRequest): Observable<RetrieveResponse>;
Delete(request: DeleteRequest): Promise<DeleteResponse>;
ListLogpoints(request: ListLogpointsRequest): Observable<ListLogpointsResponse>;
SetPassphrase(request: SetPassphraseRequest): Promise<SetPassphraseResponse>;
}
/** Control real and virtual ptz mechanisms. */
export interface PtzService {
/** SetPosition points the referenced camera to a given vector (in PTZ-space) */
SetPtzPosition(request: SetPtzPositionRequest): Promise<SetPtzPositionResponse>;
/** GetPosition returns the current settings of the referenced camera */
GetPtzPosition(request: GetPtzPositionRequest): Promise<GetPtzPositionResponse>;
SetPtzVelocity(request: SetPtzVelocityRequest): Promise<SetPtzVelocityResponse>;
GetPtzVelocity(request: GetPtzVelocityRequest): Promise<GetPtzVelocityResponse>;
ListPtz(request: ListPtzRequest): Promise<ListPtzResponse>;
/** Reinitializes PTZ autofocus */
InitializeLens(request: InitializeLensRequest): Promise<InitializeLensResponse>;
}
export declare class PtzServiceClientImpl implements PtzService {
private readonly rpc;
constructor(rpc: Rpc);
SetPtzPosition(request: SetPtzPositionRequest): Promise<SetPtzPositionResponse>;
GetPtzPosition(request: GetPtzPositionRequest): Promise<GetPtzPositionResponse>;
SetPtzVelocity(request: SetPtzVelocityRequest): Promise<SetPtzVelocityResponse>;
GetPtzVelocity(request: GetPtzVelocityRequest): Promise<GetPtzVelocityResponse>;
ListPtz(request: ListPtzRequest): Promise<ListPtzResponse>;
InitializeLens(request: InitializeLensRequest): Promise<InitializeLensResponse>;
}
/** Upload and play sounds over the SpotCam's speakers. */
export interface AudioService {
/** Given a soundRequest that identifies a single sound present in the system's sound effects table, PlaySound executes the sound effect. */
PlaySound(request: PlaySoundRequest): Promise<PlaySoundResponse>;
/**
* LoadSound loads a sound effect into the system's sound table. The stream must contain a wav file, with a RIFF header describing it.
* The arguement is a stream, to allow for sounds that are bigger then the MTU of the network; in this case, the complete stream must
* contain the entire sound. If the stream ends early, an error will be returned. The header and sound fields of the entire stream must
* be the same.
*/
LoadSound(request: Observable<LoadSoundRequest>): Promise<LoadSoundResponse>;
/** Delete the sound identified in the argument from the system's sound table. */
DeleteSound(request: DeleteSoundRequest): Promise<DeleteSoundResponse>;
/** ListSounds returns a list of all of the sound effects that the system knows about. */
ListSounds(request: ListSoundsRequest): Promise<ListSoundsResponse>;
/** Set the overall volume level for playing sounds. */
SetVolume(request: SetVolumeRequest): Promise<SetVolumeResponse>;
/** Set the overall volume level for playing sounds. */
GetVolume(request: GetVolumeRequest): Promise<GetVolumeResponse>;
SetAudioCaptureChannel(request: SetAudioCaptureChannelRequest): Promise<SetAudioCaptureChannelResponse>;
GetAudioCaptureChannel(request: GetAudioCaptureChannelRequest): Promise<GetAudioCaptureChannelResponse>;
SetAudioCaptureGain(request: SetAudioCaptureGainRequest): Promise<SetAudioCaptureGainResponse>;
GetAudioCaptureGain(request: GetAudioCaptureGainRequest): Promise<GetAudioCaptureGainResponse>;
}
export declare class AudioServiceClientImpl implements AudioService {
private readonly rpc;
constructor(rpc: Rpc);
PlaySound(request: PlaySoundRequest): Promise<PlaySoundResponse>;
LoadSound(request: Observable<LoadSoundRequest>): Promise<LoadSoundResponse>;
DeleteSound(request: DeleteSoundRequest): Promise<DeleteSoundResponse>;
ListSounds(request: ListSoundsRequest): Promise<ListSoundsResponse>;
SetVolume(request: SetVolumeRequest): Promise<SetVolumeResponse>;
GetVolume(request: GetVolumeRequest): Promise<GetVolumeResponse>;
SetAudioCaptureChannel(request: SetAudioCaptureChannelRequest): Promise<SetAudioCaptureChannelResponse>;
GetAudioCaptureChannel(request: GetAudioCaptureChannelRequest): Promise<GetAudioCaptureChannelResponse>;
SetAudioCaptureGain(request: SetAudioCaptureGainRequest): Promise<SetAudioCaptureGainResponse>;
GetAudioCaptureGain(request: GetAudioCaptureGainRequest): Promise<GetAudioCaptureGainResponse>;
}
/** Query temperature and built-in test results. */
export interface HealthService {
/** GetTemperature returns a list of thermometers in the system, and the temperature that they measure. */
GetTemperature(request: GetTemperatureRequest): Promise<GetTemperatureResponse>;
/**
* GetBitStatus returns two lists; a list of system events, and a list of ways that the system is degraded;
* for instance, a degredation may include a missing PTZ unit, or a missing USB storage device.
*/
GetBITStatus(request: GetBITStatusRequest): Promise<GetBITStatusResponse>;
/** ClearBitEvents clears out the events list of the BITStatus structure. */
ClearBITEvents(request: ClearBITEventsRequest): Promise<ClearBITEventsResponse>;
/**
* GetSystemLog retrieves an encrypted log of system events, for factory diagnosis of possible issues.
* The data streamed back should be concatenated to a single file, before sending to the manufacturer.
*/
GetSystemLog(request: GetSystemLogRequest): Observable<GetSystemLogResponse>;
}
export declare class HealthServiceClientImpl implements HealthService {
private readonly rpc;
constructor(rpc: Rpc);
GetTemperature(request: GetTemperatureRequest): Promise<GetTemperatureResponse>;
GetBITStatus(request: GetBITStatusRequest): Promise<GetBITStatusResponse>;
ClearBITEvents(request: ClearBITEventsRequest): Promise<ClearBITEventsResponse>;
GetSystemLog(request: GetSystemLogRequest): Observable<GetSystemLogResponse>;
}
/** Modify or query network settings of the SpotCam and ICE resolution servers. */
export interface NetworkService {
/** SetICEConfiguration sets up parameters for ICE, including addresses for STUN and TURN services */
SetICEConfiguration(request: SetICEConfigurationRequest): Promise<SetICEConfigurationResponse>;
/** GetICEConfiguration retrieves currently set parameters for ICE, including addresses for STUN and TURN services */
GetICEConfiguration(request: GetICEConfigurationRequest): Promise<GetICEConfigurationResponse>;
}
export declare class NetworkServiceClientImpl implements NetworkService {
private readonly rpc;
constructor(rpc: Rpc);
SetICEConfiguration(request: SetICEConfigurationRequest): Promise<SetICEConfigurationResponse>;
GetICEConfiguration(request: GetICEConfigurationRequest): Promise<GetICEConfigurationResponse>;
}
/** Query the version of the software release running on the SpotCam. */
export interface VersionService {
GetSoftwareVersion(request: GetSoftwareVersionRequest): Promise<GetSoftwareVersionResponse>;
}
export declare class VersionServiceClientImpl implements VersionService {
private readonly rpc;
constructor(rpc: Rpc);
GetSoftwareVersion(request: GetSoftwareVersionRequest): Promise<GetSoftwareVersionResponse>;
}
interface Rpc {
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
clientStreamingRequest(service: string, method: string, data: Observable<Uint8Array>): Promise<Uint8Array>;
serverStreamingRequest(service: string, method: string, data: Uint8Array): Observable<Uint8Array>;
bidirectionalStreamingRequest(service: string, method: string, data: Observable<Uint8Array>): Observable<Uint8Array>;
}
export {};
//# sourceMappingURL=service.d.ts.map