doCommand method

  1. @override
Future<Map<String, dynamic>> doCommand(
  1. Map<String, dynamic> command
)
override

Send/Receive arbitrary commands to the Resource

// Example using doCommand with an arm component
const command = {'cmd': 'test', 'data1': 500};
var result = myArm.doCommand(command);

Implementation

@override
Future<Map<String, dynamic>> doCommand(Map<String, dynamic> command) async {
  final request = common.DoCommandRequest()
    ..name = name
    ..command = command.toStruct();
  final response = await client.doCommand(request);
  return response.result.toMap();
}