Class SensorClient

A gRPC-web client for the Sensor component.

Implements

Constructors

Properties

callOptions: CallOptions = ...
client: PromiseClient<{
    methods: {
        doCommand: {
            I: typeof DoCommandRequest;
            O: typeof DoCommandResponse;
            kind: Unary;
            name: "DoCommand";
        };
        getGeometries: {
            I: typeof GetGeometriesRequest;
            O: typeof GetGeometriesResponse;
            kind: Unary;
            name: "GetGeometries";
        };
        getReadings: {
            I: typeof commonApi.GetReadingsRequest;
            O: typeof commonApi.GetReadingsResponse;
            kind: Unary;
            name: "GetReadings";
        };
    };
    typeName: "viam.component.sensor.v1.SensorService";
}>

Type declaration

  • Readonly methods: {
        doCommand: {
            I: typeof DoCommandRequest;
            O: typeof DoCommandResponse;
            kind: Unary;
            name: "DoCommand";
        };
        getGeometries: {
            I: typeof GetGeometriesRequest;
            O: typeof GetGeometriesResponse;
            kind: Unary;
            name: "GetGeometries";
        };
        getReadings: {
            I: typeof commonApi.GetReadingsRequest;
            O: typeof commonApi.GetReadingsResponse;
            kind: Unary;
            name: "GetReadings";
        };
    }
  • Readonly typeName: "viam.component.sensor.v1.SensorService"
name: string
options: Options

Methods

  • Send/Receive arbitrary commands to the resource.

    Parameters

    • command: Struct

      The command to execute.

    • callOptions: CallOptions = ...

    Returns Promise<JsonValue>

  • Return the readings of a sensor.

    Parameters

    • extra: {} = {}
      • callOptions: CallOptions = ...

      Returns Promise<Record<string, JsonValue>>

    Generated using TypeDoc