Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing DAQmx AnalogStatesWithOutputType functions #408

Conversation

gregstoll
Copy link

@gregstoll gregstoll commented Oct 25, 2021

What does this Pull Request accomplish?

Adds missing functions.

GetAnalogPowerUpStatesWithOutputType() uses an output array sizing mechanism we haven't seen before - the size of the array is passed in by pointer, and the underlying API method sets that pointer to the actual size. If the actual size is bigger than what is passed in, the method returns an error. So this change adds a new mechanism passed-in-by-ptr.

Breaking change: Input arrays on Watchdog ExpirStates methods are given enum types, replacing int32 fields. Requires source changes, but does not break binary compatibility other than restricting valid values.

Why should this Pull Request be merged?

Adds two missing DAQmx methods.

What testing has been done?

Added some unit tests for the new mechanism.

@gregstoll gregstoll linked an issue Oct 25, 2021 that may be closed by this pull request
@gregstoll gregstoll marked this pull request as ready for review October 25, 2021 17:59
Copy link
Collaborator

@astarche astarche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall! Thanks for figuring this out.

Can you ping me after you respond to my comments, and I'll check over it again?

@astarche astarche added the binary-breaking Change to proto file that requires client updates label Oct 25, 2021
@astarche astarche self-requested a review October 25, 2021 20:26
@gregstoll gregstoll merged commit ba0afb0 into ni:main Oct 26, 2021
@gregstoll gregstoll deleted the users/gstoll/daq-missing-analogpowerupstates-functions branch October 26, 2021 14:27
astarche added a commit to astarche/grpc-device that referenced this pull request Oct 26, 2021
…ed-complex

* upstream/main:
  add validation that there's only one set of ivi-dance-with-a-twist sizes and twists (ni#410)
  Increase server max message size. (ni#409)
  Add missing DAQmx AnalogStatesWithOutputType functions (ni#408)
  Add missing defines from RFSA/G (ni#400)
  Add NI-RFSA getting started examples (ni#406)
  Fix wrong enum string in RFSG (ni#405)
  Remove LockSession and UnlockSession from services (ni#403)
  remove redundant suffixes from RFSG enum names and values (ni#397)
  Fixup RFSA enum names (ni#393)
  remove "Attr" from RFSG attribute enum names (ni#392)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binary-breaking Change to proto file that requires client updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AnalogStatesWithOutputType methods are missing from grpc-device
3 participants