Skip to content

controller_device

plantimager.commons.controller_device Link

ControllerDevice Link

ControllerDevice()

Bases: ABC

Abstract class for controller device.

Source code in plantimager/commons/controller_device.py
19
20
def __init__(self):
    pass

camera_names abstractmethod Link

camera_names()

Return the list of camera names.

Source code in plantimager/commons/controller_device.py
65
66
67
68
69
@RPCProperty(notify=cameraNamesChanged)
@abstractmethod
def camera_names(self) -> list[str]:
    """Return the list of camera names."""
    pass

max_progress abstractmethod Link

max_progress()

Return the maximum progress of the scan.

Source code in plantimager/commons/controller_device.py
53
54
55
56
57
@RPCProperty(notify=maxProgressChanged)
@abstractmethod
def max_progress(self) -> int:
    """Return the maximum progress of the scan."""
    pass

progress abstractmethod Link

progress()

Return the current progress of the scan.

Source code in plantimager/commons/controller_device.py
47
48
49
50
51
@RPCProperty(notify=progressChanged)
@abstractmethod
def progress(self) -> int:
    """Return the current progress of the scan."""
    pass

ready_to_scan abstractmethod Link

ready_to_scan()

Return whether the controller is ready to start a scan.

Source code in plantimager/commons/controller_device.py
59
60
61
62
63
@RPCProperty(notify=readyToScanChanged)
@abstractmethod
def ready_to_scan(self) -> bool:
    """Return whether the controller is ready to start a scan."""
    pass

run_scan abstractmethod Link

run_scan()

Start the scan.

Source code in plantimager/commons/controller_device.py
42
43
44
45
@abstractmethod
def run_scan(self):
    """Start the scan."""
    pass

set_api_token abstractmethod Link

set_api_token(token)

Set the session token to use for authenticated requests.

Source code in plantimager/commons/controller_device.py
37
38
39
40
@abstractmethod
def set_api_token(self, token: str):
    """Set the session token to use for authenticated requests."""
    pass

set_config abstractmethod Link

set_config(config)

Send a configuration dictionary to the controller.

Source code in plantimager/commons/controller_device.py
27
28
29
30
@abstractmethod
def set_config(self, config: dict):
    """Send a configuration dictionary to the controller."""
    pass

set_dataset_name abstractmethod Link

set_dataset_name(name)

Set the name of the dataset to be created.

Source code in plantimager/commons/controller_device.py
32
33
34
35
@abstractmethod
def set_dataset_name(self, name: str):
    """Set the name of the dataset to be created."""
    pass

set_db_url abstractmethod Link

set_db_url(url)

Set the database URL for the controller.

Source code in plantimager/commons/controller_device.py
22
23
24
25
@abstractmethod
def set_db_url(self, url: str):
    """Set the database URL for the controller."""
    pass