Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bliss
python-handel
Commits
5cdd3daf
Commit
5cdd3daf
authored
Aug 30, 2017
by
Vincent Michel
Browse files
Update channel interface
parent
acf27edf
Pipeline
#905
passed with stages
in 1 minute and 26 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
handel/interface.py
View file @
5cdd3daf
...
...
@@ -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);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment