Interface GenericComponent

Represents a generic component.

interface GenericComponent {
    getGeometries: (extra?: Struct) => Promise<commonApi.Geometry[]>;
    name: string;
    doCommand(command: Struct): Promise<JsonValue>;
}

Hierarchy (View Summary, Expand)

Implemented by

Properties

Methods

Properties

getGeometries: (extra?: Struct) => Promise<commonApi.Geometry[]>

Get the geometries of the component in their current configuration.

const generic = new VIAM.GenericComponentClient(
machine,
'my_generic_component'
);

// Get the geometries of this component
const geometries = await generic.getGeometries();
console.log('Geometries:', geometries);

For more information, see Generic API.

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>

    const result = await resource.doCommand({
    name: 'myCommand',
    args: { key: 'value' },
    });
MMNEPVFCICPMFPCPTTAAATR