Skip to content

Commit 913a385

Browse files
Add string enums for applicable attributes and method parameters in nirfsg (#2150)
* adding back string enums in src * added all changes after integration * changed to properties Co-authored-by: Jay Fitzgerald <[email protected]> * sorted changelog --------- Co-authored-by: Jay Fitzgerald <[email protected]>
1 parent ee4860e commit 913a385

File tree

10 files changed

+788
-76
lines changed

10 files changed

+788
-76
lines changed

CHANGELOG.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,17 +1691,25 @@
16911691
#### [nirfsg] Unreleased
16921692
- Added
16931693
- Changed
1694-
- Fixed the return type of `get_all_script_names` and `get_all_named_waveform_names` to remove the size parameter and return a list of strings instead of a comma-separated string
1694+
- Added default value for `module` parameter in `get_self_cal_last_date_and_time` and `get_self_calibration_temperature` methods to align with documentation and allow duck-typing
16951695
- Changed the parameter name for waveform name from `name` to `waveform_name` in `clear_arb_waveform` and `select_arb_waveform` to be consistent with other waveform methods
16961696
- Changed the name of below methods to be consistent with other APIs in the repository
16971697
- `get_self_calibration_last_date_and_time` to `get_self_cal_last_date_and_time`
16981698
- `get_external_calibration_last_date_and_time` to `get_ext_cal_last_date_and_time`
1699-
- Added default value for `module` parameter in `get_self_cal_last_date_and_time` and `get_self_calibration_temperature` methods to align with documentation and allow duck-typing
1700-
- Updated `self_test` to not have any parameters, aligning with other APIs in the repository
17011699
- Changed `frequency_settling` property to be of type float instead of hightime.timedelta, since it can have multiple interpretation based on `frequency_settling_units` property value
17021700
- Changed `interpolation_delay` and `relative_delay` properties to be of type hightime.timedelta, so that it aligns with _delay_ attributes across other APIs in the repository
1703-
- Updated `wait_until_settled` method to have `max_time_milliseconds` parameter as type hightime.timedelta with a default value of 10 seconds
17041701
- Changed `exported_ref_clock_rate` and `ref_clock_rate` properties to be of type float instead of enum, since the enums just represented raw float values
1702+
- Fixed the return type of `get_all_script_names` and `get_all_named_waveform_names` to remove the size parameter and return a list of strings instead of a comma-separated string
1703+
- Updated `self_test` to not have any parameters, aligning with other APIs in the repository
1704+
- Updated `wait_until_settled` method to have `max_time_milliseconds` parameter as type hightime.timedelta with a default value of 10 seconds
1705+
- Updated below properties and method parameters to be of string enum type instead of plain string, since they would support only fixed set of strings
1706+
- `pulse_modulation_source`
1707+
- `exported_pulse_modulation_event_output_terminal`
1708+
- `exported_ref_clock_output_terminal`
1709+
- `lo_source`
1710+
- `arb_sample_clock_source`
1711+
- `ref_clock_source`
1712+
- `trigger_identifier` parameter in `send_software_edge_trigger` method
17051713
- Removed
17061714
- Methods and properties applicable only to hardware which are not supported anymore
17071715
- Methods

docs/nirfsg/class.rst

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -2310,7 +2310,7 @@ send_software_edge_trigger
23102310
.. note:: One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
23112311

23122312

2313-
:type trigger_identifier: str
2313+
:type trigger_identifier: :py:data:`nirfsg.TriggerIdentifier`
23142314

23152315
set_arb_waveform_next_write_position
23162316
------------------------------------
@@ -3460,15 +3460,15 @@ arb_sample_clock_source
34603460

34613461
The following table lists the characteristics of this property.
34623462

3463-
+-----------------------+------------+
3464-
| Characteristic | Value |
3465-
+=======================+============+
3466-
| Datatype | str |
3467-
+-----------------------+------------+
3468-
| Permissions | read-write |
3469-
+-----------------------+------------+
3470-
| Repeated Capabilities | None |
3471-
+-----------------------+------------+
3463+
+-----------------------+----------------------------+
3464+
| Characteristic | Value |
3465+
+=======================+============================+
3466+
| Datatype | enums.ArbSampleClockSource |
3467+
+-----------------------+----------------------------+
3468+
| Permissions | read-write |
3469+
+-----------------------+----------------------------+
3470+
| Repeated Capabilities | None |
3471+
+-----------------------+----------------------------+
34723472

34733473
.. tip::
34743474
This property corresponds to the following LabVIEW Property or C Attribute:
@@ -5243,15 +5243,15 @@ exported_pulse_modulation_event_output_terminal
52435243

52445244
The following table lists the characteristics of this property.
52455245

5246-
+-----------------------+------------+
5247-
| Characteristic | Value |
5248-
+=======================+============+
5249-
| Datatype | str |
5250-
+-----------------------+------------+
5251-
| Permissions | read-write |
5252-
+-----------------------+------------+
5253-
| Repeated Capabilities | None |
5254-
+-----------------------+------------+
5246+
+-----------------------+-------------------------------------+
5247+
| Characteristic | Value |
5248+
+=======================+=====================================+
5249+
| Datatype | enums.PulseModulationOutputTerminal |
5250+
+-----------------------+-------------------------------------+
5251+
| Permissions | read-write |
5252+
+-----------------------+-------------------------------------+
5253+
| Repeated Capabilities | None |
5254+
+-----------------------+-------------------------------------+
52555255

52565256
.. tip::
52575257
This property corresponds to the following LabVIEW Property or C Attribute:
@@ -5302,15 +5302,15 @@ exported_ref_clock_output_terminal
53025302

53035303
The following table lists the characteristics of this property.
53045304

5305-
+-----------------------+------------+
5306-
| Characteristic | Value |
5307-
+=======================+============+
5308-
| Datatype | str |
5309-
+-----------------------+------------+
5310-
| Permissions | read-write |
5311-
+-----------------------+------------+
5312-
| Repeated Capabilities | None |
5313-
+-----------------------+------------+
5305+
+-----------------------+------------------------------------------+
5306+
| Characteristic | Value |
5307+
+=======================+==========================================+
5308+
| Datatype | enums.ReferenceClockExportOutputTerminal |
5309+
+-----------------------+------------------------------------------+
5310+
| Permissions | read-write |
5311+
+-----------------------+------------------------------------------+
5312+
| Repeated Capabilities | None |
5313+
+-----------------------+------------------------------------------+
53145314

53155315
.. tip::
53165316
This property corresponds to the following LabVIEW Property or C Attribute:
@@ -7604,15 +7604,15 @@ lo_source
76047604

76057605
The following table lists the characteristics of this property.
76067606

7607-
+-----------------------+------------+
7608-
| Characteristic | Value |
7609-
+=======================+============+
7610-
| Datatype | str |
7611-
+-----------------------+------------+
7612-
| Permissions | read-write |
7613-
+-----------------------+------------+
7614-
| Repeated Capabilities | los |
7615-
+-----------------------+------------+
7607+
+-----------------------+----------------+
7608+
| Characteristic | Value |
7609+
+=======================+================+
7610+
| Datatype | enums.LoSource |
7611+
+-----------------------+----------------+
7612+
| Permissions | read-write |
7613+
+-----------------------+----------------+
7614+
| Repeated Capabilities | los |
7615+
+-----------------------+----------------+
76167616

76177617
.. tip::
76187618
This property corresponds to the following LabVIEW Property or C Attribute:
@@ -8638,15 +8638,15 @@ pulse_modulation_source
86388638

86398639
The following table lists the characteristics of this property.
86408640

8641-
+-----------------------+------------+
8642-
| Characteristic | Value |
8643-
+=======================+============+
8644-
| Datatype | str |
8645-
+-----------------------+------------+
8646-
| Permissions | read-write |
8647-
+-----------------------+------------+
8648-
| Repeated Capabilities | None |
8649-
+-----------------------+------------+
8641+
+-----------------------+-----------------------------+
8642+
| Characteristic | Value |
8643+
+=======================+=============================+
8644+
| Datatype | enums.PulseModulationSource |
8645+
+-----------------------+-----------------------------+
8646+
| Permissions | read-write |
8647+
+-----------------------+-----------------------------+
8648+
| Repeated Capabilities | None |
8649+
+-----------------------+-----------------------------+
86508650

86518651
.. tip::
86528652
This property corresponds to the following LabVIEW Property or C Attribute:
@@ -8760,15 +8760,15 @@ ref_clock_source
87608760

87618761
The following table lists the characteristics of this property.
87628762

8763-
+-----------------------+------------+
8764-
| Characteristic | Value |
8765-
+=======================+============+
8766-
| Datatype | str |
8767-
+-----------------------+------------+
8768-
| Permissions | read-write |
8769-
+-----------------------+------------+
8770-
| Repeated Capabilities | None |
8771-
+-----------------------+------------+
8763+
+-----------------------+----------------------------+
8764+
| Characteristic | Value |
8765+
+=======================+============================+
8766+
| Datatype | enums.ReferenceClockSource |
8767+
+-----------------------+----------------------------+
8768+
| Permissions | read-write |
8769+
+-----------------------+----------------------------+
8770+
| Repeated Capabilities | None |
8771+
+-----------------------+----------------------------+
87728772

87738773
.. tip::
87748774
This property corresponds to the following LabVIEW Property or C Attribute:

0 commit comments

Comments
 (0)