You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: static/include/services/apis/generated/discovery-table.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,3 +2,6 @@
2
2
| Method Name | Description |
3
3
| ----------- | ----------- |
4
4
|[`DiscoverResources`](/dev/reference/apis/services/discovery/#discoverresources)| Get a list of component configs of all resources available to configure on a machine based on the hardware that is connected to or part of the machine. |
5
+
|[`GetResourceName`](/dev/reference/apis/services/discovery/#getresourcename)| Get the `ResourceName` for this instance of the service. |
Copy file name to clipboardExpand all lines: static/include/services/apis/generated/discovery.md
+233Lines changed: 233 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,3 +95,236 @@ For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_s
95
95
96
96
{{% /tab %}}
97
97
{{< /tabs >}}
98
+
99
+
### GetResourceName
100
+
101
+
Get the `ResourceName` for this instance of the service.
102
+
103
+
{{< tabs >}}
104
+
{{% tab name="Python" %}}
105
+
106
+
**Parameters:**
107
+
108
+
-`name` ([str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The name of the Resource.
109
+
110
+
**Returns:**
111
+
112
+
- ([viam.proto.common.ResourceName](https://python.viam.dev/autoapi/viam/proto/common/index.html#viam.proto.common.ResourceName)): The ResourceName of this Resource.
For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/services/discovery/client/index.html#viam.services.discovery.client.DiscoveryClient.get_resource_name).
For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DiscoveryClient/getResourceName.html).
174
+
175
+
{{% /tab %}}
176
+
{{< /tabs >}}
177
+
178
+
### DoCommand
179
+
180
+
Execute model-specific commands.
181
+
If you are implementing your own generic service and want to add features that have no corresponding built-in API method, you can implement them with [`DoCommand`](/dev/reference/sdks/docommand/).
182
+
183
+
{{< tabs >}}
184
+
{{% tab name="Python" %}}
185
+
186
+
**Parameters:**
187
+
188
+
-`command` (Mapping[[str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str), ValueTypes]) (required): The command to execute.
189
+
-`timeout` ([float](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)) (optional): An option to set how long to wait (in seconds) before calling a time-out and closing the underlying RPC call.
190
+
191
+
**Returns:**
192
+
193
+
- (Mapping[[str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str), viam.utils.ValueTypes]): Result of the executed command.
For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/services/discovery/client/index.html#viam.services.discovery.client.DiscoveryClient.do_command).
209
+
210
+
{{% /tab %}}
211
+
{{% tab name="Go" %}}
212
+
213
+
**Parameters:**
214
+
215
+
-`ctx`[(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
216
+
-`cmd`[(map[string]interface{})](https://go.dev/blog/maps): The command to execute.
217
+
218
+
**Returns:**
219
+
220
+
-[(map[string]interface{})](https://pkg.go.dev/builtin#string): The command response.
221
+
-[(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.
For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/services/discovery/client/index.html#viam.services.discovery.client.DiscoveryClient.close).
307
+
308
+
{{% /tab %}}
309
+
{{% tab name="Go" %}}
310
+
311
+
**Parameters:**
312
+
313
+
-`ctx`[(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
314
+
315
+
**Returns:**
316
+
317
+
-[(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.
0 commit comments