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.clients.Client Class Reference
Inheritance diagram for microscope.clients.Client:
microscope.clients.DataClient

Public Member Functions

 __init__ (self, url)
 

Public Attributes

list _proxy
 

Protected Member Functions

 _connect (self)
 

Protected Attributes

 _url = url
 
 _proxy = None
 

Detailed Description

Base Client object that makes methods on proxy available locally.

Definition at line 39 of file clients.py.

Constructor & Destructor Documentation

◆ __init__()

microscope.clients.Client.__init__ ( self,
url )

Definition at line 42 of file clients.py.

42 def __init__(self, url):
43 self._url = url
44 self._proxy = None
45 self._connect()
46

Member Function Documentation

◆ _connect()

microscope.clients.Client._connect ( self)
protected
Connect to a proxy and set up self passthrough to proxy methods.

Definition at line 47 of file clients.py.

47 def _connect(self):
48 """Connect to a proxy and set up self passthrough to proxy methods."""
49 self._proxy = Pyro4.Proxy(self._url)
50 self._proxy._pyroGetMetadata()
51
52 # Derived classes may over-ride some methods. Leave these alone.
53 my_methods = [
54 m[0] for m in inspect.getmembers(self, predicate=inspect.ismethod)
55 ]
56 methods = set(self._proxy._pyroMethods).difference(my_methods)
57 # But in the case of propertyes, we need to inspect the class.
58 my_properties = [
59 m[0]
60 for m in inspect.getmembers(
61 self.__class__, predicate=inspect.isdatadescriptor
62 )
63 ]
64 properties = set(self._proxy._pyroAttrs).difference(my_properties)
65
66 for attr in itertools.chain(methods, properties):
67 setattr(self, attr, getattr(self._proxy, attr))
68
69

Member Data Documentation

◆ _proxy [1/2]

microscope.clients.Client._proxy = None
protected

Definition at line 44 of file clients.py.

◆ _proxy [2/2]

list microscope.clients.Client._proxy
Initial value:
= [
m[0] for m in inspect.getmembers(self, predicate=inspect.ismethod)
]

Definition at line 49 of file clients.py.

◆ _url

microscope.clients.Client._url = url
protected

Definition at line 43 of file clients.py.


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