Class DiscoveryClient

A gRPC-web client for a Vision service.

Implements

Constructors

Properties

callOptions: CallOptions = ...
name: string

The name of the resource.

Methods

  • Get a list of component configs of all discovered components.

    Parameters

    • extra: {} = {}
    • callOptions: CallOptions = ...

    Returns Promise<ComponentConfig[]>

    • The list of ComponentConfigs.
  • Send/Receive arbitrary commands to the resource.

    Parameters

    • command: Struct | Record<string, JsonValue>

      The command to execute. Accepts either a Struct or a plain object, which will be converted automatically.

    • callOptions: CallOptions = ...

    Returns Promise<JsonValue>

    // Plain object (recommended)
    const result = await resource.doCommand({
    myCommand: { key: 'value' },
    });

    // Struct (still supported)
    import { Struct } from '@viamrobotics/sdk';

    const result = await resource.doCommand(
    Struct.fromJson({ myCommand: { key: 'value' } })
    );