diff --git a/dartdoc_options.yaml b/dartdoc_options.yaml index ec436071071..82fcae06905 100644 --- a/dartdoc_options.yaml +++ b/dartdoc_options.yaml @@ -1,10 +1,15 @@ dartdoc: categories: + "Components": + markdown: doc/Components.md + "Services": + markdown: doc/Services.md "Viam SDK": markdown: doc/ViamSDK.md - name: Viam SDK + "Common": + markdown: doc/Common.md "Protobuf Definitions": markdown: doc/Protobuf.md - name: Protobuf Definitions - categoryOrder: ["Viam SDK", "Protobuf Definitions"] + categoryOrder: + ["Components", "Services", "Common", "Viam SDK", "Protobuf Definitions"] nodoc: ["**/di/**", "**/domain/**"] diff --git a/doc/Common.md b/doc/Common.md new file mode 100644 index 00000000000..788782f2e27 --- /dev/null +++ b/doc/Common.md @@ -0,0 +1,19 @@ +# Classes in Viam SDK Library + +These are common classes that are also in the [Viam SDK library](https://flutter.viam.dev/viam_sdk/viam_sdk-library.html). + +[DoCommandRequest](https://flutter.viam.dev/viam_sdk/DoCommandRequest-class.html) + +[DoCommandResponse](https://flutter.viam.dev/viam_sdk/DoCommandResponse-class.html) + +[GeoPoint](https://flutter.viam.dev/viam_sdk/GeoPoint-class.html) + +[Orientation](https://flutter.viam.dev/viam_sdk/Orientation-class.html) + +[Pose](https://flutter.viam.dev/viam_sdk/Pose-class.html) + +[PoseInFrame](https://flutter.viam.dev/viam_sdk/PoseInFrame-class.html) + +[ResourceName](https://flutter.viam.dev/viam_sdk/ResourceName-class.html) + +[Vector3](https://flutter.viam.dev/viam_sdk/Vector3-class.html) diff --git a/doc/Components.md b/doc/Components.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/doc/Services.md b/doc/Services.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/doc/ViamSDK.md b/doc/ViamSDK.md index beb132ba562..106b77f0d1a 100644 --- a/doc/ViamSDK.md +++ b/doc/ViamSDK.md @@ -1,3 +1,3 @@ -# Viam SDK Library +# Viam SDK Smart machines on smart devices. diff --git a/lib/protos/common/common.dart b/lib/protos/common/common.dart index 196b3a81b4f..3cd0f6360b7 100644 --- a/lib/protos/common/common.dart +++ b/lib/protos/common/common.dart @@ -1,5 +1,5 @@ /// The proto definitions for common -/// {@category Protobuf Definitions} +/// {@category Common} library viam_protos.common.common; // THIS FILE IS AUTOMATICALLY GENERATED diff --git a/lib/src/components/arm/arm.dart b/lib/src/components/arm/arm.dart index 7a1e3204134..2789e9de645 100644 --- a/lib/src/components/arm/arm.dart +++ b/lib/src/components/arm/arm.dart @@ -2,7 +2,7 @@ import '../../gen/common/v1/common.pb.dart'; import '../../resource/base.dart'; import '../../robot/client.dart'; -/// {@category Viam SDK} +/// {@category Components} /// Arm represents a physical robot arm that exists in three-dimensional space. /// /// For more information, see [Arm component](https://docs.viam.com/components/arm/). diff --git a/lib/src/components/arm/client.dart b/lib/src/components/arm/client.dart index 55bc0235920..8e3e0a2840f 100644 --- a/lib/src/components/arm/client.dart +++ b/lib/src/components/arm/client.dart @@ -7,7 +7,7 @@ import '../../resource/base.dart'; import '../../utils.dart'; import 'arm.dart'; -/// {@category Viam SDK} +/// {@category Components} /// gRPC client for an [Arm] component. /// /// Used to communicate with an existing [Arm] implementation over gRPC. diff --git a/lib/src/components/arm/service.dart b/lib/src/components/arm/service.dart index af850b0b5e4..c4e5a7611f9 100644 --- a/lib/src/components/arm/service.dart +++ b/lib/src/components/arm/service.dart @@ -6,6 +6,7 @@ import '../../resource/manager.dart'; import '../../utils.dart'; import 'arm.dart'; +/// {@category Components} /// gRPC Service for an [Arm] class ArmService extends ArmServiceBase { final ResourceManager _manager; diff --git a/lib/src/components/base/base.dart b/lib/src/components/base/base.dart index 7f74dd13187..5da84d37a0e 100644 --- a/lib/src/components/base/base.dart +++ b/lib/src/components/base/base.dart @@ -6,7 +6,7 @@ import '../../robot/client.dart'; /// {@category Viam SDK} typedef BaseProperties = GetPropertiesResponse; -/// {@category Viam SDK} +/// {@category Components} /// Base represents a physical base of a robot. /// /// For more information, see [Base component](https://docs.viam.com/components/base/). diff --git a/lib/src/components/base/client.dart b/lib/src/components/base/client.dart index b9a51fda7e6..2b3dd423b15 100644 --- a/lib/src/components/base/client.dart +++ b/lib/src/components/base/client.dart @@ -8,7 +8,7 @@ import '../../resource/base.dart'; import '../../utils.dart'; import 'base.dart'; -/// {@category Viam SDK} +/// {@category Components} /// gRPC client for the [Base] component. class BaseClient extends Base implements ResourceRPCClient { @override diff --git a/lib/src/components/base/service.dart b/lib/src/components/base/service.dart index da2adc902be..ec55085f31f 100644 --- a/lib/src/components/base/service.dart +++ b/lib/src/components/base/service.dart @@ -6,6 +6,7 @@ import '../../resource/manager.dart'; import '../../utils.dart'; import 'base.dart'; +/// {@category Components} /// gRPC service for a robotic [Base] class BaseService extends BaseServiceBase { final ResourceManager _manager; diff --git a/lib/src/components/board/board.dart b/lib/src/components/board/board.dart index d13760b2e7f..4675146e8c8 100644 --- a/lib/src/components/board/board.dart +++ b/lib/src/components/board/board.dart @@ -12,7 +12,7 @@ typedef Tick = StreamTicksResponse; /// {@category Viam SDK} typedef AnalogValue = ReadAnalogReaderResponse; -/// {@category Viam SDK} +/// {@category Components} /// Board represents a physical general purpose compute board that contains various /// components such as analog readers, and digital interrupts. /// diff --git a/lib/src/components/board/client.dart b/lib/src/components/board/client.dart index 2198c69a9b4..8cf66a13e14 100644 --- a/lib/src/components/board/client.dart +++ b/lib/src/components/board/client.dart @@ -12,7 +12,7 @@ import '../../resource/base.dart'; import '../../utils.dart'; import 'board.dart'; -/// {@category Viam SDK} +/// {@category Components} /// gRPC client for the [Board] component. class BoardClient extends Board implements ResourceRPCClient { @override diff --git a/lib/src/components/board/service.dart b/lib/src/components/board/service.dart index 02b32d56bd0..711c5da4603 100644 --- a/lib/src/components/board/service.dart +++ b/lib/src/components/board/service.dart @@ -9,6 +9,7 @@ import '../../resource/manager.dart'; import '../../utils.dart'; import 'board.dart'; +/// {@category Components} /// gRPC Service for a [Board] class BoardService extends BoardServiceBase { final ResourceManager _manager; diff --git a/lib/src/components/camera/camera.dart b/lib/src/components/camera/camera.dart index e4055244eb2..99a9e2b0d0d 100644 --- a/lib/src/components/camera/camera.dart +++ b/lib/src/components/camera/camera.dart @@ -8,7 +8,7 @@ import '../../robot/client.dart'; /// The camera's supported features and settings typedef CameraProperties = GetPropertiesResponse; -/// {@category Viam SDK} +/// {@category Components} /// Camera represents any physical hardware that can capture frames. /// /// For more information, see [Camera component](https://docs.viam.com/components/camera/). diff --git a/lib/src/components/camera/client.dart b/lib/src/components/camera/client.dart index d9cb0c34f00..f39dc7e4097 100644 --- a/lib/src/components/camera/client.dart +++ b/lib/src/components/camera/client.dart @@ -8,7 +8,7 @@ import '../../resource/base.dart'; import '../../utils.dart'; import 'camera.dart'; -/// {@category Viam SDK} +/// {@category Components} /// gRPC client for the [Camera] component class CameraClient extends Camera implements ResourceRPCClient { @override diff --git a/lib/src/components/camera/service.dart b/lib/src/components/camera/service.dart index fafd5c42d77..a59be1ed83f 100644 --- a/lib/src/components/camera/service.dart +++ b/lib/src/components/camera/service.dart @@ -8,6 +8,7 @@ import '../../resource/manager.dart'; import '../../utils.dart'; import 'camera.dart'; +/// {@category Components} /// gRPC Service for a generic [Camera] class CameraService extends CameraServiceBase { final ResourceManager _manager; diff --git a/lib/src/components/gantry/client.dart b/lib/src/components/gantry/client.dart index dd088fcee9c..dfd21d8eb9a 100644 --- a/lib/src/components/gantry/client.dart +++ b/lib/src/components/gantry/client.dart @@ -7,7 +7,7 @@ import '../../resource/base.dart'; import '../../utils.dart'; import 'gantry.dart'; -/// {@category Viam SDK} +/// {@category Components} /// gRPC client for the [Gantry] component. class GantryClient extends Gantry implements ResourceRPCClient { @override diff --git a/lib/src/components/gantry/gantry.dart b/lib/src/components/gantry/gantry.dart index 75b80df8d9e..6b5f6672355 100644 --- a/lib/src/components/gantry/gantry.dart +++ b/lib/src/components/gantry/gantry.dart @@ -2,7 +2,7 @@ import '../../gen/common/v1/common.pb.dart'; import '../../resource/base.dart'; import '../../robot/client.dart'; -/// {@category Viam SDK} +/// {@category Components} /// Gantry represents a physical Gantry and can be used for controlling gantries of N axes. /// /// For more information, see [Gantry component](https://docs.viam.com/components/gantry/). diff --git a/lib/src/components/gantry/service.dart b/lib/src/components/gantry/service.dart index 26bbc7035ca..d587c8af119 100644 --- a/lib/src/components/gantry/service.dart +++ b/lib/src/components/gantry/service.dart @@ -6,6 +6,7 @@ import '../../resource/manager.dart'; import '../../utils.dart'; import 'gantry.dart'; +/// {@category Components} /// gRPC Service for a [Gantry] class GantryService extends GantryServiceBase { final ResourceManager _manager; diff --git a/lib/src/components/generic/client.dart b/lib/src/components/generic/client.dart index c6f4fd6de22..b662309f070 100644 --- a/lib/src/components/generic/client.dart +++ b/lib/src/components/generic/client.dart @@ -6,7 +6,7 @@ import '../../resource/base.dart'; import '../../utils.dart'; import 'generic.dart'; -/// {@category Viam SDK} +/// {@category Components} /// gRPC client for the [Generic] component. class GenericClient extends Generic implements ResourceRPCClient { @override diff --git a/lib/src/components/generic/generic.dart b/lib/src/components/generic/generic.dart index c6f39f9cc94..e97397aadb9 100644 --- a/lib/src/components/generic/generic.dart +++ b/lib/src/components/generic/generic.dart @@ -2,7 +2,7 @@ import '../../gen/common/v1/common.pb.dart'; import '../../resource/base.dart'; import '../../robot/client.dart'; -/// {@category Viam SDK} +/// {@category Components} /// Generic represents a generic component that executes doCommand. /// /// For more information, see [Generic component](https://docs.viam.com/components/generic/). diff --git a/lib/src/components/generic/service.dart b/lib/src/components/generic/service.dart index 9d4aaea1662..2e2e88b726d 100644 --- a/lib/src/components/generic/service.dart +++ b/lib/src/components/generic/service.dart @@ -6,6 +6,7 @@ import '../../resource/manager.dart'; import '../../utils.dart'; import 'generic.dart'; +/// {@category Components} /// gRPC Service for a generic [Generic] class GenericService extends GenericServiceBase { final ResourceManager _manager; diff --git a/lib/src/components/gripper/client.dart b/lib/src/components/gripper/client.dart index 0c33d66e5e3..4300b1a39e7 100644 --- a/lib/src/components/gripper/client.dart +++ b/lib/src/components/gripper/client.dart @@ -7,7 +7,7 @@ import '../../resource/base.dart'; import '../../utils.dart'; import 'gripper.dart'; -/// {@category Viam SDK} +/// {@category Components} /// gRPC client for the [Gripper] component. class GripperClient extends Gripper implements ResourceRPCClient { @override diff --git a/lib/src/components/gripper/gripper.dart b/lib/src/components/gripper/gripper.dart index 5eb2573be30..82bff40d0ca 100644 --- a/lib/src/components/gripper/gripper.dart +++ b/lib/src/components/gripper/gripper.dart @@ -2,7 +2,7 @@ import '../../gen/common/v1/common.pb.dart'; import '../../resource/base.dart'; import '../../robot/client.dart'; -/// {@category Viam SDK} +/// {@category Components} /// Gripper represents a physical Gripper which can open and close. /// /// For more information, see [Gripper component](https://docs.viam.com/components/gripper/). diff --git a/lib/src/components/gripper/service.dart b/lib/src/components/gripper/service.dart index af315ec9a53..38c096bd14a 100644 --- a/lib/src/components/gripper/service.dart +++ b/lib/src/components/gripper/service.dart @@ -6,6 +6,7 @@ import '../../resource/manager.dart'; import '../../utils.dart'; import 'gripper.dart'; +/// {@category Components} /// gRPC Service for a [Gripper] class GripperService extends GripperServiceBase { final ResourceManager _manager; diff --git a/lib/src/components/motor/client.dart b/lib/src/components/motor/client.dart index 9dfba0deb21..ac9007374a8 100644 --- a/lib/src/components/motor/client.dart +++ b/lib/src/components/motor/client.dart @@ -7,7 +7,7 @@ import '../../resource/base.dart'; import '../../utils.dart'; import 'motor.dart'; -/// {@category Viam SDK} +/// {@category Components} /// gRPC client for the [Motor] component. class MotorClient extends Motor implements ResourceRPCClient { @override diff --git a/lib/src/components/motor/motor.dart b/lib/src/components/motor/motor.dart index 90799a6cf79..37842fff71a 100644 --- a/lib/src/components/motor/motor.dart +++ b/lib/src/components/motor/motor.dart @@ -18,7 +18,7 @@ class PowerState { } } -/// {@category Viam SDK} +/// {@category Components} /// Motor represents a physical motor. /// /// For more information, see [Motor component](https://docs.viam.com/components/motor/). diff --git a/lib/src/components/motor/service.dart b/lib/src/components/motor/service.dart index 1a759f1a616..44d14359506 100644 --- a/lib/src/components/motor/service.dart +++ b/lib/src/components/motor/service.dart @@ -6,6 +6,7 @@ import '../../resource/manager.dart'; import '../../utils.dart'; import 'motor.dart'; +/// {@category Components} /// gRPC Service for a [Motor] class MotorService extends MotorServiceBase { final ResourceManager _manager; diff --git a/lib/src/components/movement_sensor/client.dart b/lib/src/components/movement_sensor/client.dart index f76cb004a70..ad1786cff98 100644 --- a/lib/src/components/movement_sensor/client.dart +++ b/lib/src/components/movement_sensor/client.dart @@ -7,7 +7,7 @@ import '../../resource/base.dart'; import '../../utils.dart'; import 'movement_sensor.dart'; -/// {@category Viam SDK} +/// {@category Components} /// gRPC client for the [MovementSensor] component. class MovementSensorClient extends MovementSensor implements ResourceRPCClient { @override diff --git a/lib/src/components/movement_sensor/movement_sensor.dart b/lib/src/components/movement_sensor/movement_sensor.dart index 0f30074446f..74f9d0b4234 100644 --- a/lib/src/components/movement_sensor/movement_sensor.dart +++ b/lib/src/components/movement_sensor/movement_sensor.dart @@ -17,7 +17,7 @@ typedef Properties = GetPropertiesResponse; /// {@category Viam SDK} typedef Accuracy = GetAccuracyResponse; -/// {@category Viam SDK} +/// {@category Components} /// MovementSensor reports information about the robot's direction, position and speed. /// /// For more information, see [Movement Sensor component](https://docs.viam.com/components/movement-sensor/). diff --git a/lib/src/components/movement_sensor/service.dart b/lib/src/components/movement_sensor/service.dart index d4446f1b4b8..acaaaafcc38 100644 --- a/lib/src/components/movement_sensor/service.dart +++ b/lib/src/components/movement_sensor/service.dart @@ -6,6 +6,7 @@ import '../../resource/manager.dart'; import '../../utils.dart'; import 'movement_sensor.dart'; +/// {@category Components} /// gRPC Service for a [MovementSensor] class MovementSensorService extends MovementSensorServiceBase { final ResourceManager _manager; diff --git a/lib/src/components/power_sensor/client.dart b/lib/src/components/power_sensor/client.dart index 736a5288e0f..80d4e7d3cc5 100644 --- a/lib/src/components/power_sensor/client.dart +++ b/lib/src/components/power_sensor/client.dart @@ -7,7 +7,7 @@ import '../../resource/base.dart'; import '../../utils.dart'; import 'power_sensor.dart'; -/// {@category Viam SDK} +/// {@category Components} /// gRPC client for the [PowerSensor] component. class PowerSensorClient extends PowerSensor implements ResourceRPCClient { @override diff --git a/lib/src/components/power_sensor/power_sensor.dart b/lib/src/components/power_sensor/power_sensor.dart index 8c509aa6ea4..85c54f0c923 100644 --- a/lib/src/components/power_sensor/power_sensor.dart +++ b/lib/src/components/power_sensor/power_sensor.dart @@ -9,7 +9,7 @@ typedef Voltage = GetVoltageResponse; /// {@category Viam SDK} typedef Current = GetCurrentResponse; -/// {@category Viam SDK} +/// {@category Components} /// PowerSensor reports information about voltage, current, and power. /// /// For more information, see [Power Sensor component](https://docs.viam.com/components/power-sensor/). diff --git a/lib/src/components/power_sensor/service.dart b/lib/src/components/power_sensor/service.dart index 7e0f0342164..fc1f89620da 100644 --- a/lib/src/components/power_sensor/service.dart +++ b/lib/src/components/power_sensor/service.dart @@ -6,6 +6,7 @@ import '../../resource/manager.dart'; import '../../utils.dart'; import 'power_sensor.dart'; +/// {@category Components} /// gRPC Service for a [PowerSensor] class PowerSensorService extends PowerSensorServiceBase { final ResourceManager _manager; diff --git a/lib/src/components/sensor/client.dart b/lib/src/components/sensor/client.dart index 27d6867b75a..55662f57451 100644 --- a/lib/src/components/sensor/client.dart +++ b/lib/src/components/sensor/client.dart @@ -7,7 +7,7 @@ import '../../resource/base.dart'; import '../../utils.dart'; import 'sensor.dart'; -/// {@category Viam SDK} +/// {@category Components} /// gRPC client for the [Sensor] component. class SensorClient extends Sensor implements ResourceRPCClient { @override diff --git a/lib/src/components/sensor/sensor.dart b/lib/src/components/sensor/sensor.dart index 27044d06598..c33887fd9ba 100644 --- a/lib/src/components/sensor/sensor.dart +++ b/lib/src/components/sensor/sensor.dart @@ -2,8 +2,7 @@ import '../../gen/common/v1/common.pb.dart'; import '../../resource/base.dart'; import '../../robot/client.dart'; -/// {@category Viam SDK} - +/// {@category Components} /// Sensor represents a physical sensing device that can provide measurement readings. /// /// For more information, see [Sensor component](https://docs.viam.com/components/sensor/). diff --git a/lib/src/components/sensor/service.dart b/lib/src/components/sensor/service.dart index ff601aa6cb7..0ff67ce9774 100644 --- a/lib/src/components/sensor/service.dart +++ b/lib/src/components/sensor/service.dart @@ -6,6 +6,7 @@ import '../../resource/manager.dart'; import '../../utils.dart'; import 'sensor.dart'; +/// {@category Components} /// gRPC Service for a generic [Sensor] class SensorService extends SensorServiceBase { final ResourceManager _manager; diff --git a/lib/src/components/servo/client.dart b/lib/src/components/servo/client.dart index bb99a0213bc..f481cc68bc9 100644 --- a/lib/src/components/servo/client.dart +++ b/lib/src/components/servo/client.dart @@ -7,8 +7,7 @@ import '../../resource/base.dart'; import '../../utils.dart'; import 'servo.dart'; -/// {@category Viam SDK} - +/// {@category Components} /// gRPC client for the [Servo] component. class ServoClient extends Servo implements ResourceRPCClient { @override diff --git a/lib/src/components/servo/service.dart b/lib/src/components/servo/service.dart index 9450d573384..b465c88f0b6 100644 --- a/lib/src/components/servo/service.dart +++ b/lib/src/components/servo/service.dart @@ -6,6 +6,7 @@ import '../../resource/manager.dart'; import '../../utils.dart'; import 'servo.dart'; +/// {@category Components} /// gRPC Service for a [Servo] class ServoService extends ServoServiceBase { final ResourceManager _manager; diff --git a/lib/src/components/servo/servo.dart b/lib/src/components/servo/servo.dart index e79f3f8eed3..a5ddc434e61 100644 --- a/lib/src/components/servo/servo.dart +++ b/lib/src/components/servo/servo.dart @@ -2,7 +2,7 @@ import '../../gen/common/v1/common.pb.dart'; import '../../resource/base.dart'; import '../../robot/client.dart'; -/// {@category Viam SDK} +/// {@category Components} /// Servo represents a physical servo. /// /// For more information, see [Servo component](https://docs.viam.com/components/servo/). diff --git a/lib/src/services/vision.dart b/lib/src/services/vision.dart index 8b710f4b66c..35bce85abf9 100644 --- a/lib/src/services/vision.dart +++ b/lib/src/services/vision.dart @@ -8,7 +8,7 @@ import '../resource/base.dart'; import '../robot/client.dart'; import '../utils.dart'; -/// {@category Viam SDK} +/// {@category Services} class VisionClient extends Resource implements ResourceRPCClient { static const Subtype subtype = Subtype(resourceNamespaceRDK, resourceTypeService, 'vision'); diff --git a/lib/viam_sdk.dart b/lib/viam_sdk.dart index b8a9962bb0e..2bc954fe5a7 100644 --- a/lib/viam_sdk.dart +++ b/lib/viam_sdk.dart @@ -1,4 +1,5 @@ /// Robots at your fingertips. +/// {@category Viam SDK} library viam_sdk; /// App Clients diff --git a/tool/export_protos.dart b/tool/export_protos.dart index 77e6005604a..36947b5a5ca 100644 --- a/tool/export_protos.dart +++ b/tool/export_protos.dart @@ -75,9 +75,14 @@ Future _populateExports(Map> dirStructure) async { final file = File('$_newProtoPath${entry.key}${Platform.pathSeparator}${fEntry.key}.dart'); await file.create(recursive: true); final writer = file.openWrite(mode: FileMode.writeOnlyAppend); + String category = 'Protobuf Definitions'; + if (fEntry.key == 'common') { + category = 'Common'; + } + writer.writeAll([ '/// The proto definitions for ${fEntry.key}', - '/// {@category Protobuf Definitions}', + '/// {@category $category}', 'library viam_protos.${entry.key}.${fEntry.key};\n', '// THIS FILE IS AUTOMATICALLY GENERATED', '// DO NOT OVERWRITE\n',