fastcs-pandablocks 0.2.0a3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fastcs_pandablocks/__init__.py +3 -0
- fastcs_pandablocks/__main__.py +9 -0
- fastcs_pandablocks/_version.py +34 -0
- fastcs_pandablocks/panda/__init__.py +0 -0
- fastcs_pandablocks/panda/blocks/__init__.py +4 -0
- fastcs_pandablocks/panda/blocks/block_controller.py +48 -0
- fastcs_pandablocks/panda/blocks/blocks.py +1034 -0
- fastcs_pandablocks/panda/blocks/data.py +625 -0
- fastcs_pandablocks/panda/blocks/versions.py +69 -0
- fastcs_pandablocks/panda/client_wrapper.py +143 -0
- fastcs_pandablocks/panda/controller.yaml +10 -0
- fastcs_pandablocks/panda/io/arm.py +37 -0
- fastcs_pandablocks/panda/io/bits.py +43 -0
- fastcs_pandablocks/panda/io/default.py +36 -0
- fastcs_pandablocks/panda/io/table.py +38 -0
- fastcs_pandablocks/panda/io/units.py +49 -0
- fastcs_pandablocks/panda/panda_controller.py +125 -0
- fastcs_pandablocks/panda/utils.py +52 -0
- fastcs_pandablocks/types/__init__.py +34 -0
- fastcs_pandablocks/types/_annotations.py +42 -0
- fastcs_pandablocks/types/_string_types.py +117 -0
- fastcs_pandablocks-0.2.0a3.dist-info/METADATA +264 -0
- fastcs_pandablocks-0.2.0a3.dist-info/RECORD +27 -0
- fastcs_pandablocks-0.2.0a3.dist-info/WHEEL +5 -0
- fastcs_pandablocks-0.2.0a3.dist-info/entry_points.txt +2 -0
- fastcs_pandablocks-0.2.0a3.dist-info/licenses/LICENSE +201 -0
- fastcs_pandablocks-0.2.0a3.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# file generated by setuptools-scm
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
|
|
4
|
+
__all__ = [
|
|
5
|
+
"__version__",
|
|
6
|
+
"__version_tuple__",
|
|
7
|
+
"version",
|
|
8
|
+
"version_tuple",
|
|
9
|
+
"__commit_id__",
|
|
10
|
+
"commit_id",
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
TYPE_CHECKING = False
|
|
14
|
+
if TYPE_CHECKING:
|
|
15
|
+
from typing import Tuple
|
|
16
|
+
from typing import Union
|
|
17
|
+
|
|
18
|
+
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
19
|
+
COMMIT_ID = Union[str, None]
|
|
20
|
+
else:
|
|
21
|
+
VERSION_TUPLE = object
|
|
22
|
+
COMMIT_ID = object
|
|
23
|
+
|
|
24
|
+
version: str
|
|
25
|
+
__version__: str
|
|
26
|
+
__version_tuple__: VERSION_TUPLE
|
|
27
|
+
version_tuple: VERSION_TUPLE
|
|
28
|
+
commit_id: COMMIT_ID
|
|
29
|
+
__commit_id__: COMMIT_ID
|
|
30
|
+
|
|
31
|
+
__version__ = version = '0.2.0a3'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 2, 0, 'a3')
|
|
33
|
+
|
|
34
|
+
__commit_id__ = commit_id = None
|
|
File without changes
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
from collections.abc import Callable, Coroutine
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
from fastcs.attributes import Attribute, AttrR
|
|
5
|
+
from fastcs.controllers import Controller, ControllerVector
|
|
6
|
+
from fastcs.datatypes import DataType, String
|
|
7
|
+
|
|
8
|
+
from fastcs_pandablocks.types import PandaName
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class BlockControllerVector(ControllerVector):
|
|
12
|
+
"""Vector containing numbered panda blocks."""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class BlockController(Controller):
|
|
16
|
+
"""Controller for handling a panda block."""
|
|
17
|
+
|
|
18
|
+
def __init__(
|
|
19
|
+
self,
|
|
20
|
+
panda_name: PandaName,
|
|
21
|
+
put_value_to_panda: Callable[
|
|
22
|
+
[PandaName, DataType, Any], Coroutine[None, None, None]
|
|
23
|
+
],
|
|
24
|
+
label: str | None = None,
|
|
25
|
+
ios: list | None = None,
|
|
26
|
+
):
|
|
27
|
+
self.description = label
|
|
28
|
+
self.panda_name = panda_name
|
|
29
|
+
self.put_value_to_panda = put_value_to_panda
|
|
30
|
+
|
|
31
|
+
self.panda_name_to_attribute: dict[PandaName, Attribute] = {}
|
|
32
|
+
|
|
33
|
+
super().__init__(ios=ios)
|
|
34
|
+
|
|
35
|
+
async def initialise(self):
|
|
36
|
+
if self.description is not None:
|
|
37
|
+
self.add_attribute(
|
|
38
|
+
PandaName("LABEL"),
|
|
39
|
+
AttrR(
|
|
40
|
+
String(),
|
|
41
|
+
description="Label from metadata.",
|
|
42
|
+
initial_value=self.description,
|
|
43
|
+
),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
def add_attribute(self, name: PandaName, attr: Attribute) -> None:
|
|
47
|
+
self.panda_name_to_attribute[name] = attr
|
|
48
|
+
super().add_attribute(name.attribute_name, attr)
|