Viam SDK
    Preparing search index...

    Interface DataManager

    interface DataManager {
        name: string;
        sync: (extra?: Struct) => Promise<void>;
        uploadBinaryDataToDatasets: (
            binaryData: Uint8Array,
            tags: string[],
            datasetIds: string[],
            mimeType: MimeType,
            extra?: Struct,
        ) => Promise<void>;
        doCommand(command: Struct | Record<string, JsonValue>): Promise<JsonValue>;
        getStatus(): Promise<JsonValue>;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    name: string

    The name of the resource.

    sync: (extra?: Struct) => Promise<void>
    uploadBinaryDataToDatasets: (
        binaryData: Uint8Array,
        tags: string[],
        datasetIds: string[],
        mimeType: MimeType,
        extra?: Struct,
    ) => Promise<void>

    Methods

    • 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.

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