Adding RFSG gRPC support with Python API. #2128
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TODO: Check the above box with an 'x' indicating you've read and followed CONTRIBUTING.md.
TODO: Check the above box with an 'x' if considered if there were any and then documented client facing changes in CHANGELOG.md. Strike through if this is not a relevant client facing change.
TODO: Check the above box with an 'x' indicating you have considered and added any applicable system or unit tests. Strike through if you considered and decided additional tests were not warranted.
What does this Pull Request accomplish?
There was a need to add gRPC Python support for the RFSG driver. This required a new Proto file which is copied from the grpc-device generated from the meta-data there. Reference: ni/grpc-device#1181
List issues fixed by this Pull Request below, if any.
Added the gRPC RFSG Proto file with the latest API.
The gRPC was not support for the methods which were involving the NIComplex struct. Since the numpy to NIComplex was not directly supported in case of the gRPC, but in the case of the python API we were using pointers to the C API for direct modification, but this was not possible in case of the gRPC since the driver would be running on the server side. To resolve this, modified the codegen to convert the numpy and NIComplex and vice-versa before/after gRPC calls.
What testing has been done?
Built the code locally. All test passed except flake8 indentation tests. Will fix it after final changes




Ran System Test by attaching the gRPC session locally.
9 Tests are failing.
TODO: Will fix one by one
Also Validated with the NI-IO Trace logs for the calls to driver from gRPC client.

All 3 Examples are passing with the gRPC calls.