Skip to content

Commit 661c2f3

Browse files
authored
Add support for repeated capabilities on methods that support independent channels (#1589)
* added try/except for function not found * refined error message * add repeated capabilities * removed get_channel_names * fixed reference to create_advanced_sequence_step * added new error class;add function to catch errors * replaced fake function name fred * add unit test for library too old error * code cleanup Co-authored-by: Erik Crank <null>
1 parent f9979a7 commit 661c2f3

File tree

10 files changed

+1121
-924
lines changed

10 files changed

+1121
-924
lines changed

docs/nidcpower/class.rst

+68-8
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ abort
154154
.. note:: One or more of the referenced methods are not in the Python API for this driver.
155155
156156
157+
.. tip:: This method requires repeated capabilities. If called directly on the
158+
nidcpower.Session object, then the method will use all repeated capabilities in the session.
159+
You can specify a subset of repeated capabilities using the Python index notation on an
160+
nidcpower.Session repeated capabilities container, and calling this method on the result.
161+
157162
158163
clear_latched_output_cutoff_state
159164
---------------------------------
@@ -254,6 +259,11 @@ commit
254259
255260
256261
262+
.. tip:: This method requires repeated capabilities. If called directly on the
263+
nidcpower.Session object, then the method will use all repeated capabilities in the session.
264+
You can specify a subset of repeated capabilities using the Python index notation on an
265+
nidcpower.Session repeated capabilities container, and calling this method on the result.
266+
257267
258268
configure_aperture_time
259269
-----------------------
@@ -505,7 +515,7 @@ create_advanced_sequence_step
505515
506516
Creates a new advanced sequence step in the advanced sequence specified
507517
by the Active advanced sequence. When you create an advanced sequence
508-
step, each property you passed to the :py:meth:`nidcpower.Session._create_advanced_sequence`
518+
step, each property you passed to the :py:meth:`nidcpower.Session.create_advanced_sequence`
509519
method is reset to its default value for that step unless otherwise
510520
specified.
511521
@@ -524,7 +534,7 @@ create_advanced_sequence_step
524534
`Programming
525535
States <REPLACE_DRIVER_SPECIFIC_URL_1(programmingstates)>`__
526536
527-
:py:meth:`nidcpower.Session._create_advanced_sequence`
537+
:py:meth:`nidcpower.Session.create_advanced_sequence`
528538
529539
530540
@@ -534,6 +544,11 @@ create_advanced_sequence_step
534544
for more information about supported devices.
535545
536546
547+
.. tip:: This method requires repeated capabilities. If called directly on the
548+
nidcpower.Session object, then the method will use all repeated capabilities in the session.
549+
You can specify a subset of repeated capabilities using the Python index notation on an
550+
nidcpower.Session repeated capabilities container, and calling this method on the result.
551+
537552
538553
:param set_as_active_step:
539554
@@ -578,6 +593,11 @@ delete_advanced_sequence
578593
for more information about supported devices.
579594
580595
596+
.. tip:: This method requires repeated capabilities. If called directly on the
597+
nidcpower.Session object, then the method will use all repeated capabilities in the session.
598+
You can specify a subset of repeated capabilities using the Python index notation on an
599+
nidcpower.Session repeated capabilities container, and calling this method on the result.
600+
581601
582602
:param sequence_name:
583603
@@ -1126,6 +1146,11 @@ initiate
11261146
.. note:: This method will return a Python context manager that will initiate on entering and abort on exit.
11271147
11281148
1149+
.. tip:: This method requires repeated capabilities. If called directly on the
1150+
nidcpower.Session object, then the method will use all repeated capabilities in the session.
1151+
You can specify a subset of repeated capabilities using the Python index notation on an
1152+
nidcpower.Session repeated capabilities container, and calling this method on the result.
1153+
11291154
11301155
lock
11311156
----
@@ -1325,14 +1350,12 @@ query_latched_output_cutoff_state
13251350
.. py:method:: query_latched_output_cutoff_state(output_cutoff_reason)
13261351
13271352
Discovers if an output cutoff limit was exceeded for the specified reason. When an output cutoff is engaged, the output of the channel(s) is disconnected.
1328-
If a limit was exceeded, the state is latched until you clear it with the :py:meth:`nidcpower.Session.clear_latched_output_cutoff_state` method or the :py:meth:`nidcpower.Session.ResetWithChannels` method.
1353+
If a limit was exceeded, the state is latched until you clear it with the :py:meth:`nidcpower.Session.clear_latched_output_cutoff_state` method or the :py:meth:`nidcpower.Session.reset` method.
13291354
13301355
outputCutoffReason specifies the conditions for which an output is disconnected.
13311356
13321357
13331358
1334-
.. note:: One or more of the referenced methods are not in the Python API for this driver.
1335-
13361359
13371360
.. tip:: This method requires repeated capabilities. If called directly on the
13381361
nidcpower.Session object, then the method will use all repeated capabilities in the session.
@@ -1595,6 +1618,11 @@ reset
15951618
15961619
15971620
1621+
.. tip:: This method requires repeated capabilities. If called directly on the
1622+
nidcpower.Session object, then the method will use all repeated capabilities in the session.
1623+
You can specify a subset of repeated capabilities using the Python index notation on an
1624+
nidcpower.Session repeated capabilities container, and calling this method on the result.
1625+
15981626
15991627
reset_device
16001628
------------
@@ -1735,6 +1763,11 @@ send_software_edge_trigger
17351763
for more information about supported devices.
17361764
17371765
1766+
.. tip:: This method requires repeated capabilities. If called directly on the
1767+
nidcpower.Session object, then the method will use all repeated capabilities in the session.
1768+
You can specify a subset of repeated capabilities using the Python index notation on an
1769+
nidcpower.Session repeated capabilities container, and calling this method on the result.
1770+
17381771
17391772
:param trigger:
17401773
@@ -1860,6 +1893,11 @@ wait_for_event
18601893
for more information about supported devices.
18611894
18621895
1896+
.. tip:: This method requires repeated capabilities. If called directly on the
1897+
nidcpower.Session object, then the method will use all repeated capabilities in the session.
1898+
You can specify a subset of repeated capabilities using the Python index notation on an
1899+
nidcpower.Session repeated capabilities container, and calling this method on the result.
1900+
18631901
18641902
:param event_id:
18651903
@@ -3642,6 +3680,14 @@ instrument_manufacturer
36423680
36433681
Contains the name of the manufacturer for the device you are currently using.
36443682
3683+
3684+
3685+
3686+
.. tip:: This property can use repeated capabilities. If set or get directly on the
3687+
nidcpower.Session object, then the set/get will use all repeated capabilities in the session.
3688+
You can specify a subset of repeated capabilities using the Python index notation on an
3689+
nidcpower.Session repeated capabilities container, and calling set/get value on the result.
3690+
36453691
The following table lists the characteristics of this property.
36463692
36473693
+----------------+-----------+
@@ -3651,7 +3697,7 @@ instrument_manufacturer
36513697
+----------------+-----------+
36523698
| Permissions | read only |
36533699
+----------------+-----------+
3654-
| Channel Based | No |
3700+
| Channel Based | Yes |
36553701
+----------------+-----------+
36563702
| Resettable | No |
36573703
+----------------+-----------+
@@ -6652,6 +6698,12 @@ self_calibration_persistence
66526698
66536699
.. note:: This property is not supported by all devices. Refer to Supported Properties by Device for information
66546700
6701+
6702+
.. tip:: This property can use repeated capabilities. If set or get directly on the
6703+
nidcpower.Session object, then the set/get will use all repeated capabilities in the session.
6704+
You can specify a subset of repeated capabilities using the Python index notation on an
6705+
nidcpower.Session repeated capabilities container, and calling set/get value on the result.
6706+
66556707
The following table lists the characteristics of this property.
66566708
66576709
+----------------+----------------------------------+
@@ -6661,7 +6713,7 @@ self_calibration_persistence
66616713
+----------------+----------------------------------+
66626714
| Permissions | read-write |
66636715
+----------------+----------------------------------+
6664-
| Channel Based | No |
6716+
| Channel Based | Yes |
66656717
+----------------+----------------------------------+
66666718
| Resettable | No |
66676719
+----------------+----------------------------------+
@@ -7134,6 +7186,14 @@ serial_number
71347186
71357187
Contains the serial number for the device you are currently using.
71367188
7189+
7190+
7191+
7192+
.. tip:: This property can use repeated capabilities. If set or get directly on the
7193+
nidcpower.Session object, then the set/get will use all repeated capabilities in the session.
7194+
You can specify a subset of repeated capabilities using the Python index notation on an
7195+
nidcpower.Session repeated capabilities container, and calling set/get value on the result.
7196+
71377197
The following table lists the characteristics of this property.
71387198
71397199
+----------------+-----------+
@@ -7143,7 +7203,7 @@ serial_number
71437203
+----------------+-----------+
71447204
| Permissions | read only |
71457205
+----------------+-----------+
7146-
| Channel Based | No |
7206+
| Channel Based | Yes |
71477207
+----------------+-----------+
71487208
| Resettable | No |
71497209
+----------------+-----------+

0 commit comments

Comments
 (0)