Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/components/arm/arm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ export interface Arm extends Resource {
* const arm = new VIAM.ArmClient(machine, 'my_arm');
* const pose = await arm.getEndPosition();
* ```
*
* For more information, see [Arm
* API](https://docs.viam.com/dev/reference/apis/components/arm/#getendposition).
*/
getEndPosition: (extra?: Struct) => Promise<Pose>;

Expand All @@ -32,6 +35,9 @@ export interface Arm extends Resource {
* const geometries = await arm.getGeometries();
* console.log(geometries);
* ```
*
* For more information, see [Arm
* API](https://docs.viam.com/dev/reference/apis/components/arm/#getgeometries).
*/
getGeometries: (extra?: Struct) => Promise<Geometry[]>;

Expand All @@ -58,6 +64,9 @@ export interface Arm extends Resource {
* await arm.moveToPosition(pose);
* ```
*
* For more information, see [Arm
* API](https://docs.viam.com/dev/reference/apis/components/arm/#movetoposition).
*
* @param pose - The destination pose for the arm.
*/
moveToPosition: (pose: Pose, extra?: Struct) => Promise<void>;
Expand All @@ -74,6 +83,9 @@ export interface Arm extends Resource {
* await arm.moveToJointPositions([90, 0, 0, 0, 15, 0]);
* ```
*
* For more information, see [Arm
* API](https://docs.viam.com/dev/reference/apis/components/arm/#movetojointpositions).
*
* @param jointPositionsList - List of angles (0-360) to move each joint to.
*/
moveToJointPositions: (
Expand All @@ -90,6 +102,9 @@ export interface Arm extends Resource {
* const arm = new VIAM.ArmClient(machine, 'my_arm');
* const jointPositions = await arm.getJointPositions();
* ```
*
* For more information, see [Arm
* API](https://docs.viam.com/dev/reference/apis/components/arm/#getjointpositions).
*/
getJointPositions: (extra?: Struct) => Promise<ArmJointPositions>;

Expand All @@ -102,6 +117,9 @@ export interface Arm extends Resource {
* const arm = new VIAM.ArmClient(machine, 'my_arm');
* await arm.stop();
* ```
*
* For more information, see [Arm
* API](https://docs.viam.com/dev/reference/apis/components/arm/#stop).
*/
stop: (extra?: Struct) => Promise<void>;

Expand All @@ -115,6 +133,9 @@ export interface Arm extends Resource {
* const isMoving = await arm.isMoving();
* console.log(isMoving);
* ```
*
* For more information, see [Arm
* API](https://docs.viam.com/dev/reference/apis/components/arm/#ismoving).
*/
isMoving: () => Promise<boolean>;
}
24 changes: 24 additions & 0 deletions src/components/base/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ export interface Base extends Resource {
* const base = new VIAM.BaseClient(machine, 'my_base');
* const geometries = await base.getGeometries();
* ```
*
* For more information, see [Base
* API](https://docs.viam.com/dev/reference/apis/components/base/#getgeometries).
*/
getGeometries: (extra?: Struct) => Promise<Geometry[]>;

Expand All @@ -38,6 +41,9 @@ export interface Base extends Resource {
* await base.moveStraight(40, -90);
* ```
*
* For more information, see [Base
* API](https://docs.viam.com/dev/reference/apis/components/base/#movestraight).
*
* @param distanceMm - Distance to move, in millimeters.
* @param mmPerSec - Movement speed, in millimeters per second.
*/
Expand All @@ -63,6 +69,9 @@ export interface Base extends Resource {
* await base.spin(-180, 20);
* ```
*
* For more information, see [Base
* API](https://docs.viam.com/dev/reference/apis/components/base/#spin).
*
* @param angleDeg - Degrees to spin.
* @param degsPerSec - Angular speed, in degrees per second.
*/
Expand Down Expand Up @@ -102,6 +111,9 @@ export interface Base extends Resource {
* );
* ```
*
* For more information, see [Base
* API](https://docs.viam.com/dev/reference/apis/components/base/#setpower).
*
* @param linear - Desired linear power percentage from -1 to 1.
* @param angular - Desired angular power percentage from -1 to 1.
*/
Expand All @@ -122,6 +134,9 @@ export interface Base extends Resource {
* );
* ```
*
* For more information, see [Base
* API](https://docs.viam.com/dev/reference/apis/components/base/#setvelocity).
*
* @param linear - Desired linear velocity in millimeters per second.
* @param angular - Desired angular velocity in degrees per second.
*/
Expand All @@ -136,6 +151,9 @@ export interface Base extends Resource {
* const base = new VIAM.BaseClient(machine, 'my_base');
* await base.stop();
* ```
*
* For more information, see [Base
* API](https://docs.viam.com/dev/reference/apis/components/base/#stop).
*/
stop(extra?: Struct): Promise<void>;

Expand All @@ -148,6 +166,9 @@ export interface Base extends Resource {
* const base = new VIAM.BaseClient(machine, 'my_base');
* const moving = await base.isMoving();
* ```
*
* For more information, see [Base
* API](https://docs.viam.com/dev/reference/apis/components/base/#ismoving).
*/
isMoving(): Promise<boolean>;

Expand All @@ -160,6 +181,9 @@ export interface Base extends Resource {
* const base = new VIAM.BaseClient(machine, 'my_base');
* const properties = await base.getProperties();
* ```
*
* For more information, see [Base
* API](https://docs.viam.com/dev/reference/apis/components/base/#getproperties).
*/
getProperties(extra?: Struct): Promise<BaseProperties>;
}
33 changes: 33 additions & 0 deletions src/components/board/board.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ export interface Board extends Resource {
* const high = await board.getGPIO('15');
* ```
*
* For more information, see [Board
* API](https://docs.viam.com/dev/reference/apis/components/board/#getgpio).
*
* @param pin - The pin number.
*/
getGPIO(pin: string, extra?: Struct): Promise<boolean>;
Expand All @@ -46,6 +49,9 @@ export interface Board extends Resource {
* await board.setGPIO('15', true);
* ```
*
* For more information, see [Board
* API](https://docs.viam.com/dev/reference/apis/components/board/#setgpio).
*
* @param pin - The pin number.
* @param high - When true, set the given pin to high. When false, set the
* given pin to low.
Expand All @@ -63,6 +69,9 @@ export interface Board extends Resource {
* const dutyCycle = await board.getPWM('15');
* ```
*
* For more information, see [Board
* API](https://docs.viam.com/dev/reference/apis/components/board/#getpwm).
*
* @param pin - The pin number.
* @returns The duty cycle, which is a value from 0 to 1.
*/
Expand All @@ -80,6 +89,9 @@ export interface Board extends Resource {
* await board.setPWM('15', 0.6);
* ```
*
* For more information, see [Board
* API](https://docs.viam.com/dev/reference/apis/components/board/#setpwm).
*
* @param pin - The pin.
* @param dutyCyclePct - A value from 0 to 1.
*/
Expand All @@ -96,6 +108,9 @@ export interface Board extends Resource {
* const freq = await board.getPWMFrequency('15');
* ```
*
* For more information, see [Board
* API](https://docs.viam.com/dev/reference/apis/components/board/#getpwmfrequency).
*
* @param pin - The pin.
*/
getPWMFrequency(pin: string, extra?: Struct): Promise<number>;
Expand All @@ -111,6 +126,9 @@ export interface Board extends Resource {
* await board.setPWMFrequency('15', 1600);
* ```
*
* For more information, see [Board
* API](https://docs.viam.com/dev/reference/apis/components/board/#setpwmfrequency).
*
* @param pin - The pin.
* @param frequencyHz - The PWM frequency, in hertz. 0 will use the board's
* default PWM frequency.
Expand All @@ -135,6 +153,9 @@ export interface Board extends Resource {
* );
* ```
*
* For more information, see [Board
* API](https://docs.viam.com/dev/reference/apis/components/board/#readanalogreader).
*
* @param analogReader - The name of the analog reader.
*/
readAnalogReader(analogReader: string, extra?: Struct): Promise<AnalogValue>;
Expand All @@ -150,6 +171,9 @@ export interface Board extends Resource {
* await board.writeAnalog('my_example_analog_writer', 42);
* ```
*
* For more information, see [Board
* API](https://docs.viam.com/dev/reference/apis/components/board/#writeanalog).
*
* @param pin - The pin name.
* @param value - An integer value to write.
*/
Expand All @@ -169,6 +193,9 @@ export interface Board extends Resource {
* );
* ```
*
* For more information, see [Board
* API](https://docs.viam.com/dev/reference/apis/components/board/#getdigitalinterruptvalue).
*
* @param digitalInterruptName - The name of the digital interrupt.
*/
getDigitalInterruptValue(
Expand All @@ -193,6 +220,9 @@ export interface Board extends Resource {
* }
* ```
*
* For more information, see [Board
* API](https://docs.viam.com/dev/reference/apis/components/board/#streamticks).
*
* @param interrupts - Names of the interrupts to stream.
* @param queue - Array to put the ticks in.
*/
Expand All @@ -214,6 +244,9 @@ export interface Board extends Resource {
* await board.setPowerMode(VIAM.PowerMode.OFFLINE_DEEP, duration);
* ```
*
* For more information, see [Board
* API](https://docs.viam.com/dev/reference/apis/components/board/#setpowermode).
*
* @param powerMode - The requested power mode.
* @param duration - The requested duration to stay in power mode.
*/
Expand Down
3 changes: 3 additions & 0 deletions src/components/button/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export interface Button extends Resource {
* // Push the button
* await button.push();
* ```
*
* For more information, see [Button
* API](https://docs.viam.com/dev/reference/apis/components/button/#push).
*/
push: (extra?: Struct) => Promise<void>;
}
12 changes: 12 additions & 0 deletions src/components/camera/camera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ export interface Camera extends Resource {
* }
* ```
*
* For more information, see [Camera
* API](https://docs.viam.com/dev/reference/apis/components/camera/#getimage).
*
* @param mimeType - A specific MIME type to request. This is not necessarily
* the same type that will be returned.
*/
Expand All @@ -72,6 +75,9 @@ export interface Camera extends Resource {
* const image = await camera.renderFrame(mimeType);
* ```
*
* For more information, see [Camera
* API](https://docs.viam.com/dev/reference/apis/components/camera/#renderframe).
*
* @param mimeType - A specific MIME type to request. This is not necessarily
* the same type that will be returned.
*/
Expand All @@ -86,6 +92,9 @@ export interface Camera extends Resource {
* const camera = new VIAM.CameraClient(machine, 'my_camera');
* const pointCloud = await camera.getPointCloud();
* ```
*
* For more information, see [Camera
* API](https://docs.viam.com/dev/reference/apis/components/camera/#getpointcloud).
*/
getPointCloud: (extra?: Struct) => Promise<Uint8Array>;

Expand All @@ -98,6 +107,9 @@ export interface Camera extends Resource {
* const camera = new VIAM.CameraClient(machine, 'my_camera');
* const properties = await camera.getProperties();
* ```
*
* For more information, see [Camera
* API](https://docs.viam.com/dev/reference/apis/components/camera/#getproperties).
*/
getProperties: () => Promise<Properties>;
}
9 changes: 9 additions & 0 deletions src/components/encoder/encoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export interface Encoder extends Resource {
* // Reset the zero position of the encoder
* await encoder.resetPosition();
* ```
*
* For more information, see [Encoder
* API](https://docs.viam.com/dev/reference/apis/components/encoder/#resetposition).
*/
resetPosition(extra?: Struct): Promise<void>;

Expand All @@ -38,6 +41,9 @@ export interface Encoder extends Resource {
* // Get whether the encoder returns position in ticks or degrees
* const properties = await encoder.getProperties();
* ```
*
* For more information, see [Encoder
* API](https://docs.viam.com/dev/reference/apis/components/encoder/#getproperties).
*/
getProperties(extra?: Struct): Promise<EncoderProperties>;

Expand All @@ -57,6 +63,9 @@ export interface Encoder extends Resource {
* console.log('The encoder position is currently', position, posType);
* ```
*
* For more information, see [Encoder
* API](https://docs.viam.com/dev/reference/apis/components/encoder/#getposition).
*
* @param positionType - The type of position the encoder returns (ticks or
* degrees)
*/
Expand Down
Loading