BioImager  3.9.1
A .NET microscopy imaging library. Supports various microscopes by using imported libraries & GUI automation. Supported libraries include PriorĀ® & ZeissĀ® & all devices supported by Micromanager 2.0 and python-microscope.
Loading...
Searching...
No Matches
microscope.testsuite.devices.TestFloatingDevice Class Reference
Inheritance diagram for microscope.testsuite.devices.TestFloatingDevice:
microscope.abc.FloatingDeviceMixin microscope.abc.Device

Public Member Functions

None __init__ (self, str uid, **kwargs)
 
None initialize (self)
 
int get_index (self)
 
str get_id (self)
 
None __init__ (self, int index, **kwargs)
 
str get_id (self)
 
- Public Member Functions inherited from microscope.abc.Device
None __init__ (self)
 
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)
 
def get_setting (self, str name)
 
def get_all_settings (self)
 
None set_setting (self, str name, value)
 
def describe_setting (self, str name)
 
def describe_settings (self)
 
def update_settings (self, incoming, bool init=False)
 

Additional Inherited Members

- Public Attributes inherited from microscope.abc.Device
 enabled
 

Detailed Description

Simple device with a UID after having been initialized.

Floating devices are devices where we can't specify which one to
get, we can only construct it and after initialisation check its
UID.  In this class for test units we can check which UID to get.

Definition at line 213 of file devices.py.

Constructor & Destructor Documentation

◆ __init__()

None microscope.testsuite.devices.TestFloatingDevice.__init__ (   self,
str  uid,
**  kwargs 
)

Reimplemented from microscope.abc.FloatingDeviceMixin.

Definition at line 224 of file devices.py.

224 def __init__(self, uid: str, **kwargs) -> None:
225 super().__init__(**kwargs)
226 self._initialized = False
227 self._uid = uid
228 self.initialize()
229

Member Function Documentation

◆ get_id()

str microscope.testsuite.devices.TestFloatingDevice.get_id (   self)
Return a unique hardware identifier such as a serial number.

Reimplemented from microscope.abc.FloatingDeviceMixin.

Definition at line 238 of file devices.py.

238 def get_id(self) -> str:
239 if self._initialized:
240 return self._uid
241 else:
243 "uid is not available until after initialisation"
244 )
245

References microscope.testsuite.devices.TestFloatingDevice._initialized, and microscope.testsuite.devices.TestFloatingDevice._uid.

Referenced by microscope.cameras.atmcd.AndorAtmcd.initialize().

◆ get_index()

int microscope.testsuite.devices.TestFloatingDevice.get_index (   self)
Expose private _index for testing purposes.

Definition at line 234 of file devices.py.

234 def get_index(self) -> int:
235 """Expose private _index for testing purposes."""
236 return self._index
237

References microscope.abc.FloatingDeviceMixin._index.

◆ initialize()

None microscope.testsuite.devices.TestFloatingDevice.initialize (   self)
Initialize the device.

If devices have this method (not required, and many don't),
then they should call it as part of the initialisation, i.e.,
they should call it on their `__init__` method.

Reimplemented from microscope.abc.Device.

Definition at line 230 of file devices.py.

230 def initialize(self) -> None:
231 super().initialize()
232 self._initialized = True
233

References microscope.testsuite.devices.TestFloatingDevice._initialized.

Referenced by microscope.cameras.picam.PiCamera.__init__(), microscope.cameras.ximea.XimeaCamera.__init__(), and microscope.cameras.picam.PiCamera.initialize().


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