# Base remote control service API

Give commands to get a list of inputs from the controller that are being monitored for that control mode.
> Source: https://docs.viam.com/reference/apis/services/base-rc/


The base remote control service API allows you to get a list of inputs from the controller that are being monitored for that control mode.

The [Base remote control service](/reference/services/base-rc/) supports the following methods:

<!-- prettier-ignore -->
| Method Name | Description |
| ----------- | ----------- |
| [`ControllerInputs`](/reference/apis/services/base-rc/#controllerinputs) | Get a list of inputs from the controller that are being monitored for that control mode. |
| [`Reconfigure`](/reference/apis/services/base-rc/#reconfigure) | Reconfigure this resource. |
| [`DoCommand`](/reference/apis/services/base-rc/#docommand) | Execute model-specific commands that are not otherwise defined by the service API. |
| [`GetResourceName`](/reference/apis/services/base-rc/#getresourcename) | Get the `ResourceName` for this instance of the generic service with the given name. |
| [`Close`](/reference/apis/services/base-rc/#close) | Close out of all remote control related systems. |


## API

### ControllerInputs

Get a list of inputs from the controller that are being monitored for that control mode.

{{< tabs >}}
{{% tab name="Go" %}}

**Parameters:**

- None.

**Returns:**

- [([]input.Control)](https://pkg.go.dev/go.viam.com/rdk/components/input#Control): A list of inputs from the controller that are being monitored for that control mode.

**Example:**

```go {class="line-numbers linkable-line-numbers"}
// Get the list of inputs from the controller that are being monitored for that control mode.
inputs := baseRCService.ControllerInputs()
```

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/services/baseremotecontrol#Service).

{{% /tab %}}
{{< /tabs >}}

### Reconfigure

Reconfigure this resource.
Reconfigure must reconfigure the resource atomically and in place.

{{< tabs >}}
{{% tab name="Go" %}}

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `deps` [(Dependencies)](https://pkg.go.dev/go.viam.com/rdk/resource#Dependencies): The resource dependencies.
- `conf` [(Config)](https://pkg.go.dev/go.viam.com/rdk/resource#Config): The resource configuration.

**Returns:**

- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/resource#Resource).

{{% /tab %}}
{{< /tabs >}}

### DoCommand

Execute model-specific commands that are not otherwise defined by the service API.
Most models do not implement `DoCommand`.
Any available model-specific commands should be covered in the model's documentation.
If you are implementing your own base remote control service and want to add features that have no corresponding built-in API method, you can implement them with [`DoCommand`](/reference/sdks/docommand/).

{{< tabs >}}
{{% tab name="Go" %}}

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `cmd` [(map[string]interface{})](https://go.dev/blog/maps): The command to execute.

**Returns:**

- [(map[string]interface{})](https://pkg.go.dev/builtin#string): The command response.
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

**Example:**

```go {class="line-numbers linkable-line-numbers"}
myBaseRemoteControlSvc, err := baseremotecontrol.FromProvider(machine, "my_base_remote_control_svc")

command := map[string]interface{}{"cmd": "test", "data1": 500}
result, err := myBaseRemoteControlSvc.DoCommand(context.Background(), command)
```

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/resource#Resource).

{{% /tab %}}
{{< /tabs >}}

### GetResourceName

Get the `ResourceName` for this instance of the generic service with the given name.

{{< tabs >}}
{{% tab name="Go" %}}

**Parameters:**

- None.

**Returns:**

- [(Name)](https://pkg.go.dev/go.viam.com/rdk@v0.89.0/resource#Name)

**Example:**

```go {class="line-numbers linkable-line-numbers"}
baseRCService, err := baseremotecontrol.FromProvider(machine, "my_baseRCService_svc")

err := baseRCService.Name()
```

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/resource#Resource).

{{% /tab %}}
{{< /tabs >}}

### Close

Close out of all remote control related systems.

{{< tabs >}}
{{% tab name="Go" %}}

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.

**Returns:**

- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

**Example:**

```go {class="line-numbers linkable-line-numbers"}
baseRCService, err := baseremotecontrol.FromProvider(machine, "my_baseRCService_svc")

err := baseRCService.Close(context.Background())
```

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/resource#Resource).

{{% /tab %}}
{{< /tabs >}}


