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 get_last_error mechanism to IVI init methods. #648

Merged
merged 8 commits into from
Apr 5, 2022

Conversation

reckenro
Copy link
Collaborator

@reckenro reckenro commented Apr 5, 2022

What does this Pull Request accomplish?

Updates IVI based drivers to have an error_message field appended to initialization response messages. It's populated using the same get_last_error codegen pattern used for RFmx.

Why should this Pull Request be merged?

Fixes AB#1873996
When an initialization method fails, we should tack on the error message to the response. We did this with RFmx to avoid some problems with the previous pattern of getting the error message after the initialization response was returned.

What testing has been done?

Ran all SessionTest tests and they all pass.
Ran all updated examples and they still pass. Also, for each one I updated the initialization to fail (invalid resource) and it printed out the failure as expected.

Breaking Change

Marking this as a breaking change. It's not API breaking as the client can continue to use their pre-existing code unaware of the new field on the end of initialization responses. It is breaking in the behavioral sense, though, since there is a new pattern to detect errors for initialization calls as outlined in the updated examples.

@reckenro reckenro added the binary-breaking Change to proto file that requires client updates label Apr 5, 2022
@reckenro
Copy link
Collaborator Author

reckenro commented Apr 5, 2022

Updated:

  • DC Power
  • DMM
  • Digital Pattern
  • FGEN
  • RFSA
  • RFSG
  • Scope
  • Switch

Not Updated:

  • Sync - No GetError method similar to the other drivers to use for get_last_error.
  • Tclk - no initialize methods

@reckenro reckenro merged commit 7d6f481 into ni:main Apr 5, 2022
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.

None yet

3 participants