Skip to content

Commit

Permalink
Make output strings ivi-dance where possible (ni#335)
Browse files Browse the repository at this point in the history
Uses ivi-dance to determine the size of output strings and arrays. This finishes the work started in ni#311.
  • Loading branch information
Greg Stoll committed Sep 1, 2021
1 parent 63d1924 commit 0ff7e33
Show file tree
Hide file tree
Showing 6 changed files with 909 additions and 542 deletions.
34 changes: 0 additions & 34 deletions generated/nidaqmx/nidaqmx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4284,7 +4284,6 @@ message AddNetworkDeviceRequest {
string device_name = 2;
bool attempt_reservation = 3;
double timeout = 4;
uint32 device_name_out_buffer_size = 5;
}

message AddNetworkDeviceResponse {
Expand Down Expand Up @@ -6859,7 +6858,6 @@ message GetArmStartTrigTrigWhenResponse {
}

message GetAutoConfiguredCDAQSyncConnectionsRequest {
uint32 port_list_size = 1;
}

message GetAutoConfiguredCDAQSyncConnectionsResponse {
Expand Down Expand Up @@ -6900,7 +6898,6 @@ message GetCalInfoAttributeDoubleResponse {
message GetCalInfoAttributeStringRequest {
string device_name = 1;
CalibrationInfoStringAttributes attribute = 2;
uint32 size = 3;
}

message GetCalInfoAttributeStringResponse {
Expand Down Expand Up @@ -6944,7 +6941,6 @@ message GetChanAttributeDoubleArrayRequest {
nidevice_grpc.Session task = 1;
string channel = 2;
ChannelDoubleArrayAttributes attribute = 3;
uint32 size = 4;
}

message GetChanAttributeDoubleArrayResponse {
Expand All @@ -6968,7 +6964,6 @@ message GetChanAttributeStringRequest {
nidevice_grpc.Session task = 1;
string channel = 2;
ChannelStringAttributes attribute = 3;
uint32 size = 4;
}

message GetChanAttributeStringResponse {
Expand Down Expand Up @@ -7010,7 +7005,6 @@ message GetDeviceAttributeDoubleResponse {
message GetDeviceAttributeDoubleArrayRequest {
string device_name = 1;
DeviceDoubleArrayAttributes attribute = 2;
uint32 size = 3;
}

message GetDeviceAttributeDoubleArrayResponse {
Expand All @@ -7032,7 +7026,6 @@ message GetDeviceAttributeInt32Response {
message GetDeviceAttributeInt32ArrayRequest {
string device_name = 1;
DeviceInt32ArrayAttributes attribute = 2;
uint32 size = 3;
}

message GetDeviceAttributeInt32ArrayResponse {
Expand All @@ -7044,7 +7037,6 @@ message GetDeviceAttributeInt32ArrayResponse {
message GetDeviceAttributeStringRequest {
string device_name = 1;
DeviceStringAttributes attribute = 2;
uint32 size = 3;
}

message GetDeviceAttributeStringResponse {
Expand All @@ -7065,7 +7057,6 @@ message GetDeviceAttributeUInt32Response {
message GetDeviceAttributeUInt32ArrayRequest {
string device_name = 1;
DeviceUInt32ArrayAttributes attribute = 2;
uint32 size = 3;
}

message GetDeviceAttributeUInt32ArrayResponse {
Expand Down Expand Up @@ -7103,7 +7094,6 @@ message GetDigitalPullUpPullDownStatesResponse {
}

message GetDisconnectedCDAQSyncPortsRequest {
uint32 port_list_size = 1;
}

message GetDisconnectedCDAQSyncPortsResponse {
Expand Down Expand Up @@ -7154,7 +7144,6 @@ message GetExportedSignalAttributeInt32Response {
message GetExportedSignalAttributeStringRequest {
nidevice_grpc.Session task = 1;
ExportSignalStringAttributes attribute = 2;
uint32 size = 3;
}

message GetExportedSignalAttributeStringResponse {
Expand Down Expand Up @@ -7201,7 +7190,6 @@ message GetFirstSampTimestampValResponse {
message GetNthTaskChannelRequest {
nidevice_grpc.Session task = 1;
uint32 index = 2;
int32 buffer_size = 3;
}

message GetNthTaskChannelResponse {
Expand All @@ -7212,7 +7200,6 @@ message GetNthTaskChannelResponse {
message GetNthTaskDeviceRequest {
nidevice_grpc.Session task = 1;
uint32 index = 2;
int32 buffer_size = 3;
}

message GetNthTaskDeviceResponse {
Expand All @@ -7223,7 +7210,6 @@ message GetNthTaskDeviceResponse {
message GetNthTaskReadChannelRequest {
nidevice_grpc.Session task = 1;
uint32 index = 2;
int32 buffer_size = 3;
}

message GetNthTaskReadChannelResponse {
Expand All @@ -7244,7 +7230,6 @@ message GetPersistedChanAttributeBoolResponse {
message GetPersistedChanAttributeStringRequest {
string channel = 1;
PersistedChannelStringAttributes attribute = 2;
uint32 size = 3;
}

message GetPersistedChanAttributeStringResponse {
Expand All @@ -7265,7 +7250,6 @@ message GetPersistedScaleAttributeBoolResponse {
message GetPersistedScaleAttributeStringRequest {
string scale_name = 1;
PersistedScaleStringAttributes attribute = 2;
uint32 size = 3;
}

message GetPersistedScaleAttributeStringResponse {
Expand All @@ -7286,7 +7270,6 @@ message GetPersistedTaskAttributeBoolResponse {
message GetPersistedTaskAttributeStringRequest {
string task_name = 1;
PersistedTaskStringAttributes attribute = 2;
uint32 size = 3;
}

message GetPersistedTaskAttributeStringResponse {
Expand All @@ -7307,7 +7290,6 @@ message GetPhysicalChanAttributeBoolResponse {
message GetPhysicalChanAttributeBytesRequest {
string physical_channel = 1;
PhysicalChannelBytesAttributes attribute = 2;
uint32 size = 3;
}

message GetPhysicalChanAttributeBytesResponse {
Expand All @@ -7328,7 +7310,6 @@ message GetPhysicalChanAttributeDoubleResponse {
message GetPhysicalChanAttributeDoubleArrayRequest {
string physical_channel = 1;
PhysicalChannelDoubleArrayAttributes attribute = 2;
uint32 size = 3;
}

message GetPhysicalChanAttributeDoubleArrayResponse {
Expand All @@ -7350,7 +7331,6 @@ message GetPhysicalChanAttributeInt32Response {
message GetPhysicalChanAttributeInt32ArrayRequest {
string physical_channel = 1;
PhysicalChannelInt32ArrayAttributes attribute = 2;
uint32 size = 3;
}

message GetPhysicalChanAttributeInt32ArrayResponse {
Expand All @@ -7362,7 +7342,6 @@ message GetPhysicalChanAttributeInt32ArrayResponse {
message GetPhysicalChanAttributeStringRequest {
string physical_channel = 1;
PhysicalChannelStringAttributes attribute = 2;
uint32 size = 3;
}

message GetPhysicalChanAttributeStringResponse {
Expand All @@ -7383,7 +7362,6 @@ message GetPhysicalChanAttributeUInt32Response {
message GetPhysicalChanAttributeUInt32ArrayRequest {
string physical_channel = 1;
PhysicalChannelUInt32ArrayAttributes attribute = 2;
uint32 size = 3;
}

message GetPhysicalChanAttributeUInt32ArrayResponse {
Expand Down Expand Up @@ -7425,7 +7403,6 @@ message GetReadAttributeInt32Response {
message GetReadAttributeStringRequest {
nidevice_grpc.Session task = 1;
ReadStringAttributes attribute = 2;
uint32 size = 3;
}

message GetReadAttributeStringResponse {
Expand Down Expand Up @@ -7506,7 +7483,6 @@ message GetScaleAttributeDoubleResponse {
message GetScaleAttributeDoubleArrayRequest {
string scale_name = 1;
ScaleDoubleArrayAttributes attribute = 2;
uint32 size = 3;
}

message GetScaleAttributeDoubleArrayResponse {
Expand All @@ -7528,7 +7504,6 @@ message GetScaleAttributeInt32Response {
message GetScaleAttributeStringRequest {
string scale_name = 1;
ScaleStringAttributes attribute = 2;
uint32 size = 3;
}

message GetScaleAttributeStringResponse {
Expand Down Expand Up @@ -7578,7 +7553,6 @@ message GetSyncPulseTimeWhenResponse {

message GetSystemInfoAttributeStringRequest {
SystemStringAttributes attribute = 1;
uint32 size = 2;
}

message GetSystemInfoAttributeStringResponse {
Expand Down Expand Up @@ -7608,7 +7582,6 @@ message GetTaskAttributeBoolResponse {
message GetTaskAttributeStringRequest {
nidevice_grpc.Session task = 1;
TaskStringAttributes attribute = 2;
uint32 size = 3;
}

message GetTaskAttributeStringResponse {
Expand Down Expand Up @@ -7684,7 +7657,6 @@ message GetTimingAttributeExStringRequest {
nidevice_grpc.Session task = 1;
string device_names = 2;
TimingStringAttributes attribute = 3;
uint32 size = 4;
}

message GetTimingAttributeExStringResponse {
Expand Down Expand Up @@ -7728,7 +7700,6 @@ message GetTimingAttributeInt32Response {
message GetTimingAttributeStringRequest {
nidevice_grpc.Session task = 1;
TimingStringAttributes attribute = 2;
uint32 size = 3;
}

message GetTimingAttributeStringResponse {
Expand Down Expand Up @@ -7779,7 +7750,6 @@ message GetTrigAttributeDoubleResponse {
message GetTrigAttributeDoubleArrayRequest {
nidevice_grpc.Session task = 1;
TriggerDoubleArrayAttributes attribute = 2;
uint32 size = 3;
}

message GetTrigAttributeDoubleArrayResponse {
Expand All @@ -7801,7 +7771,6 @@ message GetTrigAttributeInt32Response {
message GetTrigAttributeInt32ArrayRequest {
nidevice_grpc.Session task = 1;
TriggerInt32ArrayAttributes attribute = 2;
uint32 size = 3;
}

message GetTrigAttributeInt32ArrayResponse {
Expand All @@ -7813,7 +7782,6 @@ message GetTrigAttributeInt32ArrayResponse {
message GetTrigAttributeStringRequest {
nidevice_grpc.Session task = 1;
TriggerStringAttributes attribute = 2;
uint32 size = 3;
}

message GetTrigAttributeStringResponse {
Expand Down Expand Up @@ -7879,7 +7847,6 @@ message GetWatchdogAttributeStringRequest {
nidevice_grpc.Session task = 1;
string lines = 2;
WatchdogStringAttributes attribute = 3;
uint32 size = 4;
}

message GetWatchdogAttributeStringResponse {
Expand Down Expand Up @@ -7921,7 +7888,6 @@ message GetWriteAttributeInt32Response {
message GetWriteAttributeStringRequest {
nidevice_grpc.Session task = 1;
WriteStringAttributes attribute = 2;
uint32 size = 3;
}

message GetWriteAttributeStringResponse {
Expand Down
Loading

0 comments on commit 0ff7e33

Please sign in to comment.