Skip to content

Commit 5206de5

Browse files
ni-juocaJustin Oca
andauthored
[NI-FGEN] Add back pulse width properties (#2051)
* ran tox codegen * updated CHANGELOG.md * ran tox codegen after merging changes upstream * using shared enum for event pulse width units * using official export * updated CHANGELOG.md --------- Co-authored-by: Justin Oca <justin.oca@nicom>
1 parent cfafd02 commit 5206de5

File tree

12 files changed

+1102
-897
lines changed

12 files changed

+1102
-897
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ All notable changes to this project will be documented in this file.
5555
* #### Removed
5656
* ### `nifgen` (NI-FGEN)
5757
* #### Added
58+
* Properties added:
59+
* `started_event_pulse_width` - [#1873](https://github.com/ni/nimi-python/issues/1873)
60+
* `done_event_pulse_width` - [#1873](https://github.com/ni/nimi-python/issues/1873)
61+
* `marker_event_pulse_width` - [#1873](https://github.com/ni/nimi-python/issues/1873)
62+
* `started_event_pulse_width_units` - [#1873](https://github.com/ni/nimi-python/issues/1873)
63+
* `done_event_pulse_width_units` - [#1873](https://github.com/ni/nimi-python/issues/1873)
64+
* `marker_event_pulse_width_units` - [#1873](https://github.com/ni/nimi-python/issues/1873)
65+
* Enum added:
66+
* `EventPulseWidthUnits` - [#1873](https://github.com/ni/nimi-python/issues/1873)
5867
* #### Changed
5968
* #### Removed
6069
* ### `nimodinst` (NI-ModInst)

docs/nifgen/class.rst

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3705,6 +3705,56 @@ done_event_output_terminal
37053705
- LabVIEW Property: **Events:Done:Output Terminal**
37063706
- C Attribute: **NIFGEN_ATTR_DONE_EVENT_OUTPUT_TERMINAL**
37073707

3708+
done_event_pulse_width
3709+
----------------------
3710+
3711+
.. py:attribute:: done_event_pulse_width
3712+
3713+
Specifies the pulse width for the Done Event.
3714+
3715+
The following table lists the characteristics of this property.
3716+
3717+
+-----------------------+------------+
3718+
| Characteristic | Value |
3719+
+=======================+============+
3720+
| Datatype | float |
3721+
+-----------------------+------------+
3722+
| Permissions | read-write |
3723+
+-----------------------+------------+
3724+
| Repeated Capabilities | None |
3725+
+-----------------------+------------+
3726+
3727+
.. tip::
3728+
This property corresponds to the following LabVIEW Property or C Attribute:
3729+
3730+
- LabVIEW Property: **Events:Done:Pulse:Width Value**
3731+
- C Attribute: **NIFGEN_ATTR_DONE_EVENT_PULSE_WIDTH**
3732+
3733+
done_event_pulse_width_units
3734+
----------------------------
3735+
3736+
.. py:attribute:: done_event_pulse_width_units
3737+
3738+
Specifies the pulse width units for the Done Event.
3739+
3740+
The following table lists the characteristics of this property.
3741+
3742+
+-----------------------+----------------------------+
3743+
| Characteristic | Value |
3744+
+=======================+============================+
3745+
| Datatype | enums.EventPulseWidthUnits |
3746+
+-----------------------+----------------------------+
3747+
| Permissions | read-write |
3748+
+-----------------------+----------------------------+
3749+
| Repeated Capabilities | None |
3750+
+-----------------------+----------------------------+
3751+
3752+
.. tip::
3753+
This property corresponds to the following LabVIEW Property or C Attribute:
3754+
3755+
- LabVIEW Property: **Events:Done:Pulse:Width Units**
3756+
- C Attribute: **NIFGEN_ATTR_DONE_EVENT_PULSE_WIDTH_UNITS**
3757+
37083758
driver_setup
37093759
------------
37103760

@@ -4746,6 +4796,80 @@ marker_event_output_terminal
47464796
- LabVIEW Property: **Events:Marker:Output Terminal**
47474797
- C Attribute: **NIFGEN_ATTR_MARKER_EVENT_OUTPUT_TERMINAL**
47484798

4799+
marker_event_pulse_width
4800+
------------------------
4801+
4802+
.. py:attribute:: marker_event_pulse_width
4803+
4804+
Specifies the pulse width for the Marker Event.
4805+
4806+
4807+
4808+
4809+
.. tip:: This property can be set/get on specific markers within your :py:class:`nifgen.Session` instance.
4810+
Use Python index notation on the repeated capabilities container markers to specify a subset.
4811+
4812+
Example: :py:attr:`my_session.markers[ ... ].marker_event_pulse_width`
4813+
4814+
To set/get on all markers, you can call the property directly on the :py:class:`nifgen.Session`.
4815+
4816+
Example: :py:attr:`my_session.marker_event_pulse_width`
4817+
4818+
The following table lists the characteristics of this property.
4819+
4820+
+-----------------------+------------+
4821+
| Characteristic | Value |
4822+
+=======================+============+
4823+
| Datatype | float |
4824+
+-----------------------+------------+
4825+
| Permissions | read-write |
4826+
+-----------------------+------------+
4827+
| Repeated Capabilities | markers |
4828+
+-----------------------+------------+
4829+
4830+
.. tip::
4831+
This property corresponds to the following LabVIEW Property or C Attribute:
4832+
4833+
- LabVIEW Property: **Events:Marker:Pulse:Width Value**
4834+
- C Attribute: **NIFGEN_ATTR_MARKER_EVENT_PULSE_WIDTH**
4835+
4836+
marker_event_pulse_width_units
4837+
------------------------------
4838+
4839+
.. py:attribute:: marker_event_pulse_width_units
4840+
4841+
Specifies the pulse width units for the Marker Event.
4842+
4843+
4844+
4845+
4846+
.. tip:: This property can be set/get on specific markers within your :py:class:`nifgen.Session` instance.
4847+
Use Python index notation on the repeated capabilities container markers to specify a subset.
4848+
4849+
Example: :py:attr:`my_session.markers[ ... ].marker_event_pulse_width_units`
4850+
4851+
To set/get on all markers, you can call the property directly on the :py:class:`nifgen.Session`.
4852+
4853+
Example: :py:attr:`my_session.marker_event_pulse_width_units`
4854+
4855+
The following table lists the characteristics of this property.
4856+
4857+
+-----------------------+----------------------------+
4858+
| Characteristic | Value |
4859+
+=======================+============================+
4860+
| Datatype | enums.EventPulseWidthUnits |
4861+
+-----------------------+----------------------------+
4862+
| Permissions | read-write |
4863+
+-----------------------+----------------------------+
4864+
| Repeated Capabilities | markers |
4865+
+-----------------------+----------------------------+
4866+
4867+
.. tip::
4868+
This property corresponds to the following LabVIEW Property or C Attribute:
4869+
4870+
- LabVIEW Property: **Events:Marker:Pulse:Width Units**
4871+
- C Attribute: **NIFGEN_ATTR_MARKER_EVENT_PULSE_WIDTH_UNITS**
4872+
47494873
max_freq_list_duration
47504874
----------------------
47514875

@@ -5693,6 +5817,56 @@ started_event_output_terminal
56935817
- LabVIEW Property: **Events:Started:Output Terminal**
56945818
- C Attribute: **NIFGEN_ATTR_STARTED_EVENT_OUTPUT_TERMINAL**
56955819

5820+
started_event_pulse_width
5821+
-------------------------
5822+
5823+
.. py:attribute:: started_event_pulse_width
5824+
5825+
Specifies the pulse width for the Started Event.
5826+
5827+
The following table lists the characteristics of this property.
5828+
5829+
+-----------------------+------------+
5830+
| Characteristic | Value |
5831+
+=======================+============+
5832+
| Datatype | float |
5833+
+-----------------------+------------+
5834+
| Permissions | read-write |
5835+
+-----------------------+------------+
5836+
| Repeated Capabilities | None |
5837+
+-----------------------+------------+
5838+
5839+
.. tip::
5840+
This property corresponds to the following LabVIEW Property or C Attribute:
5841+
5842+
- LabVIEW Property: **Events:Started:Pulse:Width Value**
5843+
- C Attribute: **NIFGEN_ATTR_STARTED_EVENT_PULSE_WIDTH**
5844+
5845+
started_event_pulse_width_units
5846+
-------------------------------
5847+
5848+
.. py:attribute:: started_event_pulse_width_units
5849+
5850+
Specifies the pulse width units for the Started Event.
5851+
5852+
The following table lists the characteristics of this property.
5853+
5854+
+-----------------------+----------------------------+
5855+
| Characteristic | Value |
5856+
+=======================+============================+
5857+
| Datatype | enums.EventPulseWidthUnits |
5858+
+-----------------------+----------------------------+
5859+
| Permissions | read-write |
5860+
+-----------------------+----------------------------+
5861+
| Repeated Capabilities | None |
5862+
+-----------------------+----------------------------+
5863+
5864+
.. tip::
5865+
This property corresponds to the following LabVIEW Property or C Attribute:
5866+
5867+
- LabVIEW Property: **Events:Started:Pulse:Width Units**
5868+
- C Attribute: **NIFGEN_ATTR_STARTED_EVENT_PULSE_WIDTH_UNITS**
5869+
56965870
start_trigger_type
56975871
------------------
56985872

docs/nifgen/enums.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,31 @@ DataMarkerEventLevelPolarity
199199

200200

201201

202+
EventPulseWidthUnits
203+
--------------------
204+
205+
.. py:class:: EventPulseWidthUnits
206+
207+
.. py:attribute:: EventPulseWidthUnits.SAMPLE_CLOCK_PERIODS
208+
209+
210+
211+
Specifies the pulse width in Sample clock periods.
212+
213+
214+
215+
216+
217+
.. py:attribute:: EventPulseWidthUnits.SECONDS
218+
219+
220+
221+
Specifies the pulse width in seconds.
222+
223+
224+
225+
226+
202227
HardwareState
203228
-------------
204229

generated/nifgen/nifgen/enums.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,17 @@ class DataMarkerEventLevelPolarity(Enum):
8585
'''
8686

8787

88+
class EventPulseWidthUnits(Enum):
89+
SAMPLE_CLOCK_PERIODS = 101
90+
r'''
91+
Specifies the pulse width in Sample clock periods.
92+
'''
93+
SECONDS = 102
94+
r'''
95+
Specifies the pulse width in seconds.
96+
'''
97+
98+
8899
class HardwareState(Enum):
89100
IDLE = 0
90101
WAITING_FOR_START_TRIGGER = 100

generated/nifgen/nifgen/nifgen_pb2.py

Lines changed: 361 additions & 369 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)