-
Notifications
You must be signed in to change notification settings - Fork 66
Add ReadAnalogWaveforms to NiDAQmxService #1203
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
Open
mikeprosserni
wants to merge
17
commits into
main
Choose a base branch
from
users/mprosser/task-3424627-read-analog-waveforms
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,183
−10
Open
Changes from 14 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
5e53c36
Enhance NIDAQmx API with waveform support and additional metadata
fff7769
fix lint
01ea5e9
fix validate_examples
1270fd7
ReadAnalogWaveforms implementation (untested, but compiles)
836c408
add tests
b9cf67a
Add support for creating two AI voltage channels in tests
12ca5e5
cleanup
8e5eb77
cleanup CMakeLists.txt
7b50a84
attempt fix for ubuntu build
3d29cbc
more verbose build output
9b26670
Try some different build settings
d117ec2
add quotes to fix cmake flags
23a6e98
add sampsPerChanRead to ReadAnalogWaveforms response
1577116
revert changes in build_cmake.yml and do -fno-var-tracking-assignment…
c03a50d
use GCC push_options
4c36ac8
use -fno-var-tracking-assignments globally for gcc
e7055d1
fix timing conversion
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,7 @@ package nidaqmx_grpc; | |
|
|
||
| import "session.proto"; | ||
| import "data_moniker.proto"; | ||
| import "ni/protobuf/types/waveform.proto"; | ||
| import "google/protobuf/timestamp.proto"; | ||
|
|
||
| service NiDAQmx { | ||
|
|
@@ -465,6 +466,7 @@ service NiDAQmx { | |
| rpc BeginWriteRaw(BeginWriteRawRequest) returns (BeginWriteRawResponse); | ||
| rpc WriteToTEDSFromArray(WriteToTEDSFromArrayRequest) returns (WriteToTEDSFromArrayResponse); | ||
| rpc WriteToTEDSFromFile(WriteToTEDSFromFileRequest) returns (WriteToTEDSFromFileResponse); | ||
| rpc ReadAnalogWaveforms(ReadAnalogWaveformsRequest) returns (ReadAnalogWaveformsResponse); | ||
| } | ||
|
|
||
| enum BufferUInt32Attribute { | ||
|
|
@@ -3558,6 +3560,12 @@ enum WriteBasicTEDSOptions { | |
| WRITE_BASIC_TEDS_OPTIONS_DO_NOT_WRITE = 12540; | ||
| } | ||
|
|
||
| enum WaveformAttributeMode { | ||
| WAVEFORM_ATTRIBUTE_MODE_NONE = 0; | ||
| WAVEFORM_ATTRIBUTE_MODE_TIMING = 1; | ||
| WAVEFORM_ATTRIBUTE_MODE_EXTENDED_PROPERTIES = 2; | ||
| } | ||
|
|
||
| enum ChannelInt32AttributeValues { | ||
| option allow_alias = true; | ||
| CHANNEL_INT32_UNSPECIFIED = 0; | ||
|
|
@@ -11511,3 +11519,19 @@ message WriteToTEDSFromFileResponse { | |
| int32 status = 1; | ||
| } | ||
|
|
||
| message ReadAnalogWaveformsRequest { | ||
| nidevice_grpc.Session task = 1; | ||
| int32 number_of_samples_per_channel = 2; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ReadAnalogF64 calls this num_samps_per_chan. Nothing in nidaqmx.proto spells out "number_of_samples". |
||
| double timeout = 3; | ||
| oneof waveform_attribute_mode_enum { | ||
| WaveformAttributeMode waveform_attribute_mode = 4; | ||
| int32 waveform_attribute_mode_raw = 5; | ||
| } | ||
| } | ||
|
|
||
| message ReadAnalogWaveformsResponse { | ||
| int32 status = 1; | ||
| repeated ni.protobuf.types.DoubleAnalogWaveform waveforms = 2; | ||
| int32 samps_per_chan_read = 3; | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to your last PR, I think you'll need to update stage_client_files.py to get these proto files included in GitHub releases and the AzDo consumed adhoc exports.