Commit 5cdd3daf authored by Vincent Michel's avatar Vincent Michel

Update channel interface

parent acf27edf
Pipeline #905 passed with stages
in 1 minute and 26 seconds
......@@ -20,6 +20,7 @@ __all__ = ['init', 'init_handel', 'exit',
'set_log_output', 'set_log_level', 'close_log',
'get_num_modules', 'get_modules', 'get_module_from_channel',
'get_module_type', 'get_module_interface',
'get_module_channels', 'get_grouped_channels', 'get_channels',
'set_acquisition_value', 'get_acquisition_value',
'remove_acquisition_value', 'apply_acquisition_values',
'get_handel_version']
......@@ -291,16 +292,21 @@ def get_module_channel_at(alias, index):
def get_module_channels(alias):
"""Return the module channels properly indexed."""
number_of_channels = get_module_number_of_channels(alias)
return tuple(
get_module_channel_at(alias, index)
for index in range(number_of_channels))
return tuple(get_module_channel_at(alias, index)
for index in range(number_of_channels))
def get_all_channels():
def get_grouped_channels():
"""Return the indexed channels grouped by modules."""
return tuple(get_module_channels(alias) for alias in get_modules())
def get_channels():
"""Return all the enabled channels."""
return sorted(channel for channels in get_grouped_channels()
for channel in channels if channel != -1)
# Not exposed
# int xiaNewModule(char *alias);
......
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