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.
Loading...
Searching...
No Matches
microscope.controllers.zaber._ZaberLEDController Class Reference
Inheritance diagram for microscope.controllers.zaber._ZaberLEDController:
microscope.abc.Controller microscope.abc.Device

Public Member Functions

None __init__ (self, _ZaberConnection conn, int device_address, **kwargs)
 
typing.Dict[str, _ZaberLEDdevices (self)
 
- Public Member Functions inherited from microscope.abc.Controller
- Public Member Functions inherited from microscope.abc.Device
None __del__ (self)
 
bool get_is_enabled (self)
 
None disable (self)
 
None enable (self)
 
None initialize (self)
 
None shutdown (self)
 
None add_setting (self, name, dtype, get_func, set_func, values, typing.Optional[typing.Callable[[], bool]] readonly=None)
 
 get_setting (self, str name)
 
 get_all_settings (self)
 
None set_setting (self, str name, value)
 
 describe_setting (self, str name)
 
 describe_settings (self)
 
 update_settings (self, incoming, bool init=False)
 

Protected Attributes

 _dev_conn = _ZaberDeviceConnection(conn, device_address)
 
dict _leds = {}
 
- Protected Attributes inherited from microscope.abc.Device
dict _settings = {}
 

Additional Inherited Members

- Public Attributes inherited from microscope.abc.Device
bool enabled = False
 
- Protected Member Functions inherited from microscope.abc.Controller
None _do_shutdown (self)
 
- Protected Member Functions inherited from microscope.abc.Device
 _do_disable (self)
 
 _do_enable (self)
 

Detailed Description

This effectively means a Zaber X-LCA4 LED controller.

The X-LCA4 series is so far the only LED controller Zaber has.
Its documentation is not included on the ASCII protocol manual,
see the `controller specific manual online
<https://www.zaber.com/protocol-manual?device=X-LCA4>`_

Definition at line 479 of file zaber.py.

Constructor & Destructor Documentation

◆ __init__()

None microscope.controllers.zaber._ZaberLEDController.__init__ ( self,
_ZaberConnection conn,
int device_address,
** kwargs )

Reimplemented from microscope.abc.Device.

Definition at line 489 of file zaber.py.

491 ) -> None:
492 super().__init__(**kwargs)
493 self._dev_conn = _ZaberDeviceConnection(conn, device_address)
494 self._leds: typing.Dict[str, _ZaberLED] = {}
495
496 all_lamps = self._dev_conn.command(b"get lamp.status").response.split()
497 # We get one status per peripheral connection. Documentation
498 # states that a value of "0" means unplugged but with X-LCA4,
499 # firmware version 7.13 and build 8074, we get NA for
500 # unplugged. Also not sure how 0 (unplugged) would differ
501 # from 5 (peripheral not connected). So we count as valid
502 # those with status 1 (turned off), 2 (turned on), and 3
503 # (fault).
504 for i, lamp_state in enumerate(all_lamps, start=1):
505 if lamp_state in [b"1", b"2", b"3"]:
506 # The labels on the controller are LED1, LED2, etc, so
507 # use the same for key.
508 self._leds["LED%d" % i] = _ZaberLED(self._dev_conn, i)
509 else:
510 _logger.info("no LED %d, status is %s", i, lamp_state.decode())
511

Member Function Documentation

◆ devices()

typing.Dict[str, _ZaberLED] microscope.controllers.zaber._ZaberLEDController.devices ( self)
Map of names to the controlled devices.

Reimplemented from microscope.abc.Controller.

Definition at line 513 of file zaber.py.

513 def devices(self) -> typing.Dict[str, _ZaberLED]:
514 return self._leds
515
516

Member Data Documentation

◆ _dev_conn

microscope.controllers.zaber._ZaberLEDController._dev_conn = _ZaberDeviceConnection(conn, device_address)
protected

Definition at line 493 of file zaber.py.

◆ _leds

dict microscope.controllers.zaber._ZaberLEDController._leds = {}
protected

Definition at line 494 of file zaber.py.


The documentation for this class was generated from the following file: