Interface Discovery

A service that enables various computer vision algorithms

interface Discovery {
    discoverResources: (extra?: Struct) => Promise<ComponentConfig[]>;
    name: string;
    doCommand(command: Struct): Promise<JsonValue>;
}

Hierarchy (View Summary)

Implemented by

Properties

Methods

Properties

discoverResources: (extra?: Struct) => Promise<ComponentConfig[]>

Get a list of component configs of all discovered components.

Type declaration

name: string

The name of the resource.

Methods

  • Send/Receive arbitrary commands to the resource.

    Parameters

    • command: Struct

      The command to execute.

    Returns Promise<JsonValue>

    import { Struct } from '@viamrobotics/sdk';

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