Skip to content

Commit

Permalink
[NI-FGEN] Add back pulse width properties (#2051)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
ni-juoca and Justin Oca authored Apr 26, 2024
1 parent cfafd02 commit 5206de5
Show file tree
Hide file tree
Showing 12 changed files with 1,102 additions and 897 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ All notable changes to this project will be documented in this file.
* #### Removed
* ### `nifgen` (NI-FGEN)
* #### Added
* Properties added:
* `started_event_pulse_width` - [#1873](https://github.com/ni/nimi-python/issues/1873)
* `done_event_pulse_width` - [#1873](https://github.com/ni/nimi-python/issues/1873)
* `marker_event_pulse_width` - [#1873](https://github.com/ni/nimi-python/issues/1873)
* `started_event_pulse_width_units` - [#1873](https://github.com/ni/nimi-python/issues/1873)
* `done_event_pulse_width_units` - [#1873](https://github.com/ni/nimi-python/issues/1873)
* `marker_event_pulse_width_units` - [#1873](https://github.com/ni/nimi-python/issues/1873)
* Enum added:
* `EventPulseWidthUnits` - [#1873](https://github.com/ni/nimi-python/issues/1873)
* #### Changed
* #### Removed
* ### `nimodinst` (NI-ModInst)
Expand Down
174 changes: 174 additions & 0 deletions docs/nifgen/class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3705,6 +3705,56 @@ done_event_output_terminal
- LabVIEW Property: **Events:Done:Output Terminal**
- C Attribute: **NIFGEN_ATTR_DONE_EVENT_OUTPUT_TERMINAL**

done_event_pulse_width
----------------------

.. py:attribute:: done_event_pulse_width
Specifies the pulse width for the Done Event.

The following table lists the characteristics of this property.

+-----------------------+------------+
| Characteristic | Value |
+=======================+============+
| Datatype | float |
+-----------------------+------------+
| Permissions | read-write |
+-----------------------+------------+
| Repeated Capabilities | None |
+-----------------------+------------+

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

- LabVIEW Property: **Events:Done:Pulse:Width Value**
- C Attribute: **NIFGEN_ATTR_DONE_EVENT_PULSE_WIDTH**

done_event_pulse_width_units
----------------------------

.. py:attribute:: done_event_pulse_width_units
Specifies the pulse width units for the Done Event.

The following table lists the characteristics of this property.

+-----------------------+----------------------------+
| Characteristic | Value |
+=======================+============================+
| Datatype | enums.EventPulseWidthUnits |
+-----------------------+----------------------------+
| Permissions | read-write |
+-----------------------+----------------------------+
| Repeated Capabilities | None |
+-----------------------+----------------------------+

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

- LabVIEW Property: **Events:Done:Pulse:Width Units**
- C Attribute: **NIFGEN_ATTR_DONE_EVENT_PULSE_WIDTH_UNITS**

driver_setup
------------

Expand Down Expand Up @@ -4746,6 +4796,80 @@ marker_event_output_terminal
- LabVIEW Property: **Events:Marker:Output Terminal**
- C Attribute: **NIFGEN_ATTR_MARKER_EVENT_OUTPUT_TERMINAL**

marker_event_pulse_width
------------------------

.. py:attribute:: marker_event_pulse_width
Specifies the pulse width for the Marker Event.




.. tip:: This property can be set/get on specific markers within your :py:class:`nifgen.Session` instance.
Use Python index notation on the repeated capabilities container markers to specify a subset.

Example: :py:attr:`my_session.markers[ ... ].marker_event_pulse_width`

To set/get on all markers, you can call the property directly on the :py:class:`nifgen.Session`.

Example: :py:attr:`my_session.marker_event_pulse_width`

The following table lists the characteristics of this property.

+-----------------------+------------+
| Characteristic | Value |
+=======================+============+
| Datatype | float |
+-----------------------+------------+
| Permissions | read-write |
+-----------------------+------------+
| Repeated Capabilities | markers |
+-----------------------+------------+

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

- LabVIEW Property: **Events:Marker:Pulse:Width Value**
- C Attribute: **NIFGEN_ATTR_MARKER_EVENT_PULSE_WIDTH**

marker_event_pulse_width_units
------------------------------

.. py:attribute:: marker_event_pulse_width_units
Specifies the pulse width units for the Marker Event.




.. tip:: This property can be set/get on specific markers within your :py:class:`nifgen.Session` instance.
Use Python index notation on the repeated capabilities container markers to specify a subset.

Example: :py:attr:`my_session.markers[ ... ].marker_event_pulse_width_units`

To set/get on all markers, you can call the property directly on the :py:class:`nifgen.Session`.

Example: :py:attr:`my_session.marker_event_pulse_width_units`

The following table lists the characteristics of this property.

+-----------------------+----------------------------+
| Characteristic | Value |
+=======================+============================+
| Datatype | enums.EventPulseWidthUnits |
+-----------------------+----------------------------+
| Permissions | read-write |
+-----------------------+----------------------------+
| Repeated Capabilities | markers |
+-----------------------+----------------------------+

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

- LabVIEW Property: **Events:Marker:Pulse:Width Units**
- C Attribute: **NIFGEN_ATTR_MARKER_EVENT_PULSE_WIDTH_UNITS**

max_freq_list_duration
----------------------

Expand Down Expand Up @@ -5693,6 +5817,56 @@ started_event_output_terminal
- LabVIEW Property: **Events:Started:Output Terminal**
- C Attribute: **NIFGEN_ATTR_STARTED_EVENT_OUTPUT_TERMINAL**

started_event_pulse_width
-------------------------

.. py:attribute:: started_event_pulse_width
Specifies the pulse width for the Started Event.

The following table lists the characteristics of this property.

+-----------------------+------------+
| Characteristic | Value |
+=======================+============+
| Datatype | float |
+-----------------------+------------+
| Permissions | read-write |
+-----------------------+------------+
| Repeated Capabilities | None |
+-----------------------+------------+

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

- LabVIEW Property: **Events:Started:Pulse:Width Value**
- C Attribute: **NIFGEN_ATTR_STARTED_EVENT_PULSE_WIDTH**

started_event_pulse_width_units
-------------------------------

.. py:attribute:: started_event_pulse_width_units
Specifies the pulse width units for the Started Event.

The following table lists the characteristics of this property.

+-----------------------+----------------------------+
| Characteristic | Value |
+=======================+============================+
| Datatype | enums.EventPulseWidthUnits |
+-----------------------+----------------------------+
| Permissions | read-write |
+-----------------------+----------------------------+
| Repeated Capabilities | None |
+-----------------------+----------------------------+

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

- LabVIEW Property: **Events:Started:Pulse:Width Units**
- C Attribute: **NIFGEN_ATTR_STARTED_EVENT_PULSE_WIDTH_UNITS**

start_trigger_type
------------------

Expand Down
25 changes: 25 additions & 0 deletions docs/nifgen/enums.rst
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,31 @@ DataMarkerEventLevelPolarity



EventPulseWidthUnits
--------------------

.. py:class:: EventPulseWidthUnits
.. py:attribute:: EventPulseWidthUnits.SAMPLE_CLOCK_PERIODS
Specifies the pulse width in Sample clock periods.





.. py:attribute:: EventPulseWidthUnits.SECONDS
Specifies the pulse width in seconds.





HardwareState
-------------

Expand Down
11 changes: 11 additions & 0 deletions generated/nifgen/nifgen/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ class DataMarkerEventLevelPolarity(Enum):
'''


class EventPulseWidthUnits(Enum):
SAMPLE_CLOCK_PERIODS = 101
r'''
Specifies the pulse width in Sample clock periods.
'''
SECONDS = 102
r'''
Specifies the pulse width in seconds.
'''


class HardwareState(Enum):
IDLE = 0
WAITING_FOR_START_TRIGGER = 100
Expand Down
730 changes: 361 additions & 369 deletions generated/nifgen/nifgen/nifgen_pb2.py

Large diffs are not rendered by default.

Loading

0 comments on commit 5206de5

Please sign in to comment.