pcdshub / pcdshub/pcdsdaq

Inspect plan and select daq mode in daq_wrapper

Open
#7 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
0
Forks
9
Avg merge
7d 6h
Merged PRs (30d)
1

Description

Expected Behavior

It may be possible to infer from a plan whether to run the daq in on, manual, or auto mode.

Possible Solution

from collections import defaultdict

def select_mode(messages):
    counts = defaultdict(lambda: 0)
    for msg in messages:
        counts[msg.cmd] += 1
    if counts['kickoff'] > 1:
        return 'manual'
    elif counts['read'] > 0:
        return 'auto'
    else:
        return 'on'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating daq_wrapper and the code that represents or inspects DAQ plans and their messages. Use the proposed select_mode behavior as the starting point; done means plans select on, manual, or auto mode according to their kickoff and read commands, with appropriate tests added or updated if the project has them.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.