Commit 67da624c authored by Vincent Michel's avatar Vincent Michel

Add get_trigger_channels to API

parent ff329ed5
Pipeline #1236 passed with stages
in 1 minute and 25 seconds
......@@ -194,7 +194,7 @@ def get_module_statistics(module):
# Parse raw data
return {channel: stats_from_normal_mode(array[index * 9:])
for index, channel in enumerate(channels)
if channel != -1}
if channel >= 0}
def get_statistics():
......@@ -538,7 +538,7 @@ def get_channels():
channel
for channels in get_grouped_channels()
for channel in channels
if channel != -1))
if channel >= 0))
def get_master_channels():
......@@ -548,6 +548,14 @@ def get_master_channels():
for groups in get_grouped_channels())
def get_trigger_channels():
"""Return the list of channels that can be used
as gate master or sync master."""
return tuple(
groups[0]
for groups in get_grouped_channels()
if groups and groups[0] >= 0)
# Not exposed
# int xiaNewModule(char *alias);
......
......@@ -934,6 +934,13 @@ def test_get_master_channels(interface):
m.assert_called_once_with()
def test_get_trigger_channels(interface):
with mock.patch('handel.interface.get_grouped_channels') as m:
m.return_value = [(0, 1, 2, 3), (-1, 5, 6, 7)]
assert interface.get_trigger_channels() == (0,)
m.assert_called_once_with()
# Parameters
def test_get_acquistion_value(interface):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment