navigate Logo

Getting Started

  • Quick Start Guide
  • Software Installation
  • I Want To…

User Guide

  • Supported Hardware
  • Supported File Formats
  • User Interface Walkthrough
  • Setting Up A Microscope
  • Acquiring Data
  • Case Studies

Development

  • Contributing Guidelines
  • Developer Install
  • Software Architecture
  • Feature Container
  • REST-API
  • Plugin Architecture

Troubleshooting & Known Issues

  • Troubleshooting
  • Known Issues

Plugins

  • navigate Plugin Template
  • navigate Confocal Projection
  • navigate at Scale
  • navigate Constant Velocity Acquisition
  • navigate MMCore
  • navigate ilastik Server
  • navigate Photoactivation

Reference

  • Implemented Microscopes
  • Software API
    • navigate.config
    • navigate.controller
    • navigate.log_files
    • navigate.model
      • navigate.model.analysis
      • navigate.model.concurrency
      • navigate.model.data_sources
      • navigate.model.device_startup_functions
        • navigate.model.device_startup_functions.auto_redial
        • navigate.model.device_startup_functions.device_not_found
        • navigate.model.device_startup_functions.load_devices
        • navigate.model.device_startup_functions.start_daq
        • navigate.model.device_startup_functions.start_device
        • navigate.model.device_startup_functions.DummyDeviceConnection
        • navigate.model.device_startup_functions.IntegratedDeviceFactory
        • navigate.model.device_startup_functions.SequenceDeviceFactory
        • navigate.model.device_startup_functions.SerialConnectionFactory
      • navigate.model.devices
      • navigate.model.features
      • navigate.model.metadata_sources
      • navigate.model.microscope
      • navigate.model.model
      • navigate.model.plugins_model
      • navigate.model.waveforms
    • navigate.tools
    • navigate.view
navigate
  • Software API
  • navigate.model
  • navigate.model.device_startup_functions
  • navigate.model.device_startup_functions.auto_redial
  • View page source

navigate.model.device_startup_functions.auto_redial

navigate.model.device_startup_functions.auto_redial(func: ~typing.Callable[[...], ~typing.Any], args: ~typing.Tuple[~typing.Any, ...], n_tries: int = 10, exception: ~typing.Type[Exception] = <class 'Exception'>, **kwargs: ~typing.Any) → Any

Retries connections to a startup device defined by func for a specified number of attempts.

This function attempts to execute the connection function func up to n_tries times. If an exception occurs, it retries the connection after a brief pause, logging each failure. If the connection partially succeeds, it cleans up any objects before retrying.

Parameters:
  • func (Callable[..., Any]) – The function or class (__init__() method) that connects to a device.

  • args (Tuple[Any, ...]) – Positional arguments to pass to the func.

  • n_tries (int) – The number of attempts to retry the connection. Default is 10.

  • exception (Type[Exception]) – The exception type to catch and handle during connection attempts. Default is Exception.

  • **kwargs (Any) – Additional keyword arguments passed to func.

Returns:

The result of the successful execution of func.

Return type:

Any

Raises:

exception – If all connection attempts fail, the specified exception is raised.

Previous Next

© Copyright 2025, Dean Lab, UT Southwestern Medical Center.