Class SwitchClient

A gRPC-web client for the Switch component.

Implements

Constructors

Properties

callOptions: CallOptions = ...
client: PromiseClient<{
    methods: {
        doCommand: {
            I: typeof DoCommandRequest;
            O: typeof DoCommandResponse;
            kind: Unary;
            name: "DoCommand";
        };
        getNumberOfPositions: {
            I: typeof GetNumberOfPositionsRequest;
            O: typeof GetNumberOfPositionsResponse;
            kind: Unary;
            name: "GetNumberOfPositions";
        };
        getPosition: {
            I: typeof switchApi.GetPositionRequest;
            O: typeof switchApi.GetPositionResponse;
            kind: Unary;
            name: "GetPosition";
        };
        setPosition: {
            I: typeof SetPositionRequest;
            O: typeof SetPositionResponse;
            kind: Unary;
            name: "SetPosition";
        };
    };
    typeName: "viam.component.switch.v1.SwitchService";
}>

Type declaration

name: string
options: Options

Methods

  • Send/Receive arbitrary commands to the resource.

    Parameters

    • command: Struct

      The command to execute.

    • callOptions: CallOptions = ...

    Returns Promise<JsonValue>

  • Parameters

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

      Returns Promise<number>

    • Parameters

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

        Returns Promise<number>

      • Parameters

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

          Returns Promise<void>