Skip to content

Commit c79aaea

Browse files
authored
datatype updates to few nirfsg properties (#2147)
1 parent f78a798 commit c79aaea

File tree

7 files changed

+112
-253
lines changed

7 files changed

+112
-253
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1696,6 +1696,9 @@
16961696
- Changed the name of `get_self_calibration_last_date_and_time` to `get_self_cal_last_date_and_time` to be consistent with other MI drivers
16971697
- 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
16981698
- Updated `self_test` to not have any parameters, aligning with other MI drivers
1699+
- 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
1700+
- Changed `interpolation_delay` and `relative_delay` properties to be of type hightime.timedelta, so that it aligns with _delay_ attributes across all drivers
1701+
- 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
16991702
- Removed
17001703
- Methods and properties applicable only to hardware which are not supported anymore
17011704
- Methods

docs/nirfsg/class.rst

Lines changed: 65 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -5325,35 +5325,33 @@ exported_ref_clock_rate
53255325

53265326
Specifies the Reference Clock Rate, in Hz, of the signal sent to the Reference Clock Export Output Terminal. To set this property, the NI-RFSG device must be in the Configuration state.
53275327

5328-
**Default Value:** :py:data:`~nirfsg.ReferenceClockExportedRate.CLOCK_RATE_10_MEGAHERTZ`
5328+
**Default Value:** 10MHz
53295329

53305330
**Supported Devices:** PXIe-5820/5830/5831/5832/5840/5841/5842/5860
53315331

53325332
**Defined Values**:
53335333

5334-
+------------------------------------------------------------------------+--------------+-------------------------------------+
5335-
| Name | Value | Description |
5336-
+========================================================================+==============+=====================================+
5337-
| :py:data:`~nirfsg.ReferenceClockExportedRate.CLOCK_RATE_10_MEGAHERTZ` | 10000000.0 | Uses a 10MHz Reference Clock rate. |
5338-
+------------------------------------------------------------------------+--------------+-------------------------------------+
5339-
| :py:data:`~nirfsg.ReferenceClockExportedRate.CLOCK_RATE_100_MEGAHERTZ` | 100000000.0 | Uses a 100MHz Reference Clock rate. |
5340-
+------------------------------------------------------------------------+--------------+-------------------------------------+
5341-
| :py:data:`~nirfsg.ReferenceClockExportedRate.CLOCK_RATE_1_GIGAHERTZ` | 1000000000.0 | Uses a 1GHz Reference Clock rate. |
5342-
+------------------------------------------------------------------------+--------------+-------------------------------------+
5343-
5344-
.. 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.
5334+
+--------------+-------------------------------------+
5335+
| Value | Description |
5336+
+==============+=====================================+
5337+
| 10000000.0 | Uses a 10MHz Reference Clock rate. |
5338+
+--------------+-------------------------------------+
5339+
| 100000000.0 | Uses a 100MHz Reference Clock rate. |
5340+
+--------------+-------------------------------------+
5341+
| 1000000000.0 | Uses a 1GHz Reference Clock rate. |
5342+
+--------------+-------------------------------------+
53455343

53465344
The following table lists the characteristics of this property.
53475345

5348-
+-----------------------+----------------------------------+
5349-
| Characteristic | Value |
5350-
+=======================+==================================+
5351-
| Datatype | enums.ReferenceClockExportedRate |
5352-
+-----------------------+----------------------------------+
5353-
| Permissions | read-write |
5354-
+-----------------------+----------------------------------+
5355-
| Repeated Capabilities | None |
5356-
+-----------------------+----------------------------------+
5346+
+-----------------------+------------+
5347+
| Characteristic | Value |
5348+
+=======================+============+
5349+
| Datatype | float |
5350+
+-----------------------+------------+
5351+
| Permissions | read-write |
5352+
+-----------------------+------------+
5353+
| Repeated Capabilities | None |
5354+
+-----------------------+------------+
53575355

53585356
.. tip::
53595357
This property corresponds to the following LabVIEW Property or C Attribute:
@@ -5972,15 +5970,15 @@ frequency_settling
59725970

59735971
The following table lists the characteristics of this property.
59745972

5975-
+-----------------------+-------------------------------------------------------------+
5976-
| Characteristic | Value |
5977-
+=======================+=============================================================+
5978-
| Datatype | hightime.timedelta, datetime.timedelta, or float in seconds |
5979-
+-----------------------+-------------------------------------------------------------+
5980-
| Permissions | read-write |
5981-
+-----------------------+-------------------------------------------------------------+
5982-
| Repeated Capabilities | None |
5983-
+-----------------------+-------------------------------------------------------------+
5973+
+-----------------------+------------+
5974+
| Characteristic | Value |
5975+
+=======================+============+
5976+
| Datatype | float |
5977+
+-----------------------+------------+
5978+
| Permissions | read-write |
5979+
+-----------------------+------------+
5980+
| Repeated Capabilities | None |
5981+
+-----------------------+------------+
59845982

59855983
.. tip::
59865984
This property corresponds to the following LabVIEW Property or C Attribute:
@@ -6246,15 +6244,15 @@ interpolation_delay
62466244

62476245
The following table lists the characteristics of this property.
62486246

6249-
+-----------------------+------------+
6250-
| Characteristic | Value |
6251-
+=======================+============+
6252-
| Datatype | float |
6253-
+-----------------------+------------+
6254-
| Permissions | read-write |
6255-
+-----------------------+------------+
6256-
| Repeated Capabilities | None |
6257-
+-----------------------+------------+
6247+
+-----------------------+-------------------------------------------------------------+
6248+
| Characteristic | Value |
6249+
+=======================+=============================================================+
6250+
| Datatype | hightime.timedelta, datetime.timedelta, or float in seconds |
6251+
+-----------------------+-------------------------------------------------------------+
6252+
| Permissions | read-write |
6253+
+-----------------------+-------------------------------------------------------------+
6254+
| Repeated Capabilities | None |
6255+
+-----------------------+-------------------------------------------------------------+
62586256

62596257
.. tip::
62606258
This property corresponds to the following LabVIEW Property or C Attribute:
@@ -8665,11 +8663,11 @@ ref_clock_rate
86658663

86668664
To set this property, the NI-RFSG device must be in the Configuration state. If you are using the PXIe-5654/5654 with PXIe-5696, the NI-RFSG device must be in the Committed state to read this property. When you read this property, it returns the frequency the device is locked to during the Committed state.
86678665

8668-
If you set this property to :py:data:`~nirfsg.ReferenceClockRate.AUTO`, NI-RFSG uses the default Reference Clock rate for the device or automatically detects the Reference Clock rate if automatic detection is supported by the device.
8666+
If you set this property to Auto, NI-RFSG uses the default Reference Clock rate for the device or automatically detects the Reference Clock rate if automatic detection is supported by the device.
86698667

86708668
**Valid Values:**
86718669

8672-
PXIe-5654/5654 with PXIe-5696: Values between 1MHz to 20MHz in 1MHz steps are supported in addition to the :py:data:`~nirfsg.ReferenceClockRate.AUTO` and :py:data:`~nirfsg.ReferenceClockRate.CLOCK_RATE_10_MEGAHERTZ` values.
8670+
PXIe-5654/5654 with PXIe-5696: Values between 1MHz to 20MHz in 1MHz steps are supported in addition to the Auto and 10MHz values.
86738671

86748672
PXIe-5841 with PXIe-5655, PXIe-5842: 10 MHz, 100 MHz, 270 MHz, and 3.84 MHz
86758673

@@ -8681,7 +8679,7 @@ ref_clock_rate
86818679

86828680
**Units**: hertz (Hz)
86838681

8684-
**Default Value:** :py:data:`~nirfsg.ReferenceClockRate.AUTO`
8682+
**Default Value:** Auto
86858683

86868684
**Supported Devices:** PXI-5610, PXIe-5644/5645/5646, PXI/PXIe-5650/5651/5652, PXIe-5653/5654/5654 with PXIe-5696, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841/5842/5860
86878685

@@ -8695,29 +8693,27 @@ ref_clock_rate
86958693

86968694
**Defined Values**:
86978695

8698-
+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
8699-
| Value | Description |
8700-
+===============================================================+===================================================================================================================================+
8701-
| :py:data:`~nirfsg.ReferenceClockRate.AUTO` | Uses the default Reference Clock rate for the device or automatically detects the Reference Clock rate if the device supports it. |
8702-
+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
8703-
| :py:data:`~nirfsg.ReferenceClockRate.CLOCK_RATE_10_MEGAHERTZ` | Uses a 10 MHz Reference Clock rate. |
8704-
+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
8696+
+-------+------------+-----------------------------------------------------------------------------------------------------------------------------------+
8697+
| Name | Value | Description |
8698+
+=======+============+===================================================================================================================================+
8699+
| Auto | -1.0 | Uses the default Reference Clock rate for the device or automatically detects the Reference Clock rate if the device supports it. |
8700+
+-------+------------+-----------------------------------------------------------------------------------------------------------------------------------+
8701+
| 10MHz | 10000000.0 | Uses a 10 MHz Reference Clock rate. |
8702+
+-------+------------+-----------------------------------------------------------------------------------------------------------------------------------+
87058703

87068704
.. note:: Automatic detection of the Reference Clock rate is supported on only the PXIe-5654/5654 with PXIe-5696. For all other supported devices, NI-RFSG uses the default Reference Clock rate of 10MHz.
87078705

8708-
.. 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.
8709-
87108706
The following table lists the characteristics of this property.
87118707

8712-
+-----------------------+--------------------------+
8713-
| Characteristic | Value |
8714-
+=======================+==========================+
8715-
| Datatype | enums.ReferenceClockRate |
8716-
+-----------------------+--------------------------+
8717-
| Permissions | read-write |
8718-
+-----------------------+--------------------------+
8719-
| Repeated Capabilities | None |
8720-
+-----------------------+--------------------------+
8708+
+-----------------------+------------+
8709+
| Characteristic | Value |
8710+
+=======================+============+
8711+
| Datatype | float |
8712+
+-----------------------+------------+
8713+
| Permissions | read-write |
8714+
+-----------------------+------------+
8715+
| Repeated Capabilities | None |
8716+
+-----------------------+------------+
87218717

87228718
.. tip::
87238719
This property corresponds to the following LabVIEW Property or C Attribute:
@@ -8860,15 +8856,15 @@ relative_delay
88608856

88618857
The following table lists the characteristics of this property.
88628858

8863-
+-----------------------+------------+
8864-
| Characteristic | Value |
8865-
+=======================+============+
8866-
| Datatype | float |
8867-
+-----------------------+------------+
8868-
| Permissions | read-write |
8869-
+-----------------------+------------+
8870-
| Repeated Capabilities | None |
8871-
+-----------------------+------------+
8859+
+-----------------------+-------------------------------------------------------------+
8860+
| Characteristic | Value |
8861+
+=======================+=============================================================+
8862+
| Datatype | hightime.timedelta, datetime.timedelta, or float in seconds |
8863+
+-----------------------+-------------------------------------------------------------+
8864+
| Permissions | read-write |
8865+
+-----------------------+-------------------------------------------------------------+
8866+
| Repeated Capabilities | None |
8867+
+-----------------------+-------------------------------------------------------------+
88728868

88738869
.. tip::
88748870
This property corresponds to the following LabVIEW Property or C Attribute:

docs/nirfsg/enums.rst

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,66 +1036,6 @@ RFInLoExportEnabled
10361036

10371037

10381038

1039-
ReferenceClockExportedRate
1040-
--------------------------
1041-
1042-
.. py:class:: ReferenceClockExportedRate
1043-
1044-
.. py:attribute:: ReferenceClockExportedRate.CLOCK_RATE_10_MEGAHERTZ
1045-
1046-
1047-
1048-
Uses a 10MHz Reference Clock rate.
1049-
1050-
1051-
1052-
1053-
1054-
.. py:attribute:: ReferenceClockExportedRate.CLOCK_RATE_100_MEGAHERTZ
1055-
1056-
1057-
1058-
Uses a 100MHz Reference Clock rate.
1059-
1060-
1061-
1062-
1063-
1064-
.. py:attribute:: ReferenceClockExportedRate.CLOCK_RATE_1_GIGAHERTZ
1065-
1066-
1067-
1068-
Uses a 1GHz Reference Clock rate.
1069-
1070-
1071-
1072-
1073-
1074-
ReferenceClockRate
1075-
------------------
1076-
1077-
.. py:class:: ReferenceClockRate
1078-
1079-
.. py:attribute:: ReferenceClockRate.AUTO
1080-
1081-
1082-
1083-
Uses the default Reference Clock rate for the device or automatically detects the Reference Clock rate if the device supports it.
1084-
1085-
1086-
1087-
1088-
1089-
.. py:attribute:: ReferenceClockRate.CLOCK_RATE_10_MEGAHERTZ
1090-
1091-
1092-
1093-
Uses a 10MHz Reference Clock rate.
1094-
1095-
1096-
1097-
1098-
10991039
ReferencePllBandwidth
11001040
---------------------
11011041

generated/nirfsg/nirfsg/enums.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -451,32 +451,6 @@ class RFInLoExportEnabled(Enum):
451451
'''
452452

453453

454-
class ReferenceClockExportedRate(Enum):
455-
CLOCK_RATE_10_MEGAHERTZ = 10000000
456-
r'''
457-
Uses a 10MHz Reference Clock rate.
458-
'''
459-
CLOCK_RATE_100_MEGAHERTZ = 100000000.0
460-
r'''
461-
Uses a 100MHz Reference Clock rate.
462-
'''
463-
CLOCK_RATE_1_GIGAHERTZ = 1000000000.0
464-
r'''
465-
Uses a 1GHz Reference Clock rate.
466-
'''
467-
468-
469-
class ReferenceClockRate(Enum):
470-
AUTO = -1
471-
r'''
472-
Uses the default Reference Clock rate for the device or automatically detects the Reference Clock rate if the device supports it.
473-
'''
474-
CLOCK_RATE_10_MEGAHERTZ = 10000000
475-
r'''
476-
Uses a 10MHz Reference Clock rate.
477-
'''
478-
479-
480454
class ReferencePllBandwidth(Enum):
481455
NARROW = 0
482456
r'''

0 commit comments

Comments
 (0)