Skip to content

Commit ca1dfb3

Browse files
add module models
1 parent d20195c commit ca1dfb3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/src/robot/client.dart

+10
Original file line numberDiff line numberDiff line change
@@ -349,4 +349,14 @@ class RobotClient {
349349
final response = await _client.discoverComponents(request);
350350
return response.discovery.map((d) => Discovery.fromProto(d)).toList();
351351
}
352+
353+
/// GetModelsFromModules returns the list of models supported in modules on the machine.
354+
///
355+
/// ```
356+
/// var modelsFromModules = await machine.getModelsFromModules();
357+
/// ```
358+
Future<List<ModuleModel>> getModelsFromModules() async {
359+
final response = await _client.getModelsFromModules(request);
360+
return response.model.map((d) => ModuleModel.fromProto(d)).toList();
361+
}
352362
}

0 commit comments

Comments
 (0)