-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Capabilities interface #113
Changes from 28 commits
394f482
0f40e26
7ccb9c3
459aea8
8dbfa74
8fddb9f
e43b8eb
62ba589
11247d7
317d52b
874bf9b
fefd5fc
6452f8b
dd26856
79f117c
67b0205
8cd2e2a
e096742
637e80f
8d919d8
72ae5e9
b3c90dd
9b88453
22e1119
b0265bb
63ebfae
0920d5d
1c102ee
8fe4c0a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ imgui.ini | |
Testing | ||
*.zarr | ||
*.tif | ||
*.bin | ||
*.json | ||
Cargo.lock | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,19 @@ class Camera: | |
def __init__(self, *args: None, **kwargs: Any) -> None: ... | ||
def dict(self) -> Dict[str, Any]: ... | ||
|
||
@final | ||
class CameraCapabilities: | ||
exposure_time_us: Property | ||
line_interval_us: Property | ||
readout_direction: Property | ||
binning: Property | ||
offset: OffsetShapeCapabilities | ||
shape: OffsetShapeCapabilities | ||
supported_pixel_types: List[SampleType] | ||
digital_lines: DigitalLineCapabilities | ||
triggers: TriggerCapabilities | ||
def dict(self) -> Dict[str, Any]: ... | ||
|
||
@final | ||
class CameraProperties: | ||
exposure_time_us: float | ||
|
@@ -39,6 +52,27 @@ class CameraProperties: | |
def __init__(self, *args: None, **kwargs: Any) -> None: ... | ||
def dict(self) -> Dict[str, Any]: ... | ||
|
||
@final | ||
class Capabilities: | ||
video: Tuple[VideoStreamCapabilities, VideoStreamCapabilities] | ||
def __init__(self, *args: None, **kwargs: Any) -> None: ... | ||
def dict(self) -> Dict[str, Any]: ... | ||
|
||
@final | ||
class ChunkingShardingDims: | ||
width: int | ||
height: int | ||
planes: int | ||
def dict(self) -> Dict[str, Any]: ... | ||
|
||
@final | ||
class ChunkingShardingCapabilities: | ||
is_supported: bool | ||
width: Property | ||
height: Property | ||
planes: Property | ||
def dict(self) -> Dict[str, Any]: ... | ||
|
||
@final | ||
class DeviceIdentifier: | ||
id: Tuple[int, int] | ||
|
@@ -100,6 +134,12 @@ class DeviceState: | |
def __lt__(self, other: object) -> bool: ... | ||
def __ne__(self, other: object) -> bool: ... | ||
|
||
@final | ||
class DigitalLineCapabilities: | ||
line_count: int | ||
names: Tuple[str, str, str, str, str, str, str, str] | ||
def dict(self) -> Dict[str, Any]: ... | ||
|
||
@final | ||
class Direction: | ||
Backward: ClassVar[Direction] = Direction.Backward | ||
|
@@ -119,6 +159,17 @@ class InputTriggers: | |
frame_start: Trigger | ||
def dict(self) -> Dict[str, Any]: ... | ||
|
||
@final | ||
class MultiscaleCapabilities: | ||
is_supported: bool | ||
def dict(self) -> Dict[str, Any]: ... | ||
|
||
@final | ||
class OffsetShapeCapabilities: | ||
x: Property | ||
y: Property | ||
def dict(self) -> Dict[str, Any]: ... | ||
|
||
@final | ||
class OutputTriggers: | ||
exposure: Trigger | ||
|
@@ -134,6 +185,29 @@ class PID: | |
def __init__(self, *args: None, **kwargs: Any) -> None: ... | ||
def dict(self) -> Dict[str, Any]: ... | ||
|
||
@final | ||
class Property: | ||
writable: bool | ||
low: float | ||
high: float | ||
kind: PropertyType | ||
def __init__(self, *args: None, **kwargs: Any) -> None: ... | ||
def dict(self) -> Dict[str, Any]: ... | ||
|
||
@final | ||
class PropertyType: | ||
FixedPrecision: ClassVar[PropertyType] = PropertyType.FixedPrecision | ||
FloatingPrecision: ClassVar[PropertyType] = PropertyType.FloatingPrecision | ||
Enum: ClassVar[PropertyType] = PropertyType.Enum | ||
String: ClassVar[PropertyType] = PropertyType.String | ||
def __eq__(self, other: object) -> bool: ... | ||
def __ge__(self, other: object) -> bool: ... | ||
def __gt__(self, other: object) -> bool: ... | ||
def __int__(self) -> int: ... | ||
def __le__(self, other: object) -> bool: ... | ||
def __lt__(self, other: object) -> bool: ... | ||
def __ne__(self, other: object) -> bool: ... | ||
|
||
@final | ||
class Properties: | ||
video: Tuple[VideoStream, VideoStream] | ||
|
@@ -146,6 +220,7 @@ class Runtime: | |
def device_manager(self) -> DeviceManager: ... | ||
def get_available_data(self, stream_id: int) -> AvailableData: ... | ||
def get_configuration(self) -> Properties: ... | ||
def get_capabilities(self) -> Capabilities: ... | ||
def get_state(self) -> DeviceState: ... | ||
def set_configuration(self, properties: Properties) -> Properties: ... | ||
def start(self) -> None: ... | ||
|
@@ -209,10 +284,10 @@ class Storage: | |
def dict(self) -> Dict[str, Any]: ... | ||
|
||
@final | ||
class ChunkingShardingDims: | ||
width: int | ||
height: int | ||
planes: int | ||
class StorageCapabilities: | ||
chunk_dims_px: ChunkingShardingCapabilities | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: I don't love the name of the type here because it's long and includes two needs (that are the same right now, but might diverge in the future?). Is it worth using the same underlying private definition, but defining separately named classes for Similar comment for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. I like the idea of exposing |
||
shard_dims_chunks: ChunkingShardingCapabilities | ||
multiscale: MultiscaleCapabilities | ||
def dict(self) -> Dict[str, Any]: ... | ||
|
||
@final | ||
|
@@ -235,6 +310,13 @@ class Trigger: | |
def __init__(self, *args: None, **kwargs: Any) -> None: ... | ||
def dict(self) -> Dict[str, Any]: ... | ||
|
||
@final | ||
class TriggerCapabilities: | ||
acquisition_start: TriggerInputOutputCapabilities | ||
exposure: TriggerInputOutputCapabilities | ||
frame_start: TriggerInputOutputCapabilities | ||
def dict(self) -> Dict[str, Any]: ... | ||
|
||
@final | ||
class TriggerEdge: | ||
Falling: ClassVar[TriggerEdge] = TriggerEdge.Falling | ||
|
@@ -251,6 +333,12 @@ class TriggerEdge: | |
def __lt__(self, other: object) -> bool: ... | ||
def __ne__(self, other: object) -> bool: ... | ||
|
||
@final | ||
class TriggerInputOutputCapabilities: | ||
input: int | ||
output: int | ||
def dict(self) -> Dict[str, Any]: ... | ||
|
||
@final | ||
class VideoFrame: | ||
def data(self) -> NDArray[Any]: ... | ||
|
@@ -276,6 +364,14 @@ class VideoStream: | |
frame_average_count: int | ||
def dict(self) -> Dict[str, Any]: ... | ||
|
||
@final | ||
class VideoStreamCapabilities: | ||
camera: CameraCapabilities | ||
storage: StorageCapabilities | ||
max_frame_count: Property | ||
frame_average_count: Property | ||
def dict(self) -> Dict[str, Any]: ... | ||
|
||
@final | ||
class VoltageRange: | ||
mn: float | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where's the bin coming from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Writing out a raw file in one of the tests.