nimi-python
nimi-python copied to clipboard
Repeated capabilities "tip" is not useful to mere mortals
Whenever there is a method/property that supports repeated capabilities we add the following text to the documentation:
This property can use repeated capabilities. If set or get directly on the nidigital.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an niscope.Session repeated capabilities container, and calling set/get value on the result.
This method requires repeated capabilities. If called directly on the niscope.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an niscope.Session repeated capabilities container, and calling this method on the result.
- We don't say which repeated capability (
channels
?instruments
?script_triggers
?sites
?) applies - We don't give usage example
@marcoskirsch is #1610 not sufficient to address this?
It seems to me like it addressed the 2 concerns you mentioned for attributes and methods. The examples given leave the iterable to the user's imagination, but an example is provided.
This property can be set/get on specific channels or pins within your nidigital.Session instance. Use Python index notation on the repeated capabilities container channels or pins to specify a subset.
Example: my_session.channels[ ... ].active_load_ioh
To set/get on all channels or pins, you can call the property directly on the nidigital.Session.
Example: my_session.active_load_ioh
This method can be called on specific channels within your niscope.Session instance. Use Python index notation on the repeated capabilities container channels to specify a subset, and then call this method on the result.
Example: my_session.channels[ ... ].add_waveform_processing()
To call the method on all channels, you can call it directly on the niscope.Session.
Example: my_session.add_waveform_processing()