API referenceVetraGlove ProPython

Capture interaction

Capture & calibration

Current version · 2.0.0

Returned by device.capture_control() for externally controlled capture. Request and stage identifiers must come from the latest capture progress.

CaptureControl.confirm()

Confirm the current request so capture can continue.

Type

CaptureControl.confirm(request_id: str) -> None

Parameters

  • request_id: required; a non-empty identifier from the latest progress or session snapshot.

Returns

None.

Details

  • Call conditions: After the external interaction receives the current request.

Errors

  • Empty, expired or not-applicable-to-the-current-state requests.

Example

Obtain control from device.capture_control(). Run this in external mode after the user approves the prompt, and track handled requests to avoid duplicate confirmation.

from qnbot_sdk.glove import CaptureStageState

sample = device.capture_progress().latest()
if sample is not None:
    stage = sample.value.stage
    if (stage.state is CaptureStageState.AWAITING_CONFIRMATION
            and stage.request_id is not None):
        control.confirm(stage.request_id)

Complete example: external_input_run_background.py.

See also

CaptureControl.skip()

Skip the current capture stage when skipping is allowed.

Type

CaptureControl.skip(request_id: str) -> None

Parameters

  • request_id: required; a non-empty identifier from the latest progress or session snapshot.

Returns

None.

Details

  • Call conditions: After the external interaction receives the current request.

Errors

  • Empty, expired or not-applicable-to-the-current-state requests.

See also

CaptureControl.retry()

Retry the specified capture stage.

Type

CaptureControl.retry(stage_id: str) -> None

Parameters

  • stage_id: required; a non-empty identifier from the latest progress or session snapshot.

Returns

None.

Details

  • Call conditions: When the external interaction needs to retry a stage.

Errors

  • Empty, unknown or currently non-retryable stages.

See also

CaptureControl.cancel()

Cancel externally controlled capture using the current request identifier.

Type

CaptureControl.cancel(request_id: str) -> None

Parameters

  • request_id: required; a non-empty identifier from the latest progress or session snapshot.

Returns

None.

Details

  • Call conditions: After the external interaction receives the current request.

Errors

  • Empty, expired or not-applicable-to-the-current-state requests.

See also