File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import '../../protos/common/common.dart';
4
4
import '../gen/common/v1/common.pb.dart' ;
5
5
import '../gen/service/generic/v1/generic.pbgrpc.dart' as generic_pb;
6
6
import '../resource/base.dart' ;
7
+ import '../robot/client.dart' ;
7
8
import '../utils.dart' ;
8
9
9
10
/// {@category Services}
@@ -29,4 +30,14 @@ class GenericServiceClient extends Resource with RPCDebugLoggerMixin implements
29
30
final response = await client.doCommand (request, options: callOptions);
30
31
return response.result.toMap ();
31
32
}
33
+
34
+ /// Get the [ResourceName] for this [GenericServiceClient] with the given [name]
35
+ static ResourceName getResourceName (String name) {
36
+ return GenericServiceClient .subtype.getResourceName (name);
37
+ }
38
+
39
+ /// Get the [GenericServiceClient] named [name] from the provided robot.
40
+ static GenericServiceClient fromRobot (RobotClient robot, String name) {
41
+ return robot.getResource (GenericServiceClient .getResourceName (name));
42
+ }
32
43
}
You can’t perform that action at this time.
0 commit comments