getPlan method

Future<MotionPlan> getPlan(
  1. String componentName, {
  2. bool? lastPlanOnly,
  3. String? executionId,
  4. Map<String, dynamic>? extra,
})

Get the plan and status of the most recent execution for the component named componentName, along with the replan history of that execution. Pass an executionId to look up a specific execution rather than the most recent one, and set lastPlanOnly to true to omit the replan history.

// Example:
final plan = await myMotionService.getPlan('myBase');

For more information, see the motion service docs.

Implementation

Future<MotionPlan> getPlan(
  String componentName, {
  bool? lastPlanOnly,
  String? executionId,
  Map<String, dynamic>? extra,
}) async {
  final request = GetPlanRequest(
    name: name,
    componentName: componentName,
    lastPlanOnly: lastPlanOnly,
    executionId: executionId,
    extra: extra?.toStruct(),
  );
  return await client.getPlan(request, options: callOptions);
}