Skip to content

Add Beamline State Machine and AggregatedState#831

Closed
cappel89 wants to merge 9 commits into
mainfrom
feat/add-bl-state-machine
Closed

Add Beamline State Machine and AggregatedState#831
cappel89 wants to merge 9 commits into
mainfrom
feat/add-bl-state-machine

Conversation

@cappel89
Copy link
Copy Markdown
Member

@cappel89 cappel89 commented Apr 23, 2026

Draft for AggregatedStates and state machine. To test, use a config like the following one:

alignment: # AggregatedStateConfig -> can have different labels and for each label, different devices
  transition_metadata: # optional field for metadata for each label
    field: value 
  devices:
    samx:
      value: 0
      abs_tol: 0.1
      low_limit:
        value: -20
        abs_tol: 0.1
      high_limit:
        value: 20
        abs_tol: 0.1
      signals:
        velocity:
          value: 5
          abs_tol: 0.1
    bpm4i:
      value: 100
      abs_tol: 10
measurement:
  devices:
    samx:
      value: 19
      abs_tol: 0.1
      signals:
        velocity:
          value: 20
    samy:
      value: 0
      abs_tol: 0.1
test:
  devices:
    samy:
      value: 0
      abs_tol: 0.1
    bpm4i:
      value: 100
      abs_tol: 10

Assuming this config is stored under state_config.yaml, you can now load it as follows

filename = "./state_config.yaml"
bec.state_machine.load_from_config(name="my_state", config_path=filename)

@cappel89 cappel89 self-assigned this Apr 23, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

❌ Patch coverage is 77.14286% with 48 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
bec_lib/bec_lib/bl_states.py 73.62% 35 Missing and 13 partials ⚠️

📢 Thoughts on this report? Let us know!

@cappel89 cappel89 force-pushed the feat/add-bl-state-machine branch from e19a10d to 67493d0 Compare April 24, 2026 08:01
@cappel89 cappel89 force-pushed the feat/add-bl-state-machine branch from 67493d0 to 2a377f5 Compare April 24, 2026 08:59
@cappel89
Copy link
Copy Markdown
Member Author

cappel89 commented May 4, 2026

closed in favor of #866

@cappel89 cappel89 closed this May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants