Interface DataManager

interface DataManager {
    name: string;
    sync: (extra?: Struct) => Promise<void>;
    doCommand(command: Struct): Promise<JsonValue>;
}

Hierarchy (View Summary)

Implemented by

Properties

Methods

Properties

name: string

The name of the resource.

sync: (extra?: Struct) => Promise<void>

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' },
    })
    );