navigate Logo

Getting Started

  • Computer Considerations
  • Computer Power Configuration
  • Software Installation
  • Launching Navigate
  • Configuring Navigate
  • Acquiring Data
  • Smart Acquisition Routines

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
  • Developer Architecture Concepts
  • Feature Container
  • REST API
  • Plugin Architecture
  • Adding New Hardware

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.controller.configurator
    • navigate.log_files
    • navigate.model
      • navigate.model.analysis
      • navigate.model.concurrency
      • navigate.model.data_sources
      • navigate.model.device_startup_functions
      • navigate.model.devices
        • navigate.model.devices.MonitoredSerial
        • navigate.model.devices.camera
        • navigate.model.devices.configuration_schema
        • navigate.model.devices.daq
        • navigate.model.devices.device_types
        • navigate.model.devices.filter_wheel
        • navigate.model.devices.galvo
        • navigate.model.devices.laser
        • navigate.model.devices.mirror
        • navigate.model.devices.objectives
        • navigate.model.devices.pump
        • navigate.model.devices.remote_focus
        • navigate.model.devices.shutter
        • navigate.model.devices.stage
        • navigate.model.devices.zoom
      • navigate.model.features
      • navigate.model.metadata_sources
      • navigate.model.microscope
      • navigate.model.model
      • navigate.model.plugins_model
      • navigate.model.resolution_change
      • navigate.model.waveforms
    • navigate.tools
    • navigate.view
navigate
  • Software API
  • navigate.model
  • navigate.model.devices
  • navigate.model.devices.MonitoredSerial
  • View page source

navigate.model.devices.MonitoredSerial

class navigate.model.devices.MonitoredSerial(*args, **kwargs)

Bases: Serial

MonitoredSerial - Serial class that logs read/write events.

__init__(*args, **kwargs)

Initialize comm port object. If a “port” is given, then the port will be opened immediately. Otherwise a Serial port object in closed state is returned.

Methods

__init__(*args, **kwargs)

Initialize comm port object.

log_event(payload, duration_ns)

Log the read/write event with performance data.

read([size])

Read bytes from the serial port and log the event.

readline([size])

Read a line from the serial port and log the event.

write(data)

Write data to the serial port and log the event.

Attributes

  • BAUDRATES

  • BAUDRATE_CONSTANTS

  • BYTESIZES

  • PARITIES

  • STOPBITS

  • closed

log_event(payload: bytes, duration_ns: int) → None

Log the read/write event with performance data.

Parameters:
  • payload (bytes) – The data that was read or written.

  • duration_ns (int) – The duration of the read/write operation in nanoseconds.

read(size=1) → bytes

Read bytes from the serial port and log the event.

Parameters:

size (int, optional) – The number of bytes to read, by default 1.

Returns:

The bytes read from the serial port.

Return type:

bytes

readline(size: Optional[int] = -1, /) → bytes

Read a line from the serial port and log the event.

Parameters:

size (int, optional) – The maximum number of bytes to read, by default -1 (read until timeout).

Returns:

The line read from the serial port.

Return type:

bytes

write(data: bytes)

Write data to the serial port and log the event.

Parameters:

data (bytes) – Data to be written to the serial port.

BAUDRATES = (50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, 500000, 576000, 921600, 1000000, 1152000, 1500000, 2000000, 2500000, 3000000, 3500000, 4000000)
BAUDRATE_CONSTANTS = {0: 0, 50: 1, 75: 2, 110: 3, 134: 4, 150: 5, 200: 6, 300: 7, 600: 8, 1200: 9, 1800: 10, 2400: 11, 4800: 12, 9600: 13, 19200: 14, 38400: 15, 57600: 4097, 115200: 4098, 230400: 4099, 460800: 4100, 500000: 4101, 576000: 4102, 921600: 4103, 1000000: 4104, 1152000: 4105, 1500000: 4106, 2000000: 4107, 2500000: 4108, 3000000: 4109, 3500000: 4110, 4000000: 4111}
BYTESIZES = (5, 6, 7, 8)
PARITIES = ('N', 'E', 'O', 'M', 'S')
STOPBITS = (1, 1.5, 2)
closed
Previous Next

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