Commit beb5dc45 authored by Vincent Michel's avatar Vincent Michel

Add get_module_channels

parent 8ed85241
Pipeline #903 passed with stages
in 1 minute and 27 seconds
......@@ -279,6 +279,21 @@ def get_module_number_of_channels(alias):
return value[0]
def get_module_channel_at(alias, index):
alias = to_bytes(alias)
value = ffi.new('int *')
key = b'channel%d_alias' % index
code = handel.xiaGetModuleItem(alias, key, value)
check_error(code)
return value[0]
def get_module_channels(alias):
number_of_channels = get_module_number_of_channels(alias)
return [get_module_channel_at(alias, index)
for index in range(number_of_channels)]
# 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