@@ -36,6 +36,36 @@ func Named(name string) resource.Name {
3636}
3737
3838// A Switch represents a physical multi-position switch.
39+ // For more information, see the [Switch component docs].
40+ //
41+ // SetPosition example:
42+ //
43+ // mySwitch, err := switch.FromRobot(machine, "my_switch")
44+ //
45+ // err := mySwitch.SetPosition(context.Background(), 0 , nil)
46+ //
47+ // For more information, see the [SetPosition method docs].
48+ //
49+ // GetPosition example:
50+ //
51+ // mySwitch, err := switch.FromRobot(machine, "my_switch")
52+ //
53+ // position, err := mySwitch.GetPosition(context.Background(), nil)
54+ //
55+ // For more information, see the [GetPosition method docs].
56+ //
57+ // GetNumberOfPositions example:
58+ //
59+ // mySwitch, err := switch.FromRobot(machine, "my_switch")
60+ //
61+ // positions, err := mySwitch.GetNumberOfPositions(context.Background(), nil)
62+ //
63+ // For more information, see the [GetNumberOfPositions method docs].
64+ //
65+ // [Switch component docs]: https://docs.viam.com/dev/reference/apis/components/switch/
66+ // [SetPosition method docs]: https://docs.viam.com/dev/reference/apis/components/switch/#setposition
67+ // [GetPosition method docs]: https://docs.viam.com/dev/reference/apis/components/switch/#getposition
68+ // [GetNumberOfPositions method docs]: https://docs.viam.com/dev/reference/apis/components/switch/#getnumberofpositions
3969type Switch interface {
4070 resource.Resource
4171
0 commit comments