Skip to content

Commit

Permalink
Add demo of grouping Attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
GDYendell committed Jan 18, 2024
1 parent 5a33ac4 commit ef13f4e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/demo_fast_cs/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async def update(


class TempController(Controller):
ramp_rate = AttrRW(Float(), handler=TempControllerHandler("R"))
ramp_rate = AttrRW(Float(), handler=TempControllerHandler("R"), group="Config")

def __init__(self, settings: TempControllerSettings) -> None:
super().__init__()
Expand Down Expand Up @@ -80,12 +80,12 @@ async def close(self) -> None:


class TempRampController(SubController):
start = AttrRW(Int(), handler=TempControllerHandler("S"))
end = AttrRW(Int(), handler=TempControllerHandler("E"))
current = AttrR(Float(prec=3), handler=TempControllerHandler("T"))
start = AttrRW(Int(), handler=TempControllerHandler("S"), group="Config")
end = AttrRW(Int(), handler=TempControllerHandler("E"), group="Config")
current = AttrR(Float(prec=3), handler=TempControllerHandler("T"), group="Status")
enabled = AttrRW(Bool(znam="Off", onam="On"), handler=TempControllerHandler("N"))

def __init__(self, index: int, conn: IPConnection) -> None:
self.suffix = f"{index:02d}"
super().__init__(f"ramp{self.suffix}")
super().__init__(f"Ramp{self.suffix}")
self.conn = conn

0 comments on commit ef13f4e

Please sign in to comment.