Class DataManagerClient

Implements

Constructors

Properties

callOptions: CallOptions = ...
name: string

The name of the resource.

Methods

  • Do a command on the data manager.

    Parameters

    • command: Struct

      The command to do.

    • callOptions: CallOptions = ...

      Call options for the command.

    Returns Promise<JsonValue>

    const dataManager = new VIAM.DataManagerClient(
    machine,
    'my_data_manager'
    );
    await dataManager.doCommand(new Struct({ cmd: 'test', data1: 500 }));

    For more information, see Data Manager API.

  • Sync data stored on the machine to the cloud.

    Parameters

    • extra: {} = {}

      Extra arguments to pass to the sync request.

    • callOptions: CallOptions = ...

      Call options for the sync request.

    Returns Promise<void>

    const dataManager = new VIAM.DataManagerClient(
    machine,
    'my_data_manager'
    );
    await dataManager.sync();

    For more information, see Data Manager API.

  • Uploads binary data to specified datasets.

    Parameters

    • binaryData: Uint8Array

      The binary data to upload.

    • tags: string[]

      Tags to associate with the binary data.

    • datasetIds: string[]

      IDs of the datasets to associate the binary data with.

    • mimeType: MimeType

      The MIME type of the binary data.

    • extra: {} = {}

      Extra arguments to pass to the upload request.

    • callOptions: CallOptions = ...

      Call options for the upload request.

    Returns Promise<void>

    const dataManager = new VIAM.DataManagerClient(
    machine,
    'my_data_manager'
    );
    await dataManager.uploadBinaryDataToDatasets(
    new Uint8Array([1, 2, 3]),
    ['tag1', 'tag2'],
    ['datasetId1', 'datasetId2'],
    MimeType.MIME_TYPE_JPEG
    );