Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ace4dd0
wip: replace fastcs datatype family with python primitives
coretl Sep 3, 2026
98dd7e0
chore: amend documentation, typing, and tests
shihab-dls Nov 2, 2026
0e77f5d
tests: output example ioc bob files into relative opis directory, and…
shihab-dls Nov 2, 2026
c06cfae
tests: provide test with narrower p4p value
shihab-dls Nov 2, 2026
20b8ccc
feat: add value alarms such that PVs go into alarms based on passed i…
shihab-dls Nov 4, 2026
cbab121
tests: add tests for alarms
shihab-dls Nov 4, 2026
d11dcee
docs: address doc errors comments
shihab-dls Nov 4, 2026
b2a52c2
fix: improve update_meta validation
shihab-dls Nov 4, 2026
08206db
fix: unset meta data on CA records
shihab-dls Nov 4, 2026
5d5b01e
tests: fix stale assertions in tests
shihab-dls Nov 4, 2026
a2a74c8
fix: clamp unset limit to high number if other limit is solely set
shihab-dls Nov 4, 2026
a716689
chore: use np function for int min and max
shihab-dls Nov 4, 2026
d6efa36
fix: skip tables in REST and Tango
shihab-dls Nov 10, 2026
23cba27
chore: remove unused arg from helper
shihab-dls Nov 10, 2026
e33c0cc
refactor: check source type castable before casting array value
shihab-dls Nov 10, 2026
6050ad9
fix: check that float limits not passed for int dtype
shihab-dls Nov 10, 2026
3f1767d
fix: only check control limits on write path
shihab-dls Nov 10, 2026
cf9a827
chore: check that low limit is lower than high limit
shihab-dls Nov 10, 2026
ecc093d
tests: add test for low limit being higher than high limit
shihab-dls Nov 10, 2026
db89d63
fix: allow uint to int conversion to prevent regression in main
shihab-dls Nov 11, 2026
863c141
port #451's getter setter work on top of the new python primtive data…
tomkane-dls Nov 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/*bob

# GUI files emitted by the example IOCs in tests/
/opis/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
3 changes: 1 addition & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,13 @@
("py:class", "p4p.nt.NTTable"),
# Problems in FastCS itself
("py:class", "BaseController"),
("py:class", "AttrIOUpdateCallback"),
("py:class", "fastcs.transports.epics.pva.pvi_tree._PviSignalInfo"),
("py:class", "fastcs.logging._logging.LogLevel"),
("py:class", "fastcs.logging._graylog.GraylogEndpoint"),
("py:class", "fastcs.logging._graylog.GraylogStaticFields"),
("py:class", "fastcs.logging._graylog.GraylogEnvFields"),
("py:obj", "fastcs.control_system.build_controller_api"),
("docutils", "fastcs.demo.controllers.TemperatureControllerSettings"),
("docutils", "fastcs.demo.temperature_attr.TemperatureControllerSettings"),
# TypeVar without docstrings still give warnings
("py:class", "strawberry.schema.schema.Schema"),
]
Expand Down
16 changes: 8 additions & 8 deletions docs/explanations/controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,21 @@ lifecycle, if required.
### Scan task behaviour

When used as the root controller, FastCS collects all `@scan` methods and readable
attributes with `update_period` set, across the whole controller hierarchy to be run as
background tasks by FastCS. Scan tasks are gated on the `_connected` flag: if a scan
attributes whose `getter` is wrapped in `Polled`, across the whole controller
hierarchy, to be run as background tasks by FastCS. Scan tasks are gated on the
`_connected` flag: if a scan
raises an exception, `_connected` is set to `False` and tasks pause until `reconnect`
sets it back to `True`.

```python
from fastcs.controllers import Controller
from fastcs.attributes import AttrR, AttrRW
from fastcs.datatypes import Float, String
from fastcs.methods import scan


class TemperatureController(Controller):
temperature = AttrR(Float(units="degC"))
setpoint = AttrRW(Float(units="degC"))
temperature = AttrR(float, units="degC")
setpoint = AttrRW(float, units="degC")

async def connect(self):
self._client = await DeviceClient.connect(self._host, self._port)
Expand Down Expand Up @@ -72,7 +72,7 @@ controller also has connection logic, the parent must invoke it explicitly:

```python
class ChannelController(Controller):
value = AttrR(Float())
value = AttrR(float)

async def connect(self):
...
Expand Down Expand Up @@ -107,7 +107,7 @@ from fastcs.controllers import Controller, ControllerVector


class ChannelController(Controller):
value = AttrR(Float())
value = AttrR(float)


class RootController(Controller):
Expand Down Expand Up @@ -154,7 +154,7 @@ distinct components with different types or roles.

`BaseController` is the common base class for both `Controller` and `ControllerVector`.
It handles the creation and validation of attributes, scan methods, command methods, and
sub controllers, including type hint introspection and IO connection.
sub controllers, including type hint introspection.

`BaseController` is public for use in **type hints only**. It should not be subclassed
directly when implementing a device driver. Use `Controller` or `ControllerVector`
Expand Down
Loading
Loading