MeasurementLink Support for Python v1.2.0
What's Changed
- Added support for service annotations (#291 #294 #296 #338)
- The
.serviceconfig
file now supports specifying additional information about the measurement via theannotations
dictionary. - Example:
"annotations": { "ni/service.description": "Measure inrush current with a shorted load.", "ni/service.collection": "CurrentTests.Inrush", "ni/service.tags": [ "powerup", "current" ] }
ni-measurementlink-generator
now supports generating theannotations
dictionary. By default, it setsni/service.description
,ni/service.collection
, andni/service.tags
to empty values. You can specify values with the--description
,--collection
, and--tags
command line options.
- The
- Added support for protobuf enums (#328)
- The protobuf generated code for enums does not use the Python
enum
module. Instead, it uses integers and provides a subclass of EnumTypeWrapper describing the enum value mapping. - When you use the
configuration
andoutput
decorators to specify measurement parameters, you can now specify either anenum.Enum
subclass or anEnumTypeWrapper
instance forenum_type
.
- The protobuf generated code for enums does not use the Python
- Support for Python services returning DoubleXYData
- Bug fixes
- Improved support for automatically launching the discovery service (#343, #344, #345, #346, #353, #391)
- Importing nidcpower.session into output voltage measurement (#399)
- Fix pywintypes error during the launch of the discovery service after a fresh install of MeasurementLink (#407)
- Update reserve_session to roll back on error (#401)
- Fixed CVE-2023-4570
- Misc improvements
- Examples
- Add
_helpers.py
file to non-driver examples (#329) - Add
Enum out
to sample_measurement (#307) - Realign DMM UI controls (#312)
- Disallow click version 8.1.4 due to an issue with type hints (#325)
- Add measurement example involving NI-DCPower and NI-VISA DMM instruments (#323)
- Update examples to centralize USE_SIMULATION in _constants.py (#348)
- Read serviceconfig path from
__file__
or exe location (#355) - Remove unused TypeVar from _helpers.py (#363)
- Make enum zero translation more readable (#365)
- Configure mypy for all examples to disallow untyped function definitions (#372)
- Use a
threading.Event
for cancellation instead of a local callback function andnonlocal
variable. - Consistently use the name
measurement_service
for the measurement service variable.
- Add
- Minor updates and improvements not listed here
New Contributors
- @LawsonGu made their first contribution in #240
- @Tharun-Sundar made their first contribution in #249
- @vigkre made their first contribution in #254
- @gpachecoNI made their first contribution in #291
- @MounikaBattu17 made their first contribution in #340
Full Changelog: 1.1.0...1.2.0