Skip to content

Commit

Permalink
add module models
Browse files Browse the repository at this point in the history
  • Loading branch information
martha-johnston committed Jan 2, 2025
1 parent d20195c commit ca1dfb3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/src/robot/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -349,4 +349,14 @@ class RobotClient {
final response = await _client.discoverComponents(request);
return response.discovery.map((d) => Discovery.fromProto(d)).toList();
}

/// GetModelsFromModules returns the list of models supported in modules on the machine.
///
/// ```
/// var modelsFromModules = await machine.getModelsFromModules();
/// ```
Future<List<ModuleModel>> getModelsFromModules() async {
final response = await _client.getModelsFromModules(request);
return response.model.map((d) => ModuleModel.fromProto(d)).toList();
}
}

0 comments on commit ca1dfb3

Please sign in to comment.