![]() |
BioImager
4.9.0
A .NET microscopy imaging application based on Bio library. Supports various microscopes by using imported libraries & GUI automation. Supports XInput game controllers to move stage, take images, run ImageJ macros on images or Bio C# scripts.
|
Public Member Functions | |
| __init__ (self, **kwargs) | |
Static Public Member Functions | |
| lock_comms (func) | |
Public Attributes | |
| connection = None | |
Protected Member Functions | |
| bytes | _readline (self) |
| int | _write (self, bytes command) |
Protected Attributes | |
| _comms_lock = threading.RLock() | |
Mixin for devices that are controlled via serial. DEPRECATED: turns out that this was a bad idea. A device that has a serial connection is not a serial connection. The "has a" and the not "is a" should have told us that we should have been using composition instead of subclassing, but there you go. Currently handles the flushing and locking of the comms channel until a command has finished, and the passthrough to the serial channel.
| microscope.abc.SerialDeviceMixin.__init__ | ( | self, | |
| ** | kwargs ) |
Definition at line 1007 of file abc.py.
|
protected |
Read a line from connection without leading and trailing whitespace.
Reimplemented in microscope.lights.obis.ObisLaser.
Definition at line 1016 of file abc.py.
|
protected |
Send a command to the device. This is not a simple passthrough to ``serial.Serial.write``, it will append ``b'\\r\\n'`` to command. Override this method if a device requires a specific format.
Reimplemented in microscope.lights.deepstar.DeepstarLaser, microscope.lights.obis.ObisLaser, and microscope.lights.sapphire.SapphireLaser.
Definition at line 1020 of file abc.py.
|
static |
Decorator to flush input buffer and lock communications. There have been problems with the DeepStar lasers returning junk characters after the expected response, so it is advisable to flush the input buffer prior to running a command and subsequent readline. It also locks the comms channel so that a function must finish all its communications before another can run.
Definition at line 1030 of file abc.py.
|
protected |