diff --git a/generated/nidaqmx/nidaqmx.proto b/generated/nidaqmx/nidaqmx.proto index 716e79568..87a7abd30 100644 --- a/generated/nidaqmx/nidaqmx.proto +++ b/generated/nidaqmx/nidaqmx.proto @@ -4376,41 +4376,6 @@ enum WriteInt32AttributeValues { WRITE_INT32_WRITE_RELATIVE_TO_CURR_WRITE_POS = 10430; } -message DoubleData { - double value = 1; -} - -message I32Data { - int32 value = 1; -} - -message BoolData { - bool value = 1; -} - -message U32Data { - uint32 value = 1; -} - -message ArrayDoubleData { - repeated double value = 1; -} - -message ArrayI16Data { - repeated int32 value = 1; -} - -message ArrayI32Data { - repeated int32 value = 1; -} - -message ArrayU16Data { - repeated uint32 value = 1; -} - -message ArrayU32Data { - repeated uint32 value = 1; -} message AnalogPowerUpChannelsAndState { string channel_names = 1; double state = 2; diff --git a/generated/nidaqmx/nidaqmx_service.cpp b/generated/nidaqmx/nidaqmx_service.cpp index 13a6e07a7..4be8c3586 100644 --- a/generated/nidaqmx/nidaqmx_service.cpp +++ b/generated/nidaqmx/nidaqmx_service.cpp @@ -626,8 +626,8 @@ namespace nidaqmx_grpc { ni::data_monikers::DataMonikerService::RegisterMonikerEndpoint("MonikerWriteRaw", MonikerWriteRaw); } -::grpc::Status MonikerReadAnalogF64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadAnalogF64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadAnalogF64Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -654,10 +654,10 @@ ::grpc::Status MonikerReadAnalogF64(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadAnalogScalarF64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadAnalogScalarF64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadAnalogScalarF64Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -679,10 +679,10 @@ ::grpc::Status MonikerReadAnalogScalarF64(void* data, google::protobuf::Arena& a return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadBinaryI16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadBinaryI16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadBinaryI16Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -700,15 +700,15 @@ ::grpc::Status MonikerReadBinaryI16(void* data, google::protobuf::Arena& arena, if (status >= 0) { response->set_status(status); - response->mutable_read_array()->Clear(); - response->mutable_read_array()->Reserve(array_size_in_samps); - std::transform( - read_array.begin(), - read_array.begin() + array_size_in_samps, - google::protobuf::RepeatedFieldBackInserter(response->mutable_read_array()), - [&](auto x) { - return x; - }); + response->mutable_read_array()->Clear(); + response->mutable_read_array()->Reserve(array_size_in_samps); + std::transform( + read_array.begin(), + read_array.begin() + array_size_in_samps, + google::protobuf::RepeatedFieldBackInserter(response->mutable_read_array()), + [&](auto x) { + return x; + }); response->set_samps_per_chan_read(samps_per_chan_read); packedData.PackFrom(*response); } @@ -717,10 +717,10 @@ ::grpc::Status MonikerReadBinaryI16(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadBinaryI32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadBinaryI32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadBinaryI32Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -747,10 +747,10 @@ ::grpc::Status MonikerReadBinaryI32(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadBinaryU16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadBinaryU16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadBinaryU16Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -768,15 +768,15 @@ ::grpc::Status MonikerReadBinaryU16(void* data, google::protobuf::Arena& arena, if (status >= 0) { response->set_status(status); - response->mutable_read_array()->Clear(); - response->mutable_read_array()->Reserve(array_size_in_samps); - std::transform( - read_array.begin(), - read_array.begin() + array_size_in_samps, - google::protobuf::RepeatedFieldBackInserter(response->mutable_read_array()), - [&](auto x) { - return x; - }); + response->mutable_read_array()->Clear(); + response->mutable_read_array()->Reserve(array_size_in_samps); + std::transform( + read_array.begin(), + read_array.begin() + array_size_in_samps, + google::protobuf::RepeatedFieldBackInserter(response->mutable_read_array()), + [&](auto x) { + return x; + }); response->set_samps_per_chan_read(samps_per_chan_read); packedData.PackFrom(*response); } @@ -785,10 +785,10 @@ ::grpc::Status MonikerReadBinaryU16(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadBinaryU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadBinaryU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadBinaryU32Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -815,10 +815,10 @@ ::grpc::Status MonikerReadBinaryU32(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadCounterF64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadCounterF64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadCounterF64Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -844,10 +844,10 @@ ::grpc::Status MonikerReadCounterF64(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadCounterF64Ex(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadCounterF64Ex(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadCounterF64ExData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -874,10 +874,10 @@ ::grpc::Status MonikerReadCounterF64Ex(void* data, google::protobuf::Arena& aren return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadCounterScalarF64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadCounterScalarF64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadCounterScalarF64Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -899,10 +899,10 @@ ::grpc::Status MonikerReadCounterScalarF64(void* data, google::protobuf::Arena& return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadCounterScalarU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadCounterScalarU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadCounterScalarU32Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -924,10 +924,10 @@ ::grpc::Status MonikerReadCounterScalarU32(void* data, google::protobuf::Arena& return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadCounterU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadCounterU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadCounterU32Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -953,10 +953,10 @@ ::grpc::Status MonikerReadCounterU32(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadCounterU32Ex(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadCounterU32Ex(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadCounterU32ExData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -983,10 +983,10 @@ ::grpc::Status MonikerReadCounterU32Ex(void* data, google::protobuf::Arena& aren return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadCtrFreq(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadCtrFreq(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadCtrFreqData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1015,10 +1015,10 @@ ::grpc::Status MonikerReadCtrFreq(void* data, google::protobuf::Arena& arena, go return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadCtrFreqScalar(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadCtrFreqScalar(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadCtrFreqScalarData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1042,10 +1042,10 @@ ::grpc::Status MonikerReadCtrFreqScalar(void* data, google::protobuf::Arena& are return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadCtrTicks(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadCtrTicks(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadCtrTicksData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1074,10 +1074,10 @@ ::grpc::Status MonikerReadCtrTicks(void* data, google::protobuf::Arena& arena, g return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadCtrTicksScalar(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadCtrTicksScalar(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadCtrTicksScalarData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1101,10 +1101,10 @@ ::grpc::Status MonikerReadCtrTicksScalar(void* data, google::protobuf::Arena& ar return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadCtrTime(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadCtrTime(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadCtrTimeData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1133,10 +1133,10 @@ ::grpc::Status MonikerReadCtrTime(void* data, google::protobuf::Arena& arena, go return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadCtrTimeScalar(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadCtrTimeScalar(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadCtrTimeScalarData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1160,10 +1160,10 @@ ::grpc::Status MonikerReadCtrTimeScalar(void* data, google::protobuf::Arena& are return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadDigitalLines(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadDigitalLines(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadDigitalLinesData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1192,10 +1192,10 @@ ::grpc::Status MonikerReadDigitalLines(void* data, google::protobuf::Arena& aren return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadDigitalScalarU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadDigitalScalarU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadDigitalScalarU32Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1217,10 +1217,10 @@ ::grpc::Status MonikerReadDigitalScalarU32(void* data, google::protobuf::Arena& return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadDigitalU16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadDigitalU16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadDigitalU16Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1238,15 +1238,15 @@ ::grpc::Status MonikerReadDigitalU16(void* data, google::protobuf::Arena& arena, if (status >= 0) { response->set_status(status); - response->mutable_read_array()->Clear(); - response->mutable_read_array()->Reserve(array_size_in_samps); - std::transform( - read_array.begin(), - read_array.begin() + array_size_in_samps, - google::protobuf::RepeatedFieldBackInserter(response->mutable_read_array()), - [&](auto x) { - return x; - }); + response->mutable_read_array()->Clear(); + response->mutable_read_array()->Reserve(array_size_in_samps); + std::transform( + read_array.begin(), + read_array.begin() + array_size_in_samps, + google::protobuf::RepeatedFieldBackInserter(response->mutable_read_array()), + [&](auto x) { + return x; + }); response->set_samps_per_chan_read(samps_per_chan_read); packedData.PackFrom(*response); } @@ -1255,10 +1255,10 @@ ::grpc::Status MonikerReadDigitalU16(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadDigitalU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadDigitalU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadDigitalU32Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1285,10 +1285,10 @@ ::grpc::Status MonikerReadDigitalU32(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadDigitalU8(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadDigitalU8(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadDigitalU8Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1315,10 +1315,10 @@ ::grpc::Status MonikerReadDigitalU8(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadPowerBinaryI16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadPowerBinaryI16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadPowerBinaryI16Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1337,24 +1337,24 @@ ::grpc::Status MonikerReadPowerBinaryI16(void* data, google::protobuf::Arena& ar if (status >= 0) { response->set_status(status); - response->mutable_read_array_voltage()->Clear(); - response->mutable_read_array_voltage()->Reserve(array_size_in_samps); - std::transform( - read_array_voltage.begin(), - read_array_voltage.begin() + array_size_in_samps, - google::protobuf::RepeatedFieldBackInserter(response->mutable_read_array_voltage()), - [&](auto x) { - return x; - }); - response->mutable_read_array_current()->Clear(); - response->mutable_read_array_current()->Reserve(array_size_in_samps); - std::transform( - read_array_current.begin(), - read_array_current.begin() + array_size_in_samps, - google::protobuf::RepeatedFieldBackInserter(response->mutable_read_array_current()), - [&](auto x) { - return x; - }); + response->mutable_read_array_voltage()->Clear(); + response->mutable_read_array_voltage()->Reserve(array_size_in_samps); + std::transform( + read_array_voltage.begin(), + read_array_voltage.begin() + array_size_in_samps, + google::protobuf::RepeatedFieldBackInserter(response->mutable_read_array_voltage()), + [&](auto x) { + return x; + }); + response->mutable_read_array_current()->Clear(); + response->mutable_read_array_current()->Reserve(array_size_in_samps); + std::transform( + read_array_current.begin(), + read_array_current.begin() + array_size_in_samps, + google::protobuf::RepeatedFieldBackInserter(response->mutable_read_array_current()), + [&](auto x) { + return x; + }); response->set_samps_per_chan_read(samps_per_chan_read); packedData.PackFrom(*response); } @@ -1363,10 +1363,10 @@ ::grpc::Status MonikerReadPowerBinaryI16(void* data, google::protobuf::Arena& ar return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadPowerF64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadPowerF64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadPowerF64Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1395,10 +1395,10 @@ ::grpc::Status MonikerReadPowerF64(void* data, google::protobuf::Arena& arena, g return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadPowerScalarF64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadPowerScalarF64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadPowerScalarF64Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1422,10 +1422,10 @@ ::grpc::Status MonikerReadPowerScalarF64(void* data, google::protobuf::Arena& ar return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadRaw(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadRaw(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadRawData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1453,10 +1453,10 @@ ::grpc::Status MonikerReadRaw(void* data, google::protobuf::Arena& arena, google return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWaitForNextSampleClock(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWaitForNextSampleClock(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWaitForNextSampleClockData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1477,10 +1477,10 @@ ::grpc::Status MonikerWaitForNextSampleClock(void* data, google::protobuf::Arena return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteAnalogF64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteAnalogF64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteAnalogF64Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1490,11 +1490,11 @@ ::grpc::Status MonikerWriteAnalogF64(void* data, google::protobuf::Arena& arena, auto timeout = function_data->timeout; auto data_layout = function_data->data_layout; auto reserved = function_data->reserved; - int32 samps_per_chan_written {}; auto request = &function_data->request; packedData.UnpackTo(request); - auto write_array = const_cast(request->write_array().data()); + auto write_array = const_cast(request->write_array().data()); + int32 samps_per_chan_written {}; auto status = library->WriteAnalogF64(task, num_samps_per_chan, auto_start, timeout, data_layout, write_array, &samps_per_chan_written, reserved); @@ -1503,10 +1503,10 @@ ::grpc::Status MonikerWriteAnalogF64(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteAnalogScalarF64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteAnalogScalarF64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteAnalogScalarF64Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1517,7 +1517,7 @@ ::grpc::Status MonikerWriteAnalogScalarF64(void* data, google::protobuf::Arena& auto request = &function_data->request; packedData.UnpackTo(request); - float64 value = request->value(); + float64 value = request->value(); auto status = library->WriteAnalogScalarF64(task, auto_start, timeout, value, reserved); @@ -1526,10 +1526,10 @@ ::grpc::Status MonikerWriteAnalogScalarF64(void* data, google::protobuf::Arena& return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteBinaryI16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteBinaryI16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteBinaryI16Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1539,28 +1539,28 @@ ::grpc::Status MonikerWriteBinaryI16(void* data, google::protobuf::Arena& arena, auto timeout = function_data->timeout; auto data_layout = function_data->data_layout; auto reserved = function_data->reserved; - int32 samps_per_chan_written {}; auto request = &function_data->request; packedData.UnpackTo(request); - auto write_array_raw = request->write_array(); - auto write_array = std::vector(); - write_array.reserve(write_array_raw.size()); - std::transform( - write_array_raw.begin(), - write_array_raw.end(), - std::back_inserter(write_array), - [](auto x) { - if (x < std::numeric_limits::min() || x > std::numeric_limits::max()) { - std::string message("value "); - message.append(std::to_string(x)); - message.append(" doesn't fit in datatype "); - message.append("int16"); - throw nidevice_grpc::ValueOutOfRangeException(message); - } - return static_cast(x); - }); + auto write_array_raw = request->write_array(); + auto write_array = std::vector(); + write_array.reserve(write_array_raw.size()); + std::transform( + write_array_raw.begin(), + write_array_raw.end(), + std::back_inserter(write_array), + [](auto x) { + if (x < std::numeric_limits::min() || x > std::numeric_limits::max()) { + std::string message("value "); + message.append(std::to_string(x)); + message.append(" doesn't fit in datatype "); + message.append("int16"); + throw nidevice_grpc::ValueOutOfRangeException(message); + } + return static_cast(x); + }); + int32 samps_per_chan_written {}; auto status = library->WriteBinaryI16(task, num_samps_per_chan, auto_start, timeout, data_layout, write_array.data(), &samps_per_chan_written, reserved); @@ -1569,10 +1569,10 @@ ::grpc::Status MonikerWriteBinaryI16(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteBinaryI32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteBinaryI32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteBinaryI32Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1582,11 +1582,11 @@ ::grpc::Status MonikerWriteBinaryI32(void* data, google::protobuf::Arena& arena, auto timeout = function_data->timeout; auto data_layout = function_data->data_layout; auto reserved = function_data->reserved; - int32 samps_per_chan_written {}; auto request = &function_data->request; packedData.UnpackTo(request); - auto write_array = reinterpret_cast(request->write_array().data()); + auto write_array = reinterpret_cast(request->write_array().data()); + int32 samps_per_chan_written {}; auto status = library->WriteBinaryI32(task, num_samps_per_chan, auto_start, timeout, data_layout, write_array, &samps_per_chan_written, reserved); @@ -1595,10 +1595,10 @@ ::grpc::Status MonikerWriteBinaryI32(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteBinaryU16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteBinaryU16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteBinaryU16Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1608,28 +1608,28 @@ ::grpc::Status MonikerWriteBinaryU16(void* data, google::protobuf::Arena& arena, auto timeout = function_data->timeout; auto data_layout = function_data->data_layout; auto reserved = function_data->reserved; - int32 samps_per_chan_written {}; auto request = &function_data->request; packedData.UnpackTo(request); - auto write_array_raw = request->write_array(); - auto write_array = std::vector(); - write_array.reserve(write_array_raw.size()); - std::transform( - write_array_raw.begin(), - write_array_raw.end(), - std::back_inserter(write_array), - [](auto x) { - if (x < std::numeric_limits::min() || x > std::numeric_limits::max()) { - std::string message("value "); - message.append(std::to_string(x)); - message.append(" doesn't fit in datatype "); - message.append("uInt16"); - throw nidevice_grpc::ValueOutOfRangeException(message); - } - return static_cast(x); - }); + auto write_array_raw = request->write_array(); + auto write_array = std::vector(); + write_array.reserve(write_array_raw.size()); + std::transform( + write_array_raw.begin(), + write_array_raw.end(), + std::back_inserter(write_array), + [](auto x) { + if (x < std::numeric_limits::min() || x > std::numeric_limits::max()) { + std::string message("value "); + message.append(std::to_string(x)); + message.append(" doesn't fit in datatype "); + message.append("uInt16"); + throw nidevice_grpc::ValueOutOfRangeException(message); + } + return static_cast(x); + }); + int32 samps_per_chan_written {}; auto status = library->WriteBinaryU16(task, num_samps_per_chan, auto_start, timeout, data_layout, write_array.data(), &samps_per_chan_written, reserved); @@ -1638,10 +1638,10 @@ ::grpc::Status MonikerWriteBinaryU16(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteBinaryU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteBinaryU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteBinaryU32Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1651,11 +1651,11 @@ ::grpc::Status MonikerWriteBinaryU32(void* data, google::protobuf::Arena& arena, auto timeout = function_data->timeout; auto data_layout = function_data->data_layout; auto reserved = function_data->reserved; - int32 samps_per_chan_written {}; auto request = &function_data->request; packedData.UnpackTo(request); - auto write_array = reinterpret_cast(request->write_array().data()); + auto write_array = reinterpret_cast(request->write_array().data()); + int32 samps_per_chan_written {}; auto status = library->WriteBinaryU32(task, num_samps_per_chan, auto_start, timeout, data_layout, write_array, &samps_per_chan_written, reserved); @@ -1664,10 +1664,10 @@ ::grpc::Status MonikerWriteBinaryU32(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteCtrFreq(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteCtrFreq(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteCtrFreqData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1677,12 +1677,12 @@ ::grpc::Status MonikerWriteCtrFreq(void* data, google::protobuf::Arena& arena, g auto timeout = function_data->timeout; auto data_layout = function_data->data_layout; auto reserved = function_data->reserved; - int32 num_samps_per_chan_written {}; auto request = &function_data->request; packedData.UnpackTo(request); - auto frequency = const_cast(request->frequency().data()); - auto duty_cycle = const_cast(request->duty_cycle().data()); + auto frequency = const_cast(request->frequency().data()); + auto duty_cycle = const_cast(request->duty_cycle().data()); + int32 num_samps_per_chan_written {}; auto status = library->WriteCtrFreq(task, num_samps_per_chan, auto_start, timeout, data_layout, frequency, duty_cycle, &num_samps_per_chan_written, reserved); @@ -1691,10 +1691,10 @@ ::grpc::Status MonikerWriteCtrFreq(void* data, google::protobuf::Arena& arena, g return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteCtrFreqScalar(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteCtrFreqScalar(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteCtrFreqScalarData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1705,8 +1705,8 @@ ::grpc::Status MonikerWriteCtrFreqScalar(void* data, google::protobuf::Arena& ar auto request = &function_data->request; packedData.UnpackTo(request); - float64 frequency = request->frequency(); - float64 duty_cycle = request->duty_cycle(); + float64 frequency = request->frequency(); + float64 duty_cycle = request->duty_cycle(); auto status = library->WriteCtrFreqScalar(task, auto_start, timeout, frequency, duty_cycle, reserved); @@ -1715,10 +1715,10 @@ ::grpc::Status MonikerWriteCtrFreqScalar(void* data, google::protobuf::Arena& ar return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteCtrTicks(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteCtrTicks(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteCtrTicksData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1728,12 +1728,12 @@ ::grpc::Status MonikerWriteCtrTicks(void* data, google::protobuf::Arena& arena, auto timeout = function_data->timeout; auto data_layout = function_data->data_layout; auto reserved = function_data->reserved; - int32 num_samps_per_chan_written {}; auto request = &function_data->request; packedData.UnpackTo(request); - auto high_ticks = reinterpret_cast(request->high_ticks().data()); - auto low_ticks = reinterpret_cast(request->low_ticks().data()); + auto high_ticks = reinterpret_cast(request->high_ticks().data()); + auto low_ticks = reinterpret_cast(request->low_ticks().data()); + int32 num_samps_per_chan_written {}; auto status = library->WriteCtrTicks(task, num_samps_per_chan, auto_start, timeout, data_layout, high_ticks, low_ticks, &num_samps_per_chan_written, reserved); @@ -1742,10 +1742,10 @@ ::grpc::Status MonikerWriteCtrTicks(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteCtrTicksScalar(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteCtrTicksScalar(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteCtrTicksScalarData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1756,8 +1756,8 @@ ::grpc::Status MonikerWriteCtrTicksScalar(void* data, google::protobuf::Arena& a auto request = &function_data->request; packedData.UnpackTo(request); - uInt32 high_ticks = request->high_ticks(); - uInt32 low_ticks = request->low_ticks(); + uInt32 high_ticks = request->high_ticks(); + uInt32 low_ticks = request->low_ticks(); auto status = library->WriteCtrTicksScalar(task, auto_start, timeout, high_ticks, low_ticks, reserved); @@ -1766,10 +1766,10 @@ ::grpc::Status MonikerWriteCtrTicksScalar(void* data, google::protobuf::Arena& a return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteCtrTime(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteCtrTime(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteCtrTimeData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1779,12 +1779,12 @@ ::grpc::Status MonikerWriteCtrTime(void* data, google::protobuf::Arena& arena, g auto timeout = function_data->timeout; auto data_layout = function_data->data_layout; auto reserved = function_data->reserved; - int32 num_samps_per_chan_written {}; auto request = &function_data->request; packedData.UnpackTo(request); - auto high_time = const_cast(request->high_time().data()); - auto low_time = const_cast(request->low_time().data()); + auto high_time = const_cast(request->high_time().data()); + auto low_time = const_cast(request->low_time().data()); + int32 num_samps_per_chan_written {}; auto status = library->WriteCtrTime(task, num_samps_per_chan, auto_start, timeout, data_layout, high_time, low_time, &num_samps_per_chan_written, reserved); @@ -1793,10 +1793,10 @@ ::grpc::Status MonikerWriteCtrTime(void* data, google::protobuf::Arena& arena, g return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteCtrTimeScalar(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteCtrTimeScalar(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteCtrTimeScalarData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1807,8 +1807,8 @@ ::grpc::Status MonikerWriteCtrTimeScalar(void* data, google::protobuf::Arena& ar auto request = &function_data->request; packedData.UnpackTo(request); - float64 high_time = request->high_time(); - float64 low_time = request->low_time(); + float64 high_time = request->high_time(); + float64 low_time = request->low_time(); auto status = library->WriteCtrTimeScalar(task, auto_start, timeout, high_time, low_time, reserved); @@ -1817,10 +1817,10 @@ ::grpc::Status MonikerWriteCtrTimeScalar(void* data, google::protobuf::Arena& ar return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteDigitalLines(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteDigitalLines(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteDigitalLinesData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1830,11 +1830,11 @@ ::grpc::Status MonikerWriteDigitalLines(void* data, google::protobuf::Arena& are auto timeout = function_data->timeout; auto data_layout = function_data->data_layout; auto reserved = function_data->reserved; - int32 samps_per_chan_written {}; auto request = &function_data->request; packedData.UnpackTo(request); - const uInt8* write_array = (const uInt8*)request->write_array().c_str(); + const uInt8* write_array = (const uInt8*)request->write_array().c_str(); + int32 samps_per_chan_written {}; auto status = library->WriteDigitalLines(task, num_samps_per_chan, auto_start, timeout, data_layout, write_array, &samps_per_chan_written, reserved); @@ -1843,10 +1843,10 @@ ::grpc::Status MonikerWriteDigitalLines(void* data, google::protobuf::Arena& are return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteDigitalScalarU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteDigitalScalarU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteDigitalScalarU32Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1857,7 +1857,7 @@ ::grpc::Status MonikerWriteDigitalScalarU32(void* data, google::protobuf::Arena& auto request = &function_data->request; packedData.UnpackTo(request); - uInt32 value = request->value(); + uInt32 value = request->value(); auto status = library->WriteDigitalScalarU32(task, auto_start, timeout, value, reserved); @@ -1866,10 +1866,10 @@ ::grpc::Status MonikerWriteDigitalScalarU32(void* data, google::protobuf::Arena& return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteDigitalU16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteDigitalU16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteDigitalU16Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1879,28 +1879,28 @@ ::grpc::Status MonikerWriteDigitalU16(void* data, google::protobuf::Arena& arena auto timeout = function_data->timeout; auto data_layout = function_data->data_layout; auto reserved = function_data->reserved; - int32 samps_per_chan_written {}; auto request = &function_data->request; packedData.UnpackTo(request); - auto write_array_raw = request->write_array(); - auto write_array = std::vector(); - write_array.reserve(write_array_raw.size()); - std::transform( - write_array_raw.begin(), - write_array_raw.end(), - std::back_inserter(write_array), - [](auto x) { - if (x < std::numeric_limits::min() || x > std::numeric_limits::max()) { - std::string message("value "); - message.append(std::to_string(x)); - message.append(" doesn't fit in datatype "); - message.append("uInt16"); - throw nidevice_grpc::ValueOutOfRangeException(message); - } - return static_cast(x); - }); + auto write_array_raw = request->write_array(); + auto write_array = std::vector(); + write_array.reserve(write_array_raw.size()); + std::transform( + write_array_raw.begin(), + write_array_raw.end(), + std::back_inserter(write_array), + [](auto x) { + if (x < std::numeric_limits::min() || x > std::numeric_limits::max()) { + std::string message("value "); + message.append(std::to_string(x)); + message.append(" doesn't fit in datatype "); + message.append("uInt16"); + throw nidevice_grpc::ValueOutOfRangeException(message); + } + return static_cast(x); + }); + int32 samps_per_chan_written {}; auto status = library->WriteDigitalU16(task, num_samps_per_chan, auto_start, timeout, data_layout, write_array.data(), &samps_per_chan_written, reserved); @@ -1909,10 +1909,10 @@ ::grpc::Status MonikerWriteDigitalU16(void* data, google::protobuf::Arena& arena return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteDigitalU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteDigitalU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteDigitalU32Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1922,11 +1922,11 @@ ::grpc::Status MonikerWriteDigitalU32(void* data, google::protobuf::Arena& arena auto timeout = function_data->timeout; auto data_layout = function_data->data_layout; auto reserved = function_data->reserved; - int32 samps_per_chan_written {}; auto request = &function_data->request; packedData.UnpackTo(request); - auto write_array = reinterpret_cast(request->write_array().data()); + auto write_array = reinterpret_cast(request->write_array().data()); + int32 samps_per_chan_written {}; auto status = library->WriteDigitalU32(task, num_samps_per_chan, auto_start, timeout, data_layout, write_array, &samps_per_chan_written, reserved); @@ -1935,10 +1935,10 @@ ::grpc::Status MonikerWriteDigitalU32(void* data, google::protobuf::Arena& arena return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteDigitalU8(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteDigitalU8(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteDigitalU8Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1948,11 +1948,11 @@ ::grpc::Status MonikerWriteDigitalU8(void* data, google::protobuf::Arena& arena, auto timeout = function_data->timeout; auto data_layout = function_data->data_layout; auto reserved = function_data->reserved; - int32 samps_per_chan_written {}; auto request = &function_data->request; packedData.UnpackTo(request); - const uInt8* write_array = (const uInt8*)request->write_array().c_str(); + const uInt8* write_array = (const uInt8*)request->write_array().c_str(); + int32 samps_per_chan_written {}; auto status = library->WriteDigitalU8(task, num_samps_per_chan, auto_start, timeout, data_layout, write_array, &samps_per_chan_written, reserved); @@ -1961,10 +1961,10 @@ ::grpc::Status MonikerWriteDigitalU8(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteRaw(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteRaw(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteRawData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1973,11 +1973,11 @@ ::grpc::Status MonikerWriteRaw(void* data, google::protobuf::Arena& arena, googl auto auto_start = function_data->auto_start; auto timeout = function_data->timeout; auto reserved = function_data->reserved; - int32 samps_per_chan_written {}; auto request = &function_data->request; packedData.UnpackTo(request); - const uInt8* write_array = (const uInt8*)request->write_array().c_str(); + const uInt8* write_array = (const uInt8*)request->write_array().c_str(); + int32 samps_per_chan_written {}; auto status = library->WriteRaw(task, num_samps, auto_start, timeout, write_array, &samps_per_chan_written, reserved); @@ -1986,7 +1986,7 @@ ::grpc::Status MonikerWriteRaw(void* data, google::protobuf::Arena& arena, googl return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } //--------------------------------------------------------------------- //--------------------------------------------------------------------- @@ -9759,15 +9759,15 @@ ::grpc::Status MonikerWriteRaw(void* data, google::protobuf::Arena& arena, googl } response->set_status(status); response->mutable_state_array()->Resize(array_size_copy, 0); - response->mutable_channel_type_array()->Clear(); - response->mutable_channel_type_array()->Reserve(array_size_copy); - std::transform( - response->channel_type_array_raw().begin(), - response->channel_type_array_raw().begin() + array_size_copy, - google::protobuf::RepeatedFieldBackInserter(response->mutable_channel_type_array()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_channel_type_array()->Clear(); + response->mutable_channel_type_array()->Reserve(array_size_copy); + std::transform( + response->channel_type_array_raw().begin(), + response->channel_type_array_raw().begin() + array_size_copy, + google::protobuf::RepeatedFieldBackInserter(response->mutable_channel_type_array()), + [&](auto x) { + return static_cast(x); + }); return ::grpc::Status::OK; } catch (nidevice_grpc::NonDriverException& ex) { @@ -10650,15 +10650,15 @@ ::grpc::Status MonikerWriteRaw(void* data, google::protobuf::Arena& arena, googl auto valid_enum_value = raw_value_is_valid ? raw_value : 0; return static_cast(valid_enum_value); }; - response->mutable_value()->Clear(); - response->mutable_value()->Reserve(size); - std::transform( - response->value_raw().begin(), - response->value_raw().begin() + size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_value()), - [&](auto x) { - return checked_convert_value(x); - }); + response->mutable_value()->Clear(); + response->mutable_value()->Reserve(size); + std::transform( + response->value_raw().begin(), + response->value_raw().begin() + size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_value()), + [&](auto x) { + return checked_convert_value(x); + }); return ::grpc::Status::OK; } } @@ -12096,15 +12096,15 @@ ::grpc::Status MonikerWriteRaw(void* data, google::protobuf::Arena& arena, googl auto valid_enum_value = raw_value_is_valid ? raw_value : 0; return static_cast(valid_enum_value); }; - response->mutable_value()->Clear(); - response->mutable_value()->Reserve(size); - std::transform( - response->value_raw().begin(), - response->value_raw().begin() + size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_value()), - [&](auto x) { - return checked_convert_value(x); - }); + response->mutable_value()->Clear(); + response->mutable_value()->Reserve(size); + std::transform( + response->value_raw().begin(), + response->value_raw().begin() + size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_value()), + [&](auto x) { + return checked_convert_value(x); + }); return ::grpc::Status::OK; } } @@ -14189,15 +14189,15 @@ ::grpc::Status MonikerWriteRaw(void* data, google::protobuf::Arena& arena, googl auto valid_enum_value = raw_value_is_valid ? raw_value : 0; return static_cast(valid_enum_value); }; - response->mutable_value()->Clear(); - response->mutable_value()->Reserve(size); - std::transform( - response->value_raw().begin(), - response->value_raw().begin() + size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_value()), - [&](auto x) { - return checked_convert_value(x); - }); + response->mutable_value()->Clear(); + response->mutable_value()->Reserve(size); + std::transform( + response->value_raw().begin(), + response->value_raw().begin() + size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_value()), + [&](auto x) { + return checked_convert_value(x); + }); return ::grpc::Status::OK; } } @@ -15295,15 +15295,15 @@ ::grpc::Status MonikerWriteRaw(void* data, google::protobuf::Arena& arena, googl return ConvertApiErrorStatusForTaskHandle(context, status, task); } response->set_status(status); - response->mutable_read_array()->Clear(); - response->mutable_read_array()->Reserve(array_size_in_samps); - std::transform( - read_array.begin(), - read_array.begin() + array_size_in_samps, - google::protobuf::RepeatedFieldBackInserter(response->mutable_read_array()), - [&](auto x) { - return x; - }); + response->mutable_read_array()->Clear(); + response->mutable_read_array()->Reserve(array_size_in_samps); + std::transform( + read_array.begin(), + read_array.begin() + array_size_in_samps, + google::protobuf::RepeatedFieldBackInserter(response->mutable_read_array()), + [&](auto x) { + return x; + }); response->set_samps_per_chan_read(samps_per_chan_read); return ::grpc::Status::OK; } @@ -15503,15 +15503,15 @@ ::grpc::Status MonikerWriteRaw(void* data, google::protobuf::Arena& arena, googl return ConvertApiErrorStatusForTaskHandle(context, status, task); } response->set_status(status); - response->mutable_read_array()->Clear(); - response->mutable_read_array()->Reserve(array_size_in_samps); - std::transform( - read_array.begin(), - read_array.begin() + array_size_in_samps, - google::protobuf::RepeatedFieldBackInserter(response->mutable_read_array()), - [&](auto x) { - return x; - }); + response->mutable_read_array()->Clear(); + response->mutable_read_array()->Reserve(array_size_in_samps); + std::transform( + read_array.begin(), + read_array.begin() + array_size_in_samps, + google::protobuf::RepeatedFieldBackInserter(response->mutable_read_array()), + [&](auto x) { + return x; + }); response->set_samps_per_chan_read(samps_per_chan_read); return ::grpc::Status::OK; } @@ -16801,15 +16801,15 @@ ::grpc::Status MonikerWriteRaw(void* data, google::protobuf::Arena& arena, googl return ConvertApiErrorStatusForTaskHandle(context, status, task); } response->set_status(status); - response->mutable_read_array()->Clear(); - response->mutable_read_array()->Reserve(array_size_in_samps); - std::transform( - read_array.begin(), - read_array.begin() + array_size_in_samps, - google::protobuf::RepeatedFieldBackInserter(response->mutable_read_array()), - [&](auto x) { - return x; - }); + response->mutable_read_array()->Clear(); + response->mutable_read_array()->Reserve(array_size_in_samps); + std::transform( + read_array.begin(), + read_array.begin() + array_size_in_samps, + google::protobuf::RepeatedFieldBackInserter(response->mutable_read_array()), + [&](auto x) { + return x; + }); response->set_samps_per_chan_read(samps_per_chan_read); return ::grpc::Status::OK; } @@ -17110,24 +17110,24 @@ ::grpc::Status MonikerWriteRaw(void* data, google::protobuf::Arena& arena, googl return ConvertApiErrorStatusForTaskHandle(context, status, task); } response->set_status(status); - response->mutable_read_array_voltage()->Clear(); - response->mutable_read_array_voltage()->Reserve(array_size_in_samps); - std::transform( - read_array_voltage.begin(), - read_array_voltage.begin() + array_size_in_samps, - google::protobuf::RepeatedFieldBackInserter(response->mutable_read_array_voltage()), - [&](auto x) { - return x; - }); - response->mutable_read_array_current()->Clear(); - response->mutable_read_array_current()->Reserve(array_size_in_samps); - std::transform( - read_array_current.begin(), - read_array_current.begin() + array_size_in_samps, - google::protobuf::RepeatedFieldBackInserter(response->mutable_read_array_current()), - [&](auto x) { - return x; - }); + response->mutable_read_array_voltage()->Clear(); + response->mutable_read_array_voltage()->Reserve(array_size_in_samps); + std::transform( + read_array_voltage.begin(), + read_array_voltage.begin() + array_size_in_samps, + google::protobuf::RepeatedFieldBackInserter(response->mutable_read_array_voltage()), + [&](auto x) { + return x; + }); + response->mutable_read_array_current()->Clear(); + response->mutable_read_array_current()->Reserve(array_size_in_samps); + std::transform( + read_array_current.begin(), + read_array_current.begin() + array_size_in_samps, + google::protobuf::RepeatedFieldBackInserter(response->mutable_read_array_current()), + [&](auto x) { + return x; + }); response->set_samps_per_chan_read(samps_per_chan_read); return ::grpc::Status::OK; } @@ -17524,7 +17524,7 @@ ::grpc::Status MonikerWriteRaw(void* data, google::protobuf::Arena& arena, googl break; } } - + uInt32 n_samples = request->n_samples(); auto options = 0U; @@ -17595,7 +17595,7 @@ ::grpc::Status MonikerWriteRaw(void* data, google::protobuf::Arena& arena, googl break; } } - + auto options = 0U; auto status = library->RegisterSignalEvent(task, signal_id, options, CallbackRouter::handle_callback, handler->token()); diff --git a/generated/nifake_non_ivi/nifake_non_ivi_service.cpp b/generated/nifake_non_ivi/nifake_non_ivi_service.cpp index 5ac8c9a20..7a0673ee9 100644 --- a/generated/nifake_non_ivi/nifake_non_ivi_service.cpp +++ b/generated/nifake_non_ivi/nifake_non_ivi_service.cpp @@ -327,15 +327,15 @@ namespace nifake_non_ivi_grpc { auto valid_enum_value = raw_value_is_valid ? raw_value : 0; return static_cast(valid_enum_value); }; - response->mutable_value()->Clear(); - response->mutable_value()->Reserve(10); - std::transform( - response->value_raw().begin(), - response->value_raw().begin() + 10, - google::protobuf::RepeatedFieldBackInserter(response->mutable_value()), - [&](auto x) { - return checked_convert_value(x); - }); + response->mutable_value()->Clear(); + response->mutable_value()->Reserve(10); + std::transform( + response->value_raw().begin(), + response->value_raw().begin() + 10, + google::protobuf::RepeatedFieldBackInserter(response->mutable_value()), + [&](auto x) { + return checked_convert_value(x); + }); return ::grpc::Status::OK; } catch (nidevice_grpc::NonDriverException& ex) { @@ -662,33 +662,33 @@ namespace nifake_non_ivi_grpc { return ConvertApiErrorStatusForFakeHandle(context, status, 0); } response->set_status(status); - response->mutable_u16_data()->Clear(); - response->mutable_u16_data()->Reserve(number_of_u16_samples); - std::transform( - u16_data.begin(), - u16_data.begin() + number_of_u16_samples, - google::protobuf::RepeatedFieldBackInserter(response->mutable_u16_data()), - [&](auto x) { - return x; - }); - response->mutable_i16_data()->Clear(); - response->mutable_i16_data()->Reserve(number_of_i16_samples); - std::transform( - i16_data.begin(), - i16_data.begin() + number_of_i16_samples, - google::protobuf::RepeatedFieldBackInserter(response->mutable_i16_data()), - [&](auto x) { - return x; - }); - response->mutable_i8_data()->Clear(); - response->mutable_i8_data()->Reserve(number_of_i8_samples); - std::transform( - i8_data.begin(), - i8_data.begin() + number_of_i8_samples, - google::protobuf::RepeatedFieldBackInserter(response->mutable_i8_data()), - [&](auto x) { - return x; - }); + response->mutable_u16_data()->Clear(); + response->mutable_u16_data()->Reserve(number_of_u16_samples); + std::transform( + u16_data.begin(), + u16_data.begin() + number_of_u16_samples, + google::protobuf::RepeatedFieldBackInserter(response->mutable_u16_data()), + [&](auto x) { + return x; + }); + response->mutable_i16_data()->Clear(); + response->mutable_i16_data()->Reserve(number_of_i16_samples); + std::transform( + i16_data.begin(), + i16_data.begin() + number_of_i16_samples, + google::protobuf::RepeatedFieldBackInserter(response->mutable_i16_data()), + [&](auto x) { + return x; + }); + response->mutable_i8_data()->Clear(); + response->mutable_i8_data()->Reserve(number_of_i8_samples); + std::transform( + i8_data.begin(), + i8_data.begin() + number_of_i8_samples, + google::protobuf::RepeatedFieldBackInserter(response->mutable_i8_data()), + [&](auto x) { + return x; + }); return ::grpc::Status::OK; } catch (nidevice_grpc::NonDriverException& ex) { @@ -758,15 +758,15 @@ namespace nifake_non_ivi_grpc { } response->set_status(status); response->mutable_i32_data()->Resize(array_size_copy, 0); - response->mutable_u16_data()->Clear(); - response->mutable_u16_data()->Reserve(array_size_copy); - std::transform( - u16_data.begin(), - u16_data.begin() + array_size_copy, - google::protobuf::RepeatedFieldBackInserter(response->mutable_u16_data()), - [&](auto x) { - return x; - }); + response->mutable_u16_data()->Clear(); + response->mutable_u16_data()->Reserve(array_size_copy); + std::transform( + u16_data.begin(), + u16_data.begin() + array_size_copy, + google::protobuf::RepeatedFieldBackInserter(response->mutable_u16_data()), + [&](auto x) { + return x; + }); return ::grpc::Status::OK; } catch (nidevice_grpc::NonDriverException& ex) { diff --git a/generated/nifpga/nifpga.proto b/generated/nifpga/nifpga.proto index ec6660e20..6b723c160 100644 --- a/generated/nifpga/nifpga.proto +++ b/generated/nifpga/nifpga.proto @@ -244,61 +244,6 @@ enum RunAttribute { RUN_ATTRIBUTE_WAIT_UNTIL_DONE = 1; } -message I32Data { - int32 value = 1; -} - -message U32Data { - uint32 value = 1; -} - -message I64Data { - int64 value = 1; -} - -message U64Data { - uint64 value = 1; -} - -message BoolData { - bool value = 1; -} - -message FloatData { - float value = 1; -} - -message DoubleData { - double value = 1; -} - -message ArrayI32Data { - repeated int32 value = 1; -} - -message ArrayU32Data { - repeated uint32 value = 1; -} - -message ArrayI64Data { - repeated int64 value = 1; -} - -message ArrayU64Data { - repeated uint64 value = 1; -} - -message ArrayBoolData { - repeated bool value = 1; -} - -message ArrayFloatData { - repeated float value = 1; -} - -message ArrayDoubleData { - repeated double value = 1; -} message AbortRequest { nidevice_grpc.Session session = 1; } diff --git a/generated/nifpga/nifpga_service.cpp b/generated/nifpga/nifpga_service.cpp index 0ae7254f1..41e95ca15 100644 --- a/generated/nifpga/nifpga_service.cpp +++ b/generated/nifpga/nifpga_service.cpp @@ -475,8 +475,8 @@ namespace nifpga_grpc { ni::data_monikers::DataMonikerService::RegisterMonikerEndpoint("MonikerWriteU8", MonikerWriteU8); } -::grpc::Status MonikerReadArrayBool(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadArrayBool(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadArrayBoolData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -498,10 +498,10 @@ ::grpc::Status MonikerReadArrayBool(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadArrayDbl(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadArrayDbl(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadArrayDblData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -523,10 +523,10 @@ ::grpc::Status MonikerReadArrayDbl(void* data, google::protobuf::Arena& arena, g return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadArrayI16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadArrayI16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadArrayI16Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -540,15 +540,15 @@ ::grpc::Status MonikerReadArrayI16(void* data, google::protobuf::Arena& arena, g if (status >= 0) { response->set_status(status); - response->mutable_array()->Clear(); - response->mutable_array()->Reserve(size); - std::transform( - array.begin(), - array.begin() + size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_array()), - [&](auto x) { - return x; - }); + response->mutable_array()->Clear(); + response->mutable_array()->Reserve(size); + std::transform( + array.begin(), + array.begin() + size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_array()), + [&](auto x) { + return x; + }); packedData.PackFrom(*response); } else @@ -556,10 +556,10 @@ ::grpc::Status MonikerReadArrayI16(void* data, google::protobuf::Arena& arena, g return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadArrayI32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadArrayI32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadArrayI32Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -581,10 +581,10 @@ ::grpc::Status MonikerReadArrayI32(void* data, google::protobuf::Arena& arena, g return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadArrayI64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadArrayI64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadArrayI64Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -606,10 +606,10 @@ ::grpc::Status MonikerReadArrayI64(void* data, google::protobuf::Arena& arena, g return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadArrayI8(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadArrayI8(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadArrayI8Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -623,15 +623,15 @@ ::grpc::Status MonikerReadArrayI8(void* data, google::protobuf::Arena& arena, go if (status >= 0) { response->set_status(status); - response->mutable_array()->Clear(); - response->mutable_array()->Reserve(size); - std::transform( - array.begin(), - array.begin() + size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_array()), - [&](auto x) { - return x; - }); + response->mutable_array()->Clear(); + response->mutable_array()->Reserve(size); + std::transform( + array.begin(), + array.begin() + size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_array()), + [&](auto x) { + return x; + }); packedData.PackFrom(*response); } else @@ -639,10 +639,10 @@ ::grpc::Status MonikerReadArrayI8(void* data, google::protobuf::Arena& arena, go return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadArraySgl(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadArraySgl(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadArraySglData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -664,10 +664,10 @@ ::grpc::Status MonikerReadArraySgl(void* data, google::protobuf::Arena& arena, g return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadArrayU16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadArrayU16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadArrayU16Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -681,15 +681,15 @@ ::grpc::Status MonikerReadArrayU16(void* data, google::protobuf::Arena& arena, g if (status >= 0) { response->set_status(status); - response->mutable_array()->Clear(); - response->mutable_array()->Reserve(size); - std::transform( - array.begin(), - array.begin() + size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_array()), - [&](auto x) { - return x; - }); + response->mutable_array()->Clear(); + response->mutable_array()->Reserve(size); + std::transform( + array.begin(), + array.begin() + size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_array()), + [&](auto x) { + return x; + }); packedData.PackFrom(*response); } else @@ -697,10 +697,10 @@ ::grpc::Status MonikerReadArrayU16(void* data, google::protobuf::Arena& arena, g return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadArrayU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadArrayU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadArrayU32Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -722,10 +722,10 @@ ::grpc::Status MonikerReadArrayU32(void* data, google::protobuf::Arena& arena, g return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadArrayU64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadArrayU64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadArrayU64Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -747,10 +747,10 @@ ::grpc::Status MonikerReadArrayU64(void* data, google::protobuf::Arena& arena, g return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadArrayU8(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadArrayU8(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadArrayU8Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -764,15 +764,15 @@ ::grpc::Status MonikerReadArrayU8(void* data, google::protobuf::Arena& arena, go if (status >= 0) { response->set_status(status); - response->mutable_array()->Clear(); - response->mutable_array()->Reserve(size); - std::transform( - array.begin(), - array.begin() + size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_array()), - [&](auto x) { - return x; - }); + response->mutable_array()->Clear(); + response->mutable_array()->Reserve(size); + std::transform( + array.begin(), + array.begin() + size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_array()), + [&](auto x) { + return x; + }); packedData.PackFrom(*response); } else @@ -780,10 +780,10 @@ ::grpc::Status MonikerReadArrayU8(void* data, google::protobuf::Arena& arena, go return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadBool(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadBool(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadBoolData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -804,10 +804,10 @@ ::grpc::Status MonikerReadBool(void* data, google::protobuf::Arena& arena, googl return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadDbl(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadDbl(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadDblData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -828,10 +828,10 @@ ::grpc::Status MonikerReadDbl(void* data, google::protobuf::Arena& arena, google return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadI16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadI16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadI16Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -852,10 +852,10 @@ ::grpc::Status MonikerReadI16(void* data, google::protobuf::Arena& arena, google return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadI32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadI32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadI32Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -876,10 +876,10 @@ ::grpc::Status MonikerReadI32(void* data, google::protobuf::Arena& arena, google return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadI64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadI64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadI64Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -900,10 +900,10 @@ ::grpc::Status MonikerReadI64(void* data, google::protobuf::Arena& arena, google return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadI8(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadI8(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadI8Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -924,10 +924,10 @@ ::grpc::Status MonikerReadI8(void* data, google::protobuf::Arena& arena, google: return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadSgl(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadSgl(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadSglData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -948,10 +948,10 @@ ::grpc::Status MonikerReadSgl(void* data, google::protobuf::Arena& arena, google return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadU16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadU16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadU16Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -972,10 +972,10 @@ ::grpc::Status MonikerReadU16(void* data, google::protobuf::Arena& arena, google return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadU32Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -996,10 +996,10 @@ ::grpc::Status MonikerReadU32(void* data, google::protobuf::Arena& arena, google return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadU64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadU64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadU64Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1020,10 +1020,10 @@ ::grpc::Status MonikerReadU64(void* data, google::protobuf::Arena& arena, google return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerReadU8(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerReadU8(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerReadU8Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1044,10 +1044,10 @@ ::grpc::Status MonikerReadU8(void* data, google::protobuf::Arena& arena, google: return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteArrayBool(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteArrayBool(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteArrayBoolData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1056,8 +1056,8 @@ ::grpc::Status MonikerWriteArrayBool(void* data, google::protobuf::Arena& arena, auto request = &function_data->request; packedData.UnpackTo(request); - auto array = convert_from_grpc(request->array()); - size_t size = static_cast(request->array().size()); + auto array = convert_from_grpc(request->array()); + size_t size = static_cast(request->array().size()); auto status = library->WriteArrayBool(session, control, array.data(), size); @@ -1066,10 +1066,10 @@ ::grpc::Status MonikerWriteArrayBool(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteArrayDbl(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteArrayDbl(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteArrayDblData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1078,8 +1078,8 @@ ::grpc::Status MonikerWriteArrayDbl(void* data, google::protobuf::Arena& arena, auto request = &function_data->request; packedData.UnpackTo(request); - auto array = const_cast(request->array().data()); - size_t size = static_cast(request->array().size()); + auto array = const_cast(request->array().data()); + size_t size = static_cast(request->array().size()); auto status = library->WriteArrayDbl(session, control, array, size); @@ -1088,10 +1088,10 @@ ::grpc::Status MonikerWriteArrayDbl(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteArrayI16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteArrayI16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteArrayI16Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1100,25 +1100,25 @@ ::grpc::Status MonikerWriteArrayI16(void* data, google::protobuf::Arena& arena, auto request = &function_data->request; packedData.UnpackTo(request); - auto array_raw = request->array(); - auto array = std::vector(); - array.reserve(array_raw.size()); - std::transform( - array_raw.begin(), - array_raw.end(), - std::back_inserter(array), - [](auto x) { - if (x < std::numeric_limits::min() || x > std::numeric_limits::max()) { - std::string message("value "); - message.append(std::to_string(x)); - message.append(" doesn't fit in datatype "); - message.append("int16_t"); - throw nidevice_grpc::ValueOutOfRangeException(message); - } - return static_cast(x); - }); - - size_t size = static_cast(request->array().size()); + auto array_raw = request->array(); + auto array = std::vector(); + array.reserve(array_raw.size()); + std::transform( + array_raw.begin(), + array_raw.end(), + std::back_inserter(array), + [](auto x) { + if (x < std::numeric_limits::min() || x > std::numeric_limits::max()) { + std::string message("value "); + message.append(std::to_string(x)); + message.append(" doesn't fit in datatype "); + message.append("int16_t"); + throw nidevice_grpc::ValueOutOfRangeException(message); + } + return static_cast(x); + }); + + size_t size = static_cast(request->array().size()); auto status = library->WriteArrayI16(session, control, array.data(), size); @@ -1127,10 +1127,10 @@ ::grpc::Status MonikerWriteArrayI16(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteArrayI32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteArrayI32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteArrayI32Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1139,8 +1139,8 @@ ::grpc::Status MonikerWriteArrayI32(void* data, google::protobuf::Arena& arena, auto request = &function_data->request; packedData.UnpackTo(request); - auto array = const_cast(request->array().data()); - size_t size = static_cast(request->array().size()); + auto array = const_cast(request->array().data()); + size_t size = static_cast(request->array().size()); auto status = library->WriteArrayI32(session, control, array, size); @@ -1149,10 +1149,10 @@ ::grpc::Status MonikerWriteArrayI32(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteArrayI64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteArrayI64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteArrayI64Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1161,8 +1161,8 @@ ::grpc::Status MonikerWriteArrayI64(void* data, google::protobuf::Arena& arena, auto request = &function_data->request; packedData.UnpackTo(request); - auto array = const_cast(request->array().data()); - size_t size = static_cast(request->array().size()); + auto array = const_cast(request->array().data()); + size_t size = static_cast(request->array().size()); auto status = library->WriteArrayI64(session, control, array, size); @@ -1171,10 +1171,10 @@ ::grpc::Status MonikerWriteArrayI64(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteArrayI8(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteArrayI8(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteArrayI8Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1183,25 +1183,25 @@ ::grpc::Status MonikerWriteArrayI8(void* data, google::protobuf::Arena& arena, g auto request = &function_data->request; packedData.UnpackTo(request); - auto array_raw = request->array(); - auto array = std::vector(); - array.reserve(array_raw.size()); - std::transform( - array_raw.begin(), - array_raw.end(), - std::back_inserter(array), - [](auto x) { - if (x < std::numeric_limits::min() || x > std::numeric_limits::max()) { - std::string message("value "); - message.append(std::to_string(x)); - message.append(" doesn't fit in datatype "); - message.append("int8_t"); - throw nidevice_grpc::ValueOutOfRangeException(message); - } - return static_cast(x); - }); - - size_t size = static_cast(request->array().size()); + auto array_raw = request->array(); + auto array = std::vector(); + array.reserve(array_raw.size()); + std::transform( + array_raw.begin(), + array_raw.end(), + std::back_inserter(array), + [](auto x) { + if (x < std::numeric_limits::min() || x > std::numeric_limits::max()) { + std::string message("value "); + message.append(std::to_string(x)); + message.append(" doesn't fit in datatype "); + message.append("int8_t"); + throw nidevice_grpc::ValueOutOfRangeException(message); + } + return static_cast(x); + }); + + size_t size = static_cast(request->array().size()); auto status = library->WriteArrayI8(session, control, array.data(), size); @@ -1210,10 +1210,10 @@ ::grpc::Status MonikerWriteArrayI8(void* data, google::protobuf::Arena& arena, g return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteArraySgl(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteArraySgl(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteArraySglData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1222,8 +1222,8 @@ ::grpc::Status MonikerWriteArraySgl(void* data, google::protobuf::Arena& arena, auto request = &function_data->request; packedData.UnpackTo(request); - auto array = const_cast(request->array().data()); - size_t size = static_cast(request->array().size()); + auto array = const_cast(request->array().data()); + size_t size = static_cast(request->array().size()); auto status = library->WriteArraySgl(session, control, array, size); @@ -1232,10 +1232,10 @@ ::grpc::Status MonikerWriteArraySgl(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteArrayU16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteArrayU16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteArrayU16Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1244,25 +1244,25 @@ ::grpc::Status MonikerWriteArrayU16(void* data, google::protobuf::Arena& arena, auto request = &function_data->request; packedData.UnpackTo(request); - auto array_raw = request->array(); - auto array = std::vector(); - array.reserve(array_raw.size()); - std::transform( - array_raw.begin(), - array_raw.end(), - std::back_inserter(array), - [](auto x) { - if (x < std::numeric_limits::min() || x > std::numeric_limits::max()) { - std::string message("value "); - message.append(std::to_string(x)); - message.append(" doesn't fit in datatype "); - message.append("uint16_t"); - throw nidevice_grpc::ValueOutOfRangeException(message); - } - return static_cast(x); - }); - - size_t size = static_cast(request->array().size()); + auto array_raw = request->array(); + auto array = std::vector(); + array.reserve(array_raw.size()); + std::transform( + array_raw.begin(), + array_raw.end(), + std::back_inserter(array), + [](auto x) { + if (x < std::numeric_limits::min() || x > std::numeric_limits::max()) { + std::string message("value "); + message.append(std::to_string(x)); + message.append(" doesn't fit in datatype "); + message.append("uint16_t"); + throw nidevice_grpc::ValueOutOfRangeException(message); + } + return static_cast(x); + }); + + size_t size = static_cast(request->array().size()); auto status = library->WriteArrayU16(session, control, array.data(), size); @@ -1271,10 +1271,10 @@ ::grpc::Status MonikerWriteArrayU16(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteArrayU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteArrayU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteArrayU32Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1283,8 +1283,8 @@ ::grpc::Status MonikerWriteArrayU32(void* data, google::protobuf::Arena& arena, auto request = &function_data->request; packedData.UnpackTo(request); - auto array = const_cast(request->array().data()); - size_t size = static_cast(request->array().size()); + auto array = const_cast(request->array().data()); + size_t size = static_cast(request->array().size()); auto status = library->WriteArrayU32(session, control, array, size); @@ -1293,10 +1293,10 @@ ::grpc::Status MonikerWriteArrayU32(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteArrayU64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteArrayU64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteArrayU64Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1305,8 +1305,8 @@ ::grpc::Status MonikerWriteArrayU64(void* data, google::protobuf::Arena& arena, auto request = &function_data->request; packedData.UnpackTo(request); - auto array = const_cast(request->array().data()); - size_t size = static_cast(request->array().size()); + auto array = const_cast(request->array().data()); + size_t size = static_cast(request->array().size()); auto status = library->WriteArrayU64(session, control, array, size); @@ -1315,10 +1315,10 @@ ::grpc::Status MonikerWriteArrayU64(void* data, google::protobuf::Arena& arena, return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteArrayU8(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteArrayU8(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteArrayU8Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1327,25 +1327,25 @@ ::grpc::Status MonikerWriteArrayU8(void* data, google::protobuf::Arena& arena, g auto request = &function_data->request; packedData.UnpackTo(request); - auto array_raw = request->array(); - auto array = std::vector(); - array.reserve(array_raw.size()); - std::transform( - array_raw.begin(), - array_raw.end(), - std::back_inserter(array), - [](auto x) { - if (x < std::numeric_limits::min() || x > std::numeric_limits::max()) { - std::string message("value "); - message.append(std::to_string(x)); - message.append(" doesn't fit in datatype "); - message.append("uint8_t"); - throw nidevice_grpc::ValueOutOfRangeException(message); - } - return static_cast(x); - }); - - size_t size = static_cast(request->array().size()); + auto array_raw = request->array(); + auto array = std::vector(); + array.reserve(array_raw.size()); + std::transform( + array_raw.begin(), + array_raw.end(), + std::back_inserter(array), + [](auto x) { + if (x < std::numeric_limits::min() || x > std::numeric_limits::max()) { + std::string message("value "); + message.append(std::to_string(x)); + message.append(" doesn't fit in datatype "); + message.append("uint8_t"); + throw nidevice_grpc::ValueOutOfRangeException(message); + } + return static_cast(x); + }); + + size_t size = static_cast(request->array().size()); auto status = library->WriteArrayU8(session, control, array.data(), size); @@ -1354,10 +1354,10 @@ ::grpc::Status MonikerWriteArrayU8(void* data, google::protobuf::Arena& arena, g return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteBool(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteBool(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteBoolData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1366,7 +1366,7 @@ ::grpc::Status MonikerWriteBool(void* data, google::protobuf::Arena& arena, goog auto request = &function_data->request; packedData.UnpackTo(request); - NiFpga_Bool value = request->value(); + NiFpga_Bool value = request->value(); auto status = library->WriteBool(session, control, value); @@ -1375,10 +1375,10 @@ ::grpc::Status MonikerWriteBool(void* data, google::protobuf::Arena& arena, goog return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteDbl(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteDbl(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteDblData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1387,7 +1387,7 @@ ::grpc::Status MonikerWriteDbl(void* data, google::protobuf::Arena& arena, googl auto request = &function_data->request; packedData.UnpackTo(request); - double value = request->value(); + double value = request->value(); auto status = library->WriteDbl(session, control, value); @@ -1396,10 +1396,10 @@ ::grpc::Status MonikerWriteDbl(void* data, google::protobuf::Arena& arena, googl return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteI16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteI16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteI16Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1408,15 +1408,15 @@ ::grpc::Status MonikerWriteI16(void* data, google::protobuf::Arena& arena, googl auto request = &function_data->request; packedData.UnpackTo(request); - auto value_raw = request->value(); - if (value_raw < std::numeric_limits::min() || value_raw > std::numeric_limits::max()) { - std::string message("value "); - message.append(std::to_string(value_raw)); - message.append(" doesn't fit in datatype "); - message.append("int16_t"); - throw nidevice_grpc::ValueOutOfRangeException(message); - } - auto value = static_cast(value_raw); + auto value_raw = request->value(); + if (value_raw < std::numeric_limits::min() || value_raw > std::numeric_limits::max()) { + std::string message("value "); + message.append(std::to_string(value_raw)); + message.append(" doesn't fit in datatype "); + message.append("int16_t"); + throw nidevice_grpc::ValueOutOfRangeException(message); + } + auto value = static_cast(value_raw); auto status = library->WriteI16(session, control, value); @@ -1426,10 +1426,10 @@ ::grpc::Status MonikerWriteI16(void* data, google::protobuf::Arena& arena, googl return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteI32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteI32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteI32Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1438,7 +1438,7 @@ ::grpc::Status MonikerWriteI32(void* data, google::protobuf::Arena& arena, googl auto request = &function_data->request; packedData.UnpackTo(request); - int32_t value = request->value(); + int32_t value = request->value(); auto status = library->WriteI32(session, control, value); @@ -1447,10 +1447,10 @@ ::grpc::Status MonikerWriteI32(void* data, google::protobuf::Arena& arena, googl return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteI64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteI64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteI64Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1459,7 +1459,7 @@ ::grpc::Status MonikerWriteI64(void* data, google::protobuf::Arena& arena, googl auto request = &function_data->request; packedData.UnpackTo(request); - int64_t value = request->value(); + int64_t value = request->value(); auto status = library->WriteI64(session, control, value); @@ -1468,10 +1468,10 @@ ::grpc::Status MonikerWriteI64(void* data, google::protobuf::Arena& arena, googl return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteI8(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteI8(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteI8Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1480,15 +1480,15 @@ ::grpc::Status MonikerWriteI8(void* data, google::protobuf::Arena& arena, google auto request = &function_data->request; packedData.UnpackTo(request); - auto value_raw = request->value(); - if (value_raw < std::numeric_limits::min() || value_raw > std::numeric_limits::max()) { - std::string message("value "); - message.append(std::to_string(value_raw)); - message.append(" doesn't fit in datatype "); - message.append("int8_t"); - throw nidevice_grpc::ValueOutOfRangeException(message); - } - auto value = static_cast(value_raw); + auto value_raw = request->value(); + if (value_raw < std::numeric_limits::min() || value_raw > std::numeric_limits::max()) { + std::string message("value "); + message.append(std::to_string(value_raw)); + message.append(" doesn't fit in datatype "); + message.append("int8_t"); + throw nidevice_grpc::ValueOutOfRangeException(message); + } + auto value = static_cast(value_raw); auto status = library->WriteI8(session, control, value); @@ -1498,10 +1498,10 @@ ::grpc::Status MonikerWriteI8(void* data, google::protobuf::Arena& arena, google return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteSgl(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteSgl(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteSglData* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1510,7 +1510,7 @@ ::grpc::Status MonikerWriteSgl(void* data, google::protobuf::Arena& arena, googl auto request = &function_data->request; packedData.UnpackTo(request); - float value = request->value(); + float value = request->value(); auto status = library->WriteSgl(session, control, value); @@ -1519,10 +1519,10 @@ ::grpc::Status MonikerWriteSgl(void* data, google::protobuf::Arena& arena, googl return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteU16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteU16(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteU16Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1531,15 +1531,15 @@ ::grpc::Status MonikerWriteU16(void* data, google::protobuf::Arena& arena, googl auto request = &function_data->request; packedData.UnpackTo(request); - auto value_raw = request->value(); - if (value_raw < std::numeric_limits::min() || value_raw > std::numeric_limits::max()) { - std::string message("value "); - message.append(std::to_string(value_raw)); - message.append(" doesn't fit in datatype "); - message.append("uint16_t"); - throw nidevice_grpc::ValueOutOfRangeException(message); - } - auto value = static_cast(value_raw); + auto value_raw = request->value(); + if (value_raw < std::numeric_limits::min() || value_raw > std::numeric_limits::max()) { + std::string message("value "); + message.append(std::to_string(value_raw)); + message.append(" doesn't fit in datatype "); + message.append("uint16_t"); + throw nidevice_grpc::ValueOutOfRangeException(message); + } + auto value = static_cast(value_raw); auto status = library->WriteU16(session, control, value); @@ -1549,10 +1549,10 @@ ::grpc::Status MonikerWriteU16(void* data, google::protobuf::Arena& arena, googl return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteU32(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteU32Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1561,7 +1561,7 @@ ::grpc::Status MonikerWriteU32(void* data, google::protobuf::Arena& arena, googl auto request = &function_data->request; packedData.UnpackTo(request); - uint32_t value = request->value(); + uint32_t value = request->value(); auto status = library->WriteU32(session, control, value); @@ -1570,10 +1570,10 @@ ::grpc::Status MonikerWriteU32(void* data, google::protobuf::Arena& arena, googl return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteU64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteU64(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteU64Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1582,7 +1582,7 @@ ::grpc::Status MonikerWriteU64(void* data, google::protobuf::Arena& arena, googl auto request = &function_data->request; packedData.UnpackTo(request); - uint64_t value = request->value(); + uint64_t value = request->value(); auto status = library->WriteU64(session, control, value); @@ -1591,10 +1591,10 @@ ::grpc::Status MonikerWriteU64(void* data, google::protobuf::Arena& arena, googl return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } -::grpc::Status MonikerWriteU8(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status MonikerWriteU8(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { MonikerWriteU8Data* function_data = static_cast(data); auto library = function_data->library; auto response = &function_data->response; @@ -1603,15 +1603,15 @@ ::grpc::Status MonikerWriteU8(void* data, google::protobuf::Arena& arena, google auto request = &function_data->request; packedData.UnpackTo(request); - auto value_raw = request->value(); - if (value_raw < std::numeric_limits::min() || value_raw > std::numeric_limits::max()) { - std::string message("value "); - message.append(std::to_string(value_raw)); - message.append(" doesn't fit in datatype "); - message.append("uint8_t"); - throw nidevice_grpc::ValueOutOfRangeException(message); - } - auto value = static_cast(value_raw); + auto value_raw = request->value(); + if (value_raw < std::numeric_limits::min() || value_raw > std::numeric_limits::max()) { + std::string message("value "); + message.append(std::to_string(value_raw)); + message.append(" doesn't fit in datatype "); + message.append("uint8_t"); + throw nidevice_grpc::ValueOutOfRangeException(message); + } + auto value = static_cast(value_raw); auto status = library->WriteU8(session, control, value); @@ -1621,7 +1621,7 @@ ::grpc::Status MonikerWriteU8(void* data, google::protobuf::Arena& arena, google return ::grpc::Status(grpc::StatusCode::UNKNOWN, "ni-error: " + status); } return ::grpc::Status::OK; -} + } //--------------------------------------------------------------------- //--------------------------------------------------------------------- @@ -2263,15 +2263,15 @@ ::grpc::Status MonikerWriteU8(void* data, google::protobuf::Arena& arena, google return ConvertApiErrorStatusForNiFpga_Session(context, status, session); } response->set_status(status); - response->mutable_array()->Clear(); - response->mutable_array()->Reserve(size); - std::transform( - array.begin(), - array.begin() + size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_array()), - [&](auto x) { - return x; - }); + response->mutable_array()->Clear(); + response->mutable_array()->Reserve(size); + std::transform( + array.begin(), + array.begin() + size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_array()), + [&](auto x) { + return x; + }); return ::grpc::Status::OK; } catch (nidevice_grpc::NonDriverException& ex) { @@ -2445,15 +2445,15 @@ ::grpc::Status MonikerWriteU8(void* data, google::protobuf::Arena& arena, google return ConvertApiErrorStatusForNiFpga_Session(context, status, session); } response->set_status(status); - response->mutable_array()->Clear(); - response->mutable_array()->Reserve(size); - std::transform( - array.begin(), - array.begin() + size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_array()), - [&](auto x) { - return x; - }); + response->mutable_array()->Clear(); + response->mutable_array()->Reserve(size); + std::transform( + array.begin(), + array.begin() + size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_array()), + [&](auto x) { + return x; + }); return ::grpc::Status::OK; } catch (nidevice_grpc::NonDriverException& ex) { @@ -2569,15 +2569,15 @@ ::grpc::Status MonikerWriteU8(void* data, google::protobuf::Arena& arena, google return ConvertApiErrorStatusForNiFpga_Session(context, status, session); } response->set_status(status); - response->mutable_array()->Clear(); - response->mutable_array()->Reserve(size); - std::transform( - array.begin(), - array.begin() + size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_array()), - [&](auto x) { - return x; - }); + response->mutable_array()->Clear(); + response->mutable_array()->Reserve(size); + std::transform( + array.begin(), + array.begin() + size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_array()), + [&](auto x) { + return x; + }); return ::grpc::Status::OK; } catch (nidevice_grpc::NonDriverException& ex) { @@ -2751,15 +2751,15 @@ ::grpc::Status MonikerWriteU8(void* data, google::protobuf::Arena& arena, google return ConvertApiErrorStatusForNiFpga_Session(context, status, session); } response->set_status(status); - response->mutable_array()->Clear(); - response->mutable_array()->Reserve(size); - std::transform( - array.begin(), - array.begin() + size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_array()), - [&](auto x) { - return x; - }); + response->mutable_array()->Clear(); + response->mutable_array()->Reserve(size); + std::transform( + array.begin(), + array.begin() + size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_array()), + [&](auto x) { + return x; + }); return ::grpc::Status::OK; } catch (nidevice_grpc::NonDriverException& ex) { @@ -2983,15 +2983,15 @@ ::grpc::Status MonikerWriteU8(void* data, google::protobuf::Arena& arena, google return ConvertApiErrorStatusForNiFpga_Session(context, status, session); } response->set_status(status); - response->mutable_data()->Clear(); - response->mutable_data()->Reserve(number_of_elements); - std::transform( - data.begin(), - data.begin() + number_of_elements, - google::protobuf::RepeatedFieldBackInserter(response->mutable_data()), - [&](auto x) { - return x; - }); + response->mutable_data()->Clear(); + response->mutable_data()->Reserve(number_of_elements); + std::transform( + data.begin(), + data.begin() + number_of_elements, + google::protobuf::RepeatedFieldBackInserter(response->mutable_data()), + [&](auto x) { + return x; + }); response->set_elements_remaining(elements_remaining); return ::grpc::Status::OK; } @@ -3078,15 +3078,15 @@ ::grpc::Status MonikerWriteU8(void* data, google::protobuf::Arena& arena, google return ConvertApiErrorStatusForNiFpga_Session(context, status, session); } response->set_status(status); - response->mutable_data()->Clear(); - response->mutable_data()->Reserve(number_of_elements); - std::transform( - data.begin(), - data.begin() + number_of_elements, - google::protobuf::RepeatedFieldBackInserter(response->mutable_data()), - [&](auto x) { - return x; - }); + response->mutable_data()->Clear(); + response->mutable_data()->Reserve(number_of_elements); + std::transform( + data.begin(), + data.begin() + number_of_elements, + google::protobuf::RepeatedFieldBackInserter(response->mutable_data()), + [&](auto x) { + return x; + }); response->set_elements_remaining(elements_remaining); return ::grpc::Status::OK; } @@ -3144,15 +3144,15 @@ ::grpc::Status MonikerWriteU8(void* data, google::protobuf::Arena& arena, google return ConvertApiErrorStatusForNiFpga_Session(context, status, session); } response->set_status(status); - response->mutable_data()->Clear(); - response->mutable_data()->Reserve(number_of_elements); - std::transform( - data.begin(), - data.begin() + number_of_elements, - google::protobuf::RepeatedFieldBackInserter(response->mutable_data()), - [&](auto x) { - return x; - }); + response->mutable_data()->Clear(); + response->mutable_data()->Reserve(number_of_elements); + std::transform( + data.begin(), + data.begin() + number_of_elements, + google::protobuf::RepeatedFieldBackInserter(response->mutable_data()), + [&](auto x) { + return x; + }); response->set_elements_remaining(elements_remaining); return ::grpc::Status::OK; } @@ -3239,15 +3239,15 @@ ::grpc::Status MonikerWriteU8(void* data, google::protobuf::Arena& arena, google return ConvertApiErrorStatusForNiFpga_Session(context, status, session); } response->set_status(status); - response->mutable_data()->Clear(); - response->mutable_data()->Reserve(number_of_elements); - std::transform( - data.begin(), - data.begin() + number_of_elements, - google::protobuf::RepeatedFieldBackInserter(response->mutable_data()), - [&](auto x) { - return x; - }); + response->mutable_data()->Clear(); + response->mutable_data()->Reserve(number_of_elements); + std::transform( + data.begin(), + data.begin() + number_of_elements, + google::protobuf::RepeatedFieldBackInserter(response->mutable_data()), + [&](auto x) { + return x; + }); response->set_elements_remaining(elements_remaining); return ::grpc::Status::OK; } diff --git a/generated/nirfmxbluetooth/nirfmxbluetooth_service.cpp b/generated/nirfmxbluetooth/nirfmxbluetooth_service.cpp index 0155a16c7..09c7a5932 100644 --- a/generated/nirfmxbluetooth/nirfmxbluetooth_service.cpp +++ b/generated/nirfmxbluetooth/nirfmxbluetooth_service.cpp @@ -2041,15 +2041,15 @@ namespace nirfmxbluetooth_grpc { auto valid_enum_value = raw_value_is_valid ? raw_value : 0; return static_cast(valid_enum_value); }; - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - response->attr_val_raw().begin(), - response->attr_val_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return checked_convert_attr_val(x); - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + response->attr_val_raw().begin(), + response->attr_val_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return checked_convert_attr_val(x); + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -2185,15 +2185,15 @@ namespace nirfmxbluetooth_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - attr_val.begin(), - attr_val.begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return x; - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + attr_val.begin(), + attr_val.begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return x; + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -3164,15 +3164,15 @@ namespace nirfmxbluetooth_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_demodulated_bits()->Clear(); - response->mutable_demodulated_bits()->Reserve(actual_array_size); - std::transform( - demodulated_bits.begin(), - demodulated_bits.begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_demodulated_bits()), - [&](auto x) { - return x; - }); + response->mutable_demodulated_bits()->Clear(); + response->mutable_demodulated_bits()->Reserve(actual_array_size); + std::transform( + demodulated_bits.begin(), + demodulated_bits.begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_demodulated_bits()), + [&](auto x) { + return x; + }); response->mutable_demodulated_bits()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; diff --git a/generated/nirfmxcdma2k/nirfmxcdma2k_service.cpp b/generated/nirfmxcdma2k/nirfmxcdma2k_service.cpp index fa9fc513f..a3d4660b9 100644 --- a/generated/nirfmxcdma2k/nirfmxcdma2k_service.cpp +++ b/generated/nirfmxcdma2k/nirfmxcdma2k_service.cpp @@ -2831,15 +2831,15 @@ namespace nirfmxcdma2k_grpc { auto valid_enum_value = raw_value_is_valid ? raw_value : 0; return static_cast(valid_enum_value); }; - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - response->attr_val_raw().begin(), - response->attr_val_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return checked_convert_attr_val(x); - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + response->attr_val_raw().begin(), + response->attr_val_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return checked_convert_attr_val(x); + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -2975,15 +2975,15 @@ namespace nirfmxcdma2k_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - attr_val.begin(), - attr_val.begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return x; - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + attr_val.begin(), + attr_val.begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return x; + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -3731,15 +3731,15 @@ namespace nirfmxcdma2k_grpc { response->set_status(status); response->mutable_detected_walsh_code_length()->Resize(actual_array_size, 0); response->mutable_detected_walsh_code_number()->Resize(actual_array_size, 0); - response->mutable_detected_branch()->Clear(); - response->mutable_detected_branch()->Reserve(actual_array_size); - std::transform( - response->detected_branch_raw().begin(), - response->detected_branch_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_detected_branch()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_detected_branch()->Clear(); + response->mutable_detected_branch()->Reserve(actual_array_size); + std::transform( + response->detected_branch_raw().begin(), + response->detected_branch_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_detected_branch()), + [&](auto x) { + return static_cast(x); + }); response->mutable_detected_branch()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -4896,15 +4896,15 @@ namespace nirfmxcdma2k_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_measurement_status()->Clear(); - response->mutable_measurement_status()->Reserve(actual_array_size); - std::transform( - response->measurement_status_raw().begin(), - response->measurement_status_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_measurement_status()->Clear(); + response->mutable_measurement_status()->Reserve(actual_array_size); + std::transform( + response->measurement_status_raw().begin(), + response->measurement_status_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), + [&](auto x) { + return static_cast(x); + }); response->mutable_measurement_status()->Resize(actual_array_size, 0); response->mutable_margin()->Resize(actual_array_size, 0); response->mutable_margin_frequency()->Resize(actual_array_size, 0); @@ -5161,15 +5161,15 @@ namespace nirfmxcdma2k_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_measurement_status()->Clear(); - response->mutable_measurement_status()->Reserve(actual_array_size); - std::transform( - response->measurement_status_raw().begin(), - response->measurement_status_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_measurement_status()->Clear(); + response->mutable_measurement_status()->Reserve(actual_array_size); + std::transform( + response->measurement_status_raw().begin(), + response->measurement_status_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), + [&](auto x) { + return static_cast(x); + }); response->mutable_measurement_status()->Resize(actual_array_size, 0); response->mutable_margin()->Resize(actual_array_size, 0); response->mutable_margin_frequency()->Resize(actual_array_size, 0); diff --git a/generated/nirfmxdemod/nirfmxdemod_service.cpp b/generated/nirfmxdemod/nirfmxdemod_service.cpp index 50427fa3f..3ffaa4ae8 100644 --- a/generated/nirfmxdemod/nirfmxdemod_service.cpp +++ b/generated/nirfmxdemod/nirfmxdemod_service.cpp @@ -2653,15 +2653,15 @@ namespace nirfmxdemod_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_demodulated_bits()->Clear(); - response->mutable_demodulated_bits()->Reserve(actual_array_size); - std::transform( - demodulated_bits.begin(), - demodulated_bits.begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_demodulated_bits()), - [&](auto x) { - return x; - }); + response->mutable_demodulated_bits()->Clear(); + response->mutable_demodulated_bits()->Reserve(actual_array_size); + std::transform( + demodulated_bits.begin(), + demodulated_bits.begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_demodulated_bits()), + [&](auto x) { + return x; + }); response->mutable_demodulated_bits()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -4231,15 +4231,15 @@ namespace nirfmxdemod_grpc { auto valid_enum_value = raw_value_is_valid ? raw_value : 0; return static_cast(valid_enum_value); }; - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - response->attr_val_raw().begin(), - response->attr_val_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return checked_convert_attr_val(x); - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + response->attr_val_raw().begin(), + response->attr_val_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return checked_convert_attr_val(x); + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -4375,15 +4375,15 @@ namespace nirfmxdemod_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - attr_val.begin(), - attr_val.begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return x; - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + attr_val.begin(), + attr_val.begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return x; + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; diff --git a/generated/nirfmxgsm/nirfmxgsm_service.cpp b/generated/nirfmxgsm/nirfmxgsm_service.cpp index e206d2938..16142b8fe 100644 --- a/generated/nirfmxgsm/nirfmxgsm_service.cpp +++ b/generated/nirfmxgsm/nirfmxgsm_service.cpp @@ -1588,15 +1588,15 @@ namespace nirfmxgsm_grpc { auto valid_enum_value = raw_value_is_valid ? raw_value : 0; return static_cast(valid_enum_value); }; - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - response->attr_val_raw().begin(), - response->attr_val_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return checked_convert_attr_val(x); - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + response->attr_val_raw().begin(), + response->attr_val_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return checked_convert_attr_val(x); + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -1732,15 +1732,15 @@ namespace nirfmxgsm_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - attr_val.begin(), - attr_val.begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return x; - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + attr_val.begin(), + attr_val.begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return x; + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -2488,15 +2488,15 @@ namespace nirfmxgsm_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_demodulated_bits()->Clear(); - response->mutable_demodulated_bits()->Reserve(actual_array_size); - std::transform( - demodulated_bits.begin(), - demodulated_bits.begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_demodulated_bits()), - [&](auto x) { - return x; - }); + response->mutable_demodulated_bits()->Clear(); + response->mutable_demodulated_bits()->Reserve(actual_array_size); + std::transform( + demodulated_bits.begin(), + demodulated_bits.begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_demodulated_bits()), + [&](auto x) { + return x; + }); response->mutable_demodulated_bits()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -2566,15 +2566,15 @@ namespace nirfmxgsm_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_detected_tsc()->Clear(); - response->mutable_detected_tsc()->Reserve(actual_array_size); - std::transform( - response->detected_tsc_raw().begin(), - response->detected_tsc_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_detected_tsc()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_detected_tsc()->Clear(); + response->mutable_detected_tsc()->Reserve(actual_array_size); + std::transform( + response->detected_tsc_raw().begin(), + response->detected_tsc_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_detected_tsc()), + [&](auto x) { + return static_cast(x); + }); response->mutable_detected_tsc()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -3602,15 +3602,15 @@ namespace nirfmxgsm_grpc { response->set_status(status); response->mutable_slot_average_power()->Resize(actual_array_size, 0); response->mutable_slot_burst_width()->Resize(actual_array_size, 0); - response->mutable_slot_measurement_status()->Clear(); - response->mutable_slot_measurement_status()->Reserve(actual_array_size); - std::transform( - response->slot_measurement_status_raw().begin(), - response->slot_measurement_status_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_slot_measurement_status()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_slot_measurement_status()->Clear(); + response->mutable_slot_measurement_status()->Reserve(actual_array_size); + std::transform( + response->slot_measurement_status_raw().begin(), + response->slot_measurement_status_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_slot_measurement_status()), + [&](auto x) { + return static_cast(x); + }); response->mutable_slot_measurement_status()->Resize(actual_array_size, 0); response->mutable_slot_maximum_power()->Resize(actual_array_size, 0); response->mutable_slot_minimum_power()->Resize(actual_array_size, 0); diff --git a/generated/nirfmxinstr/nirfmxinstr_service.cpp b/generated/nirfmxinstr/nirfmxinstr_service.cpp index 03758fb01..2d6426fc9 100644 --- a/generated/nirfmxinstr/nirfmxinstr_service.cpp +++ b/generated/nirfmxinstr/nirfmxinstr_service.cpp @@ -1128,15 +1128,15 @@ namespace nirfmxinstr_grpc { auto valid_enum_value = raw_value_is_valid ? raw_value : 0; return static_cast(valid_enum_value); }; - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - response->attr_val_raw().begin(), - response->attr_val_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return checked_convert_attr_val(x); - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + response->attr_val_raw().begin(), + response->attr_val_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return checked_convert_attr_val(x); + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -1272,15 +1272,15 @@ namespace nirfmxinstr_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - attr_val.begin(), - attr_val.begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return x; - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + attr_val.begin(), + attr_val.begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return x; + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -1897,15 +1897,15 @@ namespace nirfmxinstr_grpc { response->set_list_names(list_names_utf8); nidevice_grpc::converters::trim_trailing_nulls(*(response->mutable_list_names())); response->set_actual_list_names_size(actual_list_names_size); - response->mutable_personality()->Clear(); - response->mutable_personality()->Reserve(actual_personality_array_size); - std::transform( - response->personality_raw().begin(), - response->personality_raw().begin() + actual_personality_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_personality()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_personality()->Clear(); + response->mutable_personality()->Reserve(actual_personality_array_size); + std::transform( + response->personality_raw().begin(), + response->personality_raw().begin() + actual_personality_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_personality()), + [&](auto x) { + return static_cast(x); + }); response->mutable_personality()->Resize(actual_personality_array_size, 0); response->set_actual_personality_array_size(actual_personality_array_size); return ::grpc::Status::OK; diff --git a/generated/nirfmxlte/nirfmxlte_service.cpp b/generated/nirfmxlte/nirfmxlte_service.cpp index 2380904e1..675584722 100644 --- a/generated/nirfmxlte/nirfmxlte_service.cpp +++ b/generated/nirfmxlte/nirfmxlte_service.cpp @@ -4244,15 +4244,15 @@ namespace nirfmxlte_grpc { auto valid_enum_value = raw_value_is_valid ? raw_value : 0; return static_cast(valid_enum_value); }; - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - response->attr_val_raw().begin(), - response->attr_val_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return checked_convert_attr_val(x); - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + response->attr_val_raw().begin(), + response->attr_val_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return checked_convert_attr_val(x); + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -4388,15 +4388,15 @@ namespace nirfmxlte_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - attr_val.begin(), - attr_val.begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return x; - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + attr_val.begin(), + attr_val.begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return x; + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -8264,15 +8264,15 @@ namespace nirfmxlte_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_bits()->Clear(); - response->mutable_bits()->Reserve(actual_array_size); - std::transform( - bits.begin(), - bits.begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_bits()), - [&](auto x) { - return x; - }); + response->mutable_bits()->Clear(); + response->mutable_bits()->Reserve(actual_array_size); + std::transform( + bits.begin(), + bits.begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_bits()), + [&](auto x) { + return x; + }); response->mutable_bits()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -9459,15 +9459,15 @@ namespace nirfmxlte_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_measurement_status()->Clear(); - response->mutable_measurement_status()->Reserve(actual_array_size); - std::transform( - response->measurement_status_raw().begin(), - response->measurement_status_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_measurement_status()->Clear(); + response->mutable_measurement_status()->Reserve(actual_array_size); + std::transform( + response->measurement_status_raw().begin(), + response->measurement_status_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), + [&](auto x) { + return static_cast(x); + }); response->mutable_measurement_status()->Resize(actual_array_size, 0); response->mutable_mean_absolute_off_power_before()->Resize(actual_array_size, 0); response->mutable_mean_absolute_off_power_after()->Resize(actual_array_size, 0); @@ -10434,15 +10434,15 @@ namespace nirfmxlte_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_measurement_status()->Clear(); - response->mutable_measurement_status()->Reserve(actual_array_size); - std::transform( - response->measurement_status_raw().begin(), - response->measurement_status_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_measurement_status()->Clear(); + response->mutable_measurement_status()->Reserve(actual_array_size); + std::transform( + response->measurement_status_raw().begin(), + response->measurement_status_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), + [&](auto x) { + return static_cast(x); + }); response->mutable_measurement_status()->Resize(actual_array_size, 0); response->mutable_margin()->Resize(actual_array_size, 0); response->mutable_margin_frequency()->Resize(actual_array_size, 0); @@ -10754,15 +10754,15 @@ namespace nirfmxlte_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_measurement_status()->Clear(); - response->mutable_measurement_status()->Reserve(actual_array_size); - std::transform( - response->measurement_status_raw().begin(), - response->measurement_status_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_measurement_status()->Clear(); + response->mutable_measurement_status()->Reserve(actual_array_size); + std::transform( + response->measurement_status_raw().begin(), + response->measurement_status_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), + [&](auto x) { + return static_cast(x); + }); response->mutable_measurement_status()->Resize(actual_array_size, 0); response->mutable_margin()->Resize(actual_array_size, 0); response->mutable_margin_frequency()->Resize(actual_array_size, 0); diff --git a/generated/nirfmxnr/nirfmxnr_service.cpp b/generated/nirfmxnr/nirfmxnr_service.cpp index 57d0bd923..f6aa25637 100644 --- a/generated/nirfmxnr/nirfmxnr_service.cpp +++ b/generated/nirfmxnr/nirfmxnr_service.cpp @@ -3018,15 +3018,15 @@ namespace nirfmxnr_grpc { auto valid_enum_value = raw_value_is_valid ? raw_value : 0; return static_cast(valid_enum_value); }; - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - response->attr_val_raw().begin(), - response->attr_val_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return checked_convert_attr_val(x); - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + response->attr_val_raw().begin(), + response->attr_val_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return checked_convert_attr_val(x); + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -3162,15 +3162,15 @@ namespace nirfmxnr_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - attr_val.begin(), - attr_val.begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return x; - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + attr_val.begin(), + attr_val.begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return x; + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -5211,15 +5211,15 @@ namespace nirfmxnr_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_bits()->Clear(); - response->mutable_bits()->Reserve(actual_array_size); - std::transform( - bits.begin(), - bits.begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_bits()), - [&](auto x) { - return x; - }); + response->mutable_bits()->Clear(); + response->mutable_bits()->Reserve(actual_array_size); + std::transform( + bits.begin(), + bits.begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_bits()), + [&](auto x) { + return x; + }); response->mutable_bits()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -5805,15 +5805,15 @@ namespace nirfmxnr_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_bits()->Clear(); - response->mutable_bits()->Reserve(actual_array_size); - std::transform( - bits.begin(), - bits.begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_bits()), - [&](auto x) { - return x; - }); + response->mutable_bits()->Clear(); + response->mutable_bits()->Reserve(actual_array_size); + std::transform( + bits.begin(), + bits.begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_bits()), + [&](auto x) { + return x; + }); response->mutable_bits()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -7192,15 +7192,15 @@ namespace nirfmxnr_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_measurement_status()->Clear(); - response->mutable_measurement_status()->Reserve(actual_array_size); - std::transform( - response->measurement_status_raw().begin(), - response->measurement_status_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_measurement_status()->Clear(); + response->mutable_measurement_status()->Reserve(actual_array_size); + std::transform( + response->measurement_status_raw().begin(), + response->measurement_status_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), + [&](auto x) { + return static_cast(x); + }); response->mutable_measurement_status()->Resize(actual_array_size, 0); response->mutable_absolute_off_power_before()->Resize(actual_array_size, 0); response->mutable_absolute_off_power_after()->Resize(actual_array_size, 0); @@ -8180,15 +8180,15 @@ namespace nirfmxnr_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_measurement_status()->Clear(); - response->mutable_measurement_status()->Reserve(actual_array_size); - std::transform( - response->measurement_status_raw().begin(), - response->measurement_status_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_measurement_status()->Clear(); + response->mutable_measurement_status()->Reserve(actual_array_size); + std::transform( + response->measurement_status_raw().begin(), + response->measurement_status_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), + [&](auto x) { + return static_cast(x); + }); response->mutable_measurement_status()->Resize(actual_array_size, 0); response->mutable_margin()->Resize(actual_array_size, 0); response->mutable_margin_frequency()->Resize(actual_array_size, 0); @@ -8500,15 +8500,15 @@ namespace nirfmxnr_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_measurement_status()->Clear(); - response->mutable_measurement_status()->Reserve(actual_array_size); - std::transform( - response->measurement_status_raw().begin(), - response->measurement_status_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_measurement_status()->Clear(); + response->mutable_measurement_status()->Reserve(actual_array_size); + std::transform( + response->measurement_status_raw().begin(), + response->measurement_status_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), + [&](auto x) { + return static_cast(x); + }); response->mutable_measurement_status()->Resize(actual_array_size, 0); response->mutable_margin()->Resize(actual_array_size, 0); response->mutable_margin_frequency()->Resize(actual_array_size, 0); diff --git a/generated/nirfmxpulse/nirfmxpulse_service.cpp b/generated/nirfmxpulse/nirfmxpulse_service.cpp index ec6853183..e473702ff 100644 --- a/generated/nirfmxpulse/nirfmxpulse_service.cpp +++ b/generated/nirfmxpulse/nirfmxpulse_service.cpp @@ -1811,15 +1811,15 @@ namespace nirfmxpulse_grpc { auto valid_enum_value = raw_value_is_valid ? raw_value : 0; return static_cast(valid_enum_value); }; - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - response->attr_val_raw().begin(), - response->attr_val_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return checked_convert_attr_val(x); - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + response->attr_val_raw().begin(), + response->attr_val_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return checked_convert_attr_val(x); + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -1955,15 +1955,15 @@ namespace nirfmxpulse_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - attr_val.begin(), - attr_val.begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return x; - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + attr_val.begin(), + attr_val.begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return x; + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; diff --git a/generated/nirfmxspecan/nirfmxspecan_service.cpp b/generated/nirfmxspecan/nirfmxspecan_service.cpp index 2cb2ce512..50ff0c352 100644 --- a/generated/nirfmxspecan/nirfmxspecan_service.cpp +++ b/generated/nirfmxspecan/nirfmxspecan_service.cpp @@ -7430,15 +7430,15 @@ namespace nirfmxspecan_grpc { auto valid_enum_value = raw_value_is_valid ? raw_value : 0; return static_cast(valid_enum_value); }; - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - response->attr_val_raw().begin(), - response->attr_val_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return checked_convert_attr_val(x); - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + response->attr_val_raw().begin(), + response->attr_val_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return checked_convert_attr_val(x); + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -7574,15 +7574,15 @@ namespace nirfmxspecan_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - attr_val.begin(), - attr_val.begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return x; - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + attr_val.begin(), + attr_val.begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return x; + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -14631,15 +14631,15 @@ namespace nirfmxspecan_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_measurement_status()->Clear(); - response->mutable_measurement_status()->Reserve(actual_array_size); - std::transform( - response->measurement_status_raw().begin(), - response->measurement_status_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_measurement_status()->Clear(); + response->mutable_measurement_status()->Reserve(actual_array_size); + std::transform( + response->measurement_status_raw().begin(), + response->measurement_status_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), + [&](auto x) { + return static_cast(x); + }); response->mutable_measurement_status()->Resize(actual_array_size, 0); response->mutable_margin()->Resize(actual_array_size, 0); response->mutable_margin_frequency()->Resize(actual_array_size, 0); @@ -14934,15 +14934,15 @@ namespace nirfmxspecan_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_measurement_status()->Clear(); - response->mutable_measurement_status()->Reserve(actual_array_size); - std::transform( - response->measurement_status_raw().begin(), - response->measurement_status_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_measurement_status()->Clear(); + response->mutable_measurement_status()->Reserve(actual_array_size); + std::transform( + response->measurement_status_raw().begin(), + response->measurement_status_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), + [&](auto x) { + return static_cast(x); + }); response->mutable_measurement_status()->Resize(actual_array_size, 0); response->mutable_margin()->Resize(actual_array_size, 0); response->mutable_margin_frequency()->Resize(actual_array_size, 0); @@ -17512,15 +17512,15 @@ namespace nirfmxspecan_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_range_status()->Clear(); - response->mutable_range_status()->Reserve(actual_array_size); - std::transform( - response->range_status_raw().begin(), - response->range_status_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_range_status()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_range_status()->Clear(); + response->mutable_range_status()->Reserve(actual_array_size); + std::transform( + response->range_status_raw().begin(), + response->range_status_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_range_status()), + [&](auto x) { + return static_cast(x); + }); response->mutable_range_status()->Resize(actual_array_size, 0); response->mutable_number_of_detected_spurs()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); diff --git a/generated/nirfmxtdscdma/nirfmxtdscdma_service.cpp b/generated/nirfmxtdscdma/nirfmxtdscdma_service.cpp index f19da56f5..1297b7dbd 100644 --- a/generated/nirfmxtdscdma/nirfmxtdscdma_service.cpp +++ b/generated/nirfmxtdscdma/nirfmxtdscdma_service.cpp @@ -3002,15 +3002,15 @@ namespace nirfmxtdscdma_grpc { auto valid_enum_value = raw_value_is_valid ? raw_value : 0; return static_cast(valid_enum_value); }; - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - response->attr_val_raw().begin(), - response->attr_val_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return checked_convert_attr_val(x); - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + response->attr_val_raw().begin(), + response->attr_val_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return checked_convert_attr_val(x); + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -3146,15 +3146,15 @@ namespace nirfmxtdscdma_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - attr_val.begin(), - attr_val.begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return x; - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + attr_val.begin(), + attr_val.begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return x; + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -4197,15 +4197,15 @@ namespace nirfmxtdscdma_grpc { response->set_status(status); response->mutable_detected_slot_index()->Resize(actual_array_size, 0); response->mutable_detected_spreading_factor()->Resize(actual_array_size, 0); - response->mutable_detected_modulation_type()->Clear(); - response->mutable_detected_modulation_type()->Reserve(actual_array_size); - std::transform( - response->detected_modulation_type_raw().begin(), - response->detected_modulation_type_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_detected_modulation_type()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_detected_modulation_type()->Clear(); + response->mutable_detected_modulation_type()->Reserve(actual_array_size); + std::transform( + response->detected_modulation_type_raw().begin(), + response->detected_modulation_type_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_detected_modulation_type()), + [&](auto x) { + return static_cast(x); + }); response->mutable_detected_modulation_type()->Resize(actual_array_size, 0); response->mutable_detected_channelization_code()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); @@ -5153,15 +5153,15 @@ namespace nirfmxtdscdma_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_segment_status()->Clear(); - response->mutable_segment_status()->Reserve(actual_array_size); - std::transform( - response->segment_status_raw().begin(), - response->segment_status_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_segment_status()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_segment_status()->Clear(); + response->mutable_segment_status()->Reserve(actual_array_size); + std::transform( + response->segment_status_raw().begin(), + response->segment_status_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_segment_status()), + [&](auto x) { + return static_cast(x); + }); response->mutable_segment_status()->Resize(actual_array_size, 0); response->mutable_segment_margin()->Resize(actual_array_size, 0); response->mutable_segment_margin_time()->Resize(actual_array_size, 0); @@ -5474,15 +5474,15 @@ namespace nirfmxtdscdma_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_measurement_status()->Clear(); - response->mutable_measurement_status()->Reserve(actual_array_size); - std::transform( - response->measurement_status_raw().begin(), - response->measurement_status_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_measurement_status()->Clear(); + response->mutable_measurement_status()->Reserve(actual_array_size); + std::transform( + response->measurement_status_raw().begin(), + response->measurement_status_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), + [&](auto x) { + return static_cast(x); + }); response->mutable_measurement_status()->Resize(actual_array_size, 0); response->mutable_margin()->Resize(actual_array_size, 0); response->mutable_margin_frequency()->Resize(actual_array_size, 0); @@ -5739,15 +5739,15 @@ namespace nirfmxtdscdma_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_measurement_status()->Clear(); - response->mutable_measurement_status()->Reserve(actual_array_size); - std::transform( - response->measurement_status_raw().begin(), - response->measurement_status_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_measurement_status()->Clear(); + response->mutable_measurement_status()->Reserve(actual_array_size); + std::transform( + response->measurement_status_raw().begin(), + response->measurement_status_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), + [&](auto x) { + return static_cast(x); + }); response->mutable_measurement_status()->Resize(actual_array_size, 0); response->mutable_margin()->Resize(actual_array_size, 0); response->mutable_margin_frequency()->Resize(actual_array_size, 0); diff --git a/generated/nirfmxvna/nirfmxvna_service.cpp b/generated/nirfmxvna/nirfmxvna_service.cpp index 55ff7c64c..a5a35b8a0 100644 --- a/generated/nirfmxvna/nirfmxvna_service.cpp +++ b/generated/nirfmxvna/nirfmxvna_service.cpp @@ -960,15 +960,15 @@ namespace nirfmxvna_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_calibration_element_types()->Clear(); - response->mutable_calibration_element_types()->Reserve(actual_array_size); - std::transform( - response->calibration_element_types_raw().begin(), - response->calibration_element_types_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_calibration_element_types()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_calibration_element_types()->Clear(); + response->mutable_calibration_element_types()->Reserve(actual_array_size); + std::transform( + response->calibration_element_types_raw().begin(), + response->calibration_element_types_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_calibration_element_types()), + [&](auto x) { + return static_cast(x); + }); response->mutable_calibration_element_types()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -4356,15 +4356,15 @@ namespace nirfmxvna_grpc { auto valid_enum_value = raw_value_is_valid ? raw_value : 0; return static_cast(valid_enum_value); }; - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - response->attr_val_raw().begin(), - response->attr_val_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return checked_convert_attr_val(x); - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + response->attr_val_raw().begin(), + response->attr_val_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return checked_convert_attr_val(x); + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -4500,15 +4500,15 @@ namespace nirfmxvna_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - attr_val.begin(), - attr_val.begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return x; - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + attr_val.begin(), + attr_val.begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return x; + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; diff --git a/generated/nirfmxwcdma/nirfmxwcdma_service.cpp b/generated/nirfmxwcdma/nirfmxwcdma_service.cpp index 3a356ab36..37a8c1f99 100644 --- a/generated/nirfmxwcdma/nirfmxwcdma_service.cpp +++ b/generated/nirfmxwcdma/nirfmxwcdma_service.cpp @@ -3251,15 +3251,15 @@ namespace nirfmxwcdma_grpc { auto valid_enum_value = raw_value_is_valid ? raw_value : 0; return static_cast(valid_enum_value); }; - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - response->attr_val_raw().begin(), - response->attr_val_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return checked_convert_attr_val(x); - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + response->attr_val_raw().begin(), + response->attr_val_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return checked_convert_attr_val(x); + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -3395,15 +3395,15 @@ namespace nirfmxwcdma_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - attr_val.begin(), - attr_val.begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return x; - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + attr_val.begin(), + attr_val.begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return x; + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -4229,25 +4229,25 @@ namespace nirfmxwcdma_grpc { response->set_status(status); response->mutable_detected_spreading_factor()->Resize(actual_array_size, 0); response->mutable_detected_spreading_code()->Resize(actual_array_size, 0); - response->mutable_detected_modulation_type()->Clear(); - response->mutable_detected_modulation_type()->Reserve(actual_array_size); - std::transform( - response->detected_modulation_type_raw().begin(), - response->detected_modulation_type_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_detected_modulation_type()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_detected_modulation_type()->Clear(); + response->mutable_detected_modulation_type()->Reserve(actual_array_size); + std::transform( + response->detected_modulation_type_raw().begin(), + response->detected_modulation_type_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_detected_modulation_type()), + [&](auto x) { + return static_cast(x); + }); response->mutable_detected_modulation_type()->Resize(actual_array_size, 0); - response->mutable_detected_branch()->Clear(); - response->mutable_detected_branch()->Reserve(actual_array_size); - std::transform( - response->detected_branch_raw().begin(), - response->detected_branch_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_detected_branch()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_detected_branch()->Clear(); + response->mutable_detected_branch()->Reserve(actual_array_size); + std::transform( + response->detected_branch_raw().begin(), + response->detected_branch_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_detected_branch()), + [&](auto x) { + return static_cast(x); + }); response->mutable_detected_branch()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -5949,15 +5949,15 @@ namespace nirfmxwcdma_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_measurement_status()->Clear(); - response->mutable_measurement_status()->Reserve(actual_array_size); - std::transform( - response->measurement_status_raw().begin(), - response->measurement_status_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_measurement_status()->Clear(); + response->mutable_measurement_status()->Reserve(actual_array_size); + std::transform( + response->measurement_status_raw().begin(), + response->measurement_status_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), + [&](auto x) { + return static_cast(x); + }); response->mutable_measurement_status()->Resize(actual_array_size, 0); response->mutable_margin()->Resize(actual_array_size, 0); response->mutable_margin_frequency()->Resize(actual_array_size, 0); @@ -6241,15 +6241,15 @@ namespace nirfmxwcdma_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_measurement_status()->Clear(); - response->mutable_measurement_status()->Reserve(actual_array_size); - std::transform( - response->measurement_status_raw().begin(), - response->measurement_status_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_measurement_status()->Clear(); + response->mutable_measurement_status()->Reserve(actual_array_size); + std::transform( + response->measurement_status_raw().begin(), + response->measurement_status_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), + [&](auto x) { + return static_cast(x); + }); response->mutable_measurement_status()->Resize(actual_array_size, 0); response->mutable_margin()->Resize(actual_array_size, 0); response->mutable_margin_frequency()->Resize(actual_array_size, 0); diff --git a/generated/nirfmxwlan/nirfmxwlan_service.cpp b/generated/nirfmxwlan/nirfmxwlan_service.cpp index 5162040e9..cd3a259fe 100644 --- a/generated/nirfmxwlan/nirfmxwlan_service.cpp +++ b/generated/nirfmxwlan/nirfmxwlan_service.cpp @@ -2461,15 +2461,15 @@ namespace nirfmxwlan_grpc { auto valid_enum_value = raw_value_is_valid ? raw_value : 0; return static_cast(valid_enum_value); }; - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - response->attr_val_raw().begin(), - response->attr_val_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return checked_convert_attr_val(x); - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + response->attr_val_raw().begin(), + response->attr_val_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return checked_convert_attr_val(x); + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -2605,15 +2605,15 @@ namespace nirfmxwlan_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_attr_val()->Clear(); - response->mutable_attr_val()->Reserve(actual_array_size); - std::transform( - attr_val.begin(), - attr_val.begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), - [&](auto x) { - return x; - }); + response->mutable_attr_val()->Clear(); + response->mutable_attr_val()->Reserve(actual_array_size); + std::transform( + attr_val.begin(), + attr_val.begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_attr_val()), + [&](auto x) { + return x; + }); response->mutable_attr_val()->Resize(actual_array_size, 0); response->set_actual_array_size(actual_array_size); return ::grpc::Status::OK; @@ -7771,15 +7771,15 @@ namespace nirfmxwlan_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_measurement_status()->Clear(); - response->mutable_measurement_status()->Reserve(actual_array_size); - std::transform( - response->measurement_status_raw().begin(), - response->measurement_status_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_measurement_status()->Clear(); + response->mutable_measurement_status()->Reserve(actual_array_size); + std::transform( + response->measurement_status_raw().begin(), + response->measurement_status_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), + [&](auto x) { + return static_cast(x); + }); response->mutable_measurement_status()->Resize(actual_array_size, 0); response->mutable_margin()->Resize(actual_array_size, 0); response->mutable_margin_frequency()->Resize(actual_array_size, 0); @@ -8033,15 +8033,15 @@ namespace nirfmxwlan_grpc { return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument); } response->set_status(status); - response->mutable_measurement_status()->Clear(); - response->mutable_measurement_status()->Reserve(actual_array_size); - std::transform( - response->measurement_status_raw().begin(), - response->measurement_status_raw().begin() + actual_array_size, - google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), - [&](auto x) { - return static_cast(x); - }); + response->mutable_measurement_status()->Clear(); + response->mutable_measurement_status()->Reserve(actual_array_size); + std::transform( + response->measurement_status_raw().begin(), + response->measurement_status_raw().begin() + actual_array_size, + google::protobuf::RepeatedFieldBackInserter(response->mutable_measurement_status()), + [&](auto x) { + return static_cast(x); + }); response->mutable_measurement_status()->Resize(actual_array_size, 0); response->mutable_margin()->Resize(actual_array_size, 0); response->mutable_margin_frequency()->Resize(actual_array_size, 0); diff --git a/source/codegen/common_helpers.py b/source/codegen/common_helpers.py index 8eb14c426..9e0f4605d 100644 --- a/source/codegen/common_helpers.py +++ b/source/codegen/common_helpers.py @@ -836,7 +836,9 @@ def indent_text_to_level(text, level): result = "" indentation = level * " " for line in text.splitlines(True): - result = result + indentation + line + if line.strip(): + result += indentation + result += line return result return lambda text: indent_text_to_level(text, level) diff --git a/source/codegen/metadata/nidaqmx/custom_proto.mako b/source/codegen/metadata/nidaqmx/custom_proto.mako deleted file mode 100644 index b15758d35..000000000 --- a/source/codegen/metadata/nidaqmx/custom_proto.mako +++ /dev/null @@ -1,35 +0,0 @@ -message DoubleData { - double value = 1; -} - -message I32Data { - int32 value = 1; -} - -message BoolData { - bool value = 1; -} - -message U32Data { - uint32 value = 1; -} - -message ArrayDoubleData { - repeated double value = 1; -} - -message ArrayI16Data { - repeated int32 value = 1; -} - -message ArrayI32Data { - repeated int32 value = 1; -} - -message ArrayU16Data { - repeated uint32 value = 1; -} - -message ArrayU32Data { - repeated uint32 value = 1; -} \ No newline at end of file diff --git a/source/codegen/metadata/nidaqmx/functions.py b/source/codegen/metadata/nidaqmx/functions.py index 68ce37ab0..a39c7bb0c 100644 --- a/source/codegen/metadata/nidaqmx/functions.py +++ b/source/codegen/metadata/nidaqmx/functions.py @@ -17588,7 +17588,6 @@ { 'ctypes_data_type': 'numpy.float64', 'direction': 'out', - 'grpc_streaming_type': 'ArrayDoubleData', 'has_explicit_buffer_size': True, 'is_list': True, 'is_optional_in_python': False, @@ -17612,7 +17611,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanRead', @@ -17667,7 +17665,6 @@ { 'ctypes_data_type': 'ctypes.c_double', 'direction': 'out', - 'grpc_streaming_type': 'DoubleData', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'value', @@ -17742,7 +17739,6 @@ 'coerced': True, 'ctypes_data_type': 'numpy.int16', 'direction': 'out', - 'grpc_streaming_type': 'ArrayI16Data', 'has_explicit_buffer_size': True, 'is_list': True, 'is_optional_in_python': False, @@ -17766,7 +17762,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanRead', @@ -17842,7 +17837,6 @@ { 'ctypes_data_type': 'numpy.int32', 'direction': 'out', - 'grpc_streaming_type': 'ArrayI32Data', 'has_explicit_buffer_size': True, 'is_list': True, 'is_optional_in_python': False, @@ -17866,7 +17860,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanRead', @@ -17943,7 +17936,6 @@ 'coerced': True, 'ctypes_data_type': 'numpy.uint16', 'direction': 'out', - 'grpc_streaming_type': 'ArrayU16Data', 'has_explicit_buffer_size': True, 'is_list': True, 'is_optional_in_python': False, @@ -17967,7 +17959,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanRead', @@ -18043,7 +18034,6 @@ { 'ctypes_data_type': 'numpy.uint32', 'direction': 'out', - 'grpc_streaming_type': 'ArrayU32Data', 'has_explicit_buffer_size': True, 'is_list': True, 'is_optional_in_python': False, @@ -18067,7 +18057,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanRead', @@ -18132,7 +18121,6 @@ { 'ctypes_data_type': 'numpy.float64', 'direction': 'out', - 'grpc_streaming_type': 'ArrayDoubleData', 'has_explicit_buffer_size': True, 'is_list': True, 'is_optional_in_python': False, @@ -18156,7 +18144,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanRead', @@ -18232,7 +18219,6 @@ { 'ctypes_data_type': 'numpy.float64', 'direction': 'out', - 'grpc_streaming_type': 'ArrayDoubleData', 'has_explicit_buffer_size': True, 'is_list': True, 'is_optional_in_python': False, @@ -18256,7 +18242,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanRead', @@ -18311,7 +18296,6 @@ { 'ctypes_data_type': 'ctypes.c_double', 'direction': 'out', - 'grpc_streaming_type': 'DoubleData', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'value', @@ -18364,7 +18348,6 @@ { 'ctypes_data_type': 'ctypes.c_uint', 'direction': 'out', - 'grpc_streaming_type': 'U32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'value', @@ -18427,7 +18410,6 @@ { 'ctypes_data_type': 'numpy.uint32', 'direction': 'out', - 'grpc_streaming_type': 'ArrayU32Data', 'has_explicit_buffer_size': True, 'is_list': True, 'is_optional_in_python': False, @@ -18451,7 +18433,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanRead', @@ -18527,7 +18508,6 @@ { 'ctypes_data_type': 'numpy.uint32', 'direction': 'out', - 'grpc_streaming_type': 'ArrayU32Data', 'has_explicit_buffer_size': True, 'is_list': True, 'is_optional_in_python': False, @@ -18551,7 +18531,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanRead', @@ -18627,7 +18606,6 @@ { 'ctypes_data_type': 'numpy.float64', 'direction': 'out', - 'grpc_streaming_type': 'ArrayDoubleData', 'is_list': True, 'is_optional_in_python': False, 'is_streaming_type': True, @@ -18643,7 +18621,6 @@ { 'ctypes_data_type': 'numpy.float64', 'direction': 'out', - 'grpc_streaming_type': 'ArrayDoubleData', 'is_list': True, 'is_optional_in_python': False, 'is_streaming_type': True, @@ -18665,7 +18642,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanRead', @@ -18720,7 +18696,6 @@ { 'ctypes_data_type': 'ctypes.c_double', 'direction': 'out', - 'grpc_streaming_type': 'DoubleData', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'frequency', @@ -18731,7 +18706,6 @@ { 'ctypes_data_type': 'ctypes.c_double', 'direction': 'out', - 'grpc_streaming_type': 'DoubleData', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'dutyCycle', @@ -18804,7 +18778,6 @@ { 'ctypes_data_type': 'numpy.uint32', 'direction': 'out', - 'grpc_streaming_type': 'ArrayU32Data', 'is_list': True, 'is_optional_in_python': False, 'is_streaming_type': True, @@ -18820,7 +18793,6 @@ { 'ctypes_data_type': 'numpy.uint32', 'direction': 'out', - 'grpc_streaming_type': 'ArrayU32Data', 'is_list': True, 'is_optional_in_python': False, 'is_streaming_type': True, @@ -18842,7 +18814,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanRead', @@ -18897,7 +18868,6 @@ { 'ctypes_data_type': 'ctypes.c_uint32', 'direction': 'out', - 'grpc_streaming_type': 'U32Data', 'is_streaming_type': True, 'name': 'highTicks', 'python_data_type': 'int', @@ -18906,7 +18876,6 @@ { 'ctypes_data_type': 'ctypes.c_uint32', 'direction': 'out', - 'grpc_streaming_type': 'U32Data', 'is_streaming_type': True, 'name': 'lowTicks', 'python_data_type': 'int', @@ -18977,7 +18946,6 @@ { 'ctypes_data_type': 'numpy.float64', 'direction': 'out', - 'grpc_streaming_type': 'ArrayDoubleData', 'is_list': True, 'is_optional_in_python': False, 'is_streaming_type': True, @@ -18993,7 +18961,6 @@ { 'ctypes_data_type': 'numpy.float64', 'direction': 'out', - 'grpc_streaming_type': 'ArrayDoubleData', 'is_list': True, 'is_optional_in_python': False, 'is_streaming_type': True, @@ -19015,7 +18982,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanRead', @@ -19070,7 +19036,6 @@ { 'ctypes_data_type': 'ctypes.c_double', 'direction': 'out', - 'grpc_streaming_type': 'DoubleData', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'highTime', @@ -19081,7 +19046,6 @@ { 'ctypes_data_type': 'ctypes.c_double', 'direction': 'out', - 'grpc_streaming_type': 'DoubleData', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'lowTime', @@ -19154,7 +19118,6 @@ { 'ctypes_data_type': 'numpy.bool', 'direction': 'out', - 'grpc_streaming_type': 'ArrayU8Data', 'has_explicit_buffer_size': True, 'is_list': True, 'is_optional_in_python': False, @@ -19178,7 +19141,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanRead', @@ -19243,7 +19205,6 @@ { 'ctypes_data_type': 'ctypes.c_uint', 'direction': 'out', - 'grpc_streaming_type': 'U32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'value', @@ -19318,7 +19279,6 @@ 'coerced': True, 'ctypes_data_type': 'numpy.uint16', 'direction': 'out', - 'grpc_streaming_type': 'ArrayU16Data', 'has_explicit_buffer_size': True, 'is_list': True, 'is_optional_in_python': False, @@ -19342,7 +19302,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanRead', @@ -19418,7 +19377,6 @@ { 'ctypes_data_type': 'numpy.uint32', 'direction': 'out', - 'grpc_streaming_type': 'ArrayU32Data', 'has_explicit_buffer_size': True, 'is_list': True, 'is_optional_in_python': False, @@ -19442,7 +19400,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanRead', @@ -19518,7 +19475,6 @@ { 'ctypes_data_type': 'numpy.uint8', 'direction': 'out', - 'grpc_streaming_type': 'ArrayU8Data', 'has_explicit_buffer_size': True, 'is_list': True, 'is_optional_in_python': False, @@ -19542,7 +19498,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanRead', @@ -19619,7 +19574,6 @@ 'coerced': True, 'ctypes_data_type': 'numpy.generic', 'direction': 'out', - 'grpc_streaming_type': 'ArrayI16Data', 'is_list': True, 'is_streaming_type': True, 'name': 'readArrayVoltage', @@ -19634,7 +19588,6 @@ 'coerced': True, 'ctypes_data_type': 'numpy.generic', 'direction': 'out', - 'grpc_streaming_type': 'ArrayI16Data', 'is_list': True, 'is_streaming_type': True, 'name': 'readArrayCurrent', @@ -19655,7 +19608,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanRead', @@ -19731,7 +19683,6 @@ { 'ctypes_data_type': 'numpy.float64', 'direction': 'out', - 'grpc_streaming_type': 'ArrayDoubleData', 'is_list': True, 'is_streaming_type': True, 'name': 'readArrayVoltage', @@ -19745,7 +19696,6 @@ { 'ctypes_data_type': 'numpy.float64', 'direction': 'out', - 'grpc_streaming_type': 'ArrayDoubleData', 'is_list': True, 'is_streaming_type': True, 'name': 'readArrayCurrent', @@ -19766,7 +19716,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanRead', @@ -19821,7 +19770,6 @@ { 'ctypes_data_type': 'ctypes.c_double', 'direction': 'out', - 'grpc_streaming_type': 'DoubleData', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'voltage', @@ -19833,7 +19781,6 @@ { 'ctypes_data_type': 'ctypes.c_double', 'direction': 'out', - 'grpc_streaming_type': 'DoubleData', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'current', @@ -19896,7 +19843,6 @@ { 'ctypes_data_type': 'numpy.generic', 'direction': 'out', - 'grpc_streaming_type': 'ArrayU8Data', 'has_explicit_buffer_size': True, 'is_list': True, 'is_optional_in_python': False, @@ -19919,7 +19865,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsRead', @@ -19932,7 +19877,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'numBytesPerSamp', @@ -24059,7 +24003,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'BoolData', 'is_streaming_type': True, 'name': 'isLate', 'type': 'bool32' @@ -24216,7 +24159,6 @@ { 'ctypes_data_type': 'numpy.float64', 'direction': 'in', - 'grpc_streaming_type': 'ArrayDoubleData', 'is_list': True, 'is_optional_in_python': False, 'is_streaming_type': True, @@ -24229,7 +24171,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanWritten', @@ -24293,7 +24234,6 @@ { 'ctypes_data_type': 'ctypes.c_double', 'direction': 'in', - 'grpc_streaming_type': 'DoubleData', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'value', @@ -24378,7 +24318,6 @@ 'coerced': True, 'ctypes_data_type': 'numpy.int16', 'direction': 'in', - 'grpc_streaming_type': 'ArrayI16Data', 'is_list': True, 'is_optional_in_python': False, 'is_streaming_type': True, @@ -24391,7 +24330,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanWritten', @@ -24476,7 +24414,6 @@ { 'ctypes_data_type': 'numpy.int32', 'direction': 'in', - 'grpc_streaming_type': 'ArrayI32Data', 'is_list': True, 'is_optional_in_python': False, 'is_streaming_type': True, @@ -24489,7 +24426,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanWritten', @@ -24575,7 +24511,6 @@ 'coerced': True, 'ctypes_data_type': 'numpy.uint16', 'direction': 'in', - 'grpc_streaming_type': 'ArrayU16Data', 'is_list': True, 'is_optional_in_python': False, 'is_streaming_type': True, @@ -24588,7 +24523,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanWritten', @@ -24673,7 +24607,6 @@ { 'ctypes_data_type': 'numpy.uint32', 'direction': 'in', - 'grpc_streaming_type': 'ArrayU32Data', 'is_list': True, 'is_optional_in_python': False, 'is_streaming_type': True, @@ -24686,7 +24619,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanWritten', @@ -24771,7 +24703,6 @@ { 'ctypes_data_type': 'numpy.float64', 'direction': 'in', - 'grpc_streaming_type': 'ArrayDoubleData', 'is_list': True, 'is_optional_in_python': False, 'is_streaming_type': True, @@ -24783,7 +24714,6 @@ { 'ctypes_data_type': 'numpy.float64', 'direction': 'in', - 'grpc_streaming_type': 'ArrayDoubleData', 'is_list': True, 'is_optional_in_python': False, 'is_streaming_type': True, @@ -24795,7 +24725,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'numSampsPerChanWritten', @@ -24859,7 +24788,6 @@ { 'ctypes_data_type': 'ctypes.c_double', 'direction': 'in', - 'grpc_streaming_type': 'DoubleData', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'frequency', @@ -24870,7 +24798,6 @@ { 'ctypes_data_type': 'ctypes.c_double', 'direction': 'in', - 'grpc_streaming_type': 'DoubleData', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'dutyCycle', @@ -24953,7 +24880,6 @@ { 'ctypes_data_type': 'numpy.uint32', 'direction': 'in', - 'grpc_streaming_type': 'ArrayU32Data', 'is_list': True, 'is_optional_in_python': False, 'is_streaming_type': True, @@ -24965,7 +24891,6 @@ { 'ctypes_data_type': 'numpy.uint32', 'direction': 'in', - 'grpc_streaming_type': 'ArrayU32Data', 'is_list': True, 'is_optional_in_python': False, 'is_streaming_type': True, @@ -24977,7 +24902,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'numSampsPerChanWritten', @@ -25041,7 +24965,6 @@ { 'ctypes_data_type': 'ctypes.c_uint32', 'direction': 'in', - 'grpc_streaming_type': 'U32Data', 'is_streaming_type': True, 'name': 'highTicks', 'python_data_type': 'int', @@ -25050,7 +24973,6 @@ { 'ctypes_data_type': 'ctypes.c_uint32', 'direction': 'in', - 'grpc_streaming_type': 'U32Data', 'is_streaming_type': True, 'name': 'lowTicks', 'python_data_type': 'int', @@ -25131,7 +25053,6 @@ { 'ctypes_data_type': 'numpy.float64', 'direction': 'in', - 'grpc_streaming_type': 'ArrayDoubleData', 'is_list': True, 'is_optional_in_python': False, 'is_streaming_type': True, @@ -25143,7 +25064,6 @@ { 'ctypes_data_type': 'numpy.float64', 'direction': 'in', - 'grpc_streaming_type': 'ArrayDoubleData', 'is_list': True, 'is_optional_in_python': False, 'is_streaming_type': True, @@ -25155,7 +25075,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'numSampsPerChanWritten', @@ -25219,7 +25138,6 @@ { 'ctypes_data_type': 'ctypes.c_double', 'direction': 'in', - 'grpc_streaming_type': 'DoubleData', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'highTime', @@ -25230,7 +25148,6 @@ { 'ctypes_data_type': 'ctypes.c_double', 'direction': 'in', - 'grpc_streaming_type': 'DoubleData', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'lowTime', @@ -25313,7 +25230,6 @@ { 'ctypes_data_type': 'numpy.bool', 'direction': 'in', - 'grpc_streaming_type': 'ArrayU8Data', 'is_list': True, 'is_optional_in_python': False, 'is_streaming_type': True, @@ -25326,7 +25242,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanWritten', @@ -25390,7 +25305,6 @@ { 'ctypes_data_type': 'ctypes.c_uint', 'direction': 'in', - 'grpc_streaming_type': 'U32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'value', @@ -25475,7 +25389,6 @@ 'coerced': True, 'ctypes_data_type': 'numpy.uint16', 'direction': 'in', - 'grpc_streaming_type': 'ArrayU16Data', 'is_list': True, 'is_optional_in_python': False, 'is_streaming_type': True, @@ -25488,7 +25401,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanWritten', @@ -25573,7 +25485,6 @@ { 'ctypes_data_type': 'numpy.uint32', 'direction': 'in', - 'grpc_streaming_type': 'ArrayU32Data', 'is_list': True, 'is_optional_in_python': False, 'is_streaming_type': True, @@ -25586,7 +25497,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanWritten', @@ -25671,7 +25581,6 @@ { 'ctypes_data_type': 'numpy.uint8', 'direction': 'in', - 'grpc_streaming_type': 'ArrayU8Data', 'is_list': True, 'is_optional_in_python': False, 'is_streaming_type': True, @@ -25684,7 +25593,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanWritten', @@ -25758,7 +25666,6 @@ { 'ctypes_data_type': 'numpy.generic', 'direction': 'in', - 'grpc_streaming_type': 'ArrayU8Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'writeArray', @@ -25769,7 +25676,6 @@ { 'ctypes_data_type': 'ctypes.c_int', 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_optional_in_python': False, 'is_streaming_type': True, 'name': 'sampsPerChanWritten', diff --git a/source/codegen/metadata/nifpga/custom_proto.mako b/source/codegen/metadata/nifpga/custom_proto.mako deleted file mode 100644 index 70e15d9e7..000000000 --- a/source/codegen/metadata/nifpga/custom_proto.mako +++ /dev/null @@ -1,55 +0,0 @@ -message I32Data { - int32 value = 1; -} - -message U32Data { - uint32 value = 1; -} - -message I64Data { - int64 value = 1; -} - -message U64Data { - uint64 value = 1; -} - -message BoolData { - bool value = 1; -} - -message FloatData { - float value = 1; -} - -message DoubleData { - double value = 1; -} - -message ArrayI32Data { - repeated int32 value = 1; -} - -message ArrayU32Data { - repeated uint32 value = 1; -} - -message ArrayI64Data { - repeated int64 value = 1; -} - -message ArrayU64Data { - repeated uint64 value = 1; -} - -message ArrayBoolData { - repeated bool value = 1; -} - -message ArrayFloatData { - repeated float value = 1; -} - -message ArrayDoubleData { - repeated double value = 1; -} \ No newline at end of file diff --git a/source/codegen/metadata/nifpga/functions.py b/source/codegen/metadata/nifpga/functions.py index 3a685c32a..1a92a43fb 100644 --- a/source/codegen/metadata/nifpga/functions.py +++ b/source/codegen/metadata/nifpga/functions.py @@ -1670,7 +1670,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'ArrayBoolData', 'is_streaming_type': True, 'name': 'array', 'size': { @@ -1702,7 +1701,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'ArrayDoubleData', 'is_streaming_type': True, 'name': 'array', 'size': { @@ -1734,7 +1732,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'ArrayI32Data', 'is_streaming_type': True, 'name': 'array', 'size': { @@ -1766,7 +1763,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'ArrayI32Data', 'is_streaming_type': True, 'name': 'array', 'size': { @@ -1798,7 +1794,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'ArrayI64Data', 'is_streaming_type': True, 'name': 'array', 'size': { @@ -1830,7 +1825,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'ArrayI32Data', 'is_streaming_type': True, 'name': 'array', 'size': { @@ -1862,7 +1856,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'ArrayFloatData', 'is_streaming_type': True, 'name': 'array', 'size': { @@ -1894,7 +1887,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'ArrayU32Data', 'is_streaming_type': True, 'name': 'array', 'size': { @@ -1926,7 +1918,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'ArrayU32Data', 'is_streaming_type': True, 'name': 'array', 'size': { @@ -1958,7 +1949,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'ArrayU64Data', 'is_streaming_type': True, 'name': 'array', 'size': { @@ -1990,7 +1980,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'ArrayU32Data', 'is_streaming_type': True, 'name': 'array', 'size': { @@ -2022,7 +2011,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'BoolData', 'is_streaming_type': True, 'name': 'value', 'type': 'NiFpga_Bool' @@ -2045,7 +2033,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'DoubleData', 'is_streaming_type': True, 'name': 'value', 'type': 'double' @@ -2568,7 +2555,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_streaming_type': True, 'name': 'value', 'type': 'int16_t' @@ -2591,7 +2577,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_streaming_type': True, 'name': 'value', 'type': 'int32_t' @@ -2614,7 +2599,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'I64Data', 'is_streaming_type': True, 'name': 'value', 'type': 'int64_t' @@ -2637,7 +2621,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'I32Data', 'is_streaming_type': True, 'name': 'value', 'type': 'int8_t' @@ -2660,7 +2643,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'FloatData', 'is_streaming_type': True, 'name': 'value', 'type': 'float' @@ -2683,7 +2665,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'U32Data', 'is_streaming_type': True, 'name': 'value', 'type': 'uint16_t' @@ -2706,7 +2687,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'U32Data', 'is_streaming_type': True, 'name': 'value', 'type': 'uint32_t' @@ -2729,7 +2709,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'U64Data', 'is_streaming_type': True, 'name': 'value', 'type': 'uint64_t' @@ -2752,7 +2731,6 @@ }, { 'direction': 'out', - 'grpc_streaming_type': 'U32Data', 'is_streaming_type': True, 'name': 'value', 'type': 'uint8_t' @@ -3103,7 +3081,6 @@ }, { 'direction': 'in', - 'grpc_streaming_type': 'ArrayBoolData', 'is_streaming_type': True, 'name': 'array', 'size': { @@ -3135,7 +3112,6 @@ }, { 'direction': 'in', - 'grpc_streaming_type': 'ArrayDoubleData', 'is_streaming_type': True, 'name': 'array', 'size': { @@ -3167,7 +3143,6 @@ }, { 'direction': 'in', - 'grpc_streaming_type': 'ArrayI32Data', 'is_streaming_type': True, 'name': 'array', 'size': { @@ -3199,7 +3174,6 @@ }, { 'direction': 'in', - 'grpc_streaming_type': 'ArrayI32Data', 'is_streaming_type': True, 'name': 'array', 'size': { @@ -3231,7 +3205,6 @@ }, { 'direction': 'in', - 'grpc_streaming_type': 'ArrayI64Data', 'is_streaming_type': True, 'name': 'array', 'size': { @@ -3263,7 +3236,6 @@ }, { 'direction': 'in', - 'grpc_streaming_type': 'ArrayI32Data', 'is_streaming_type': True, 'name': 'array', 'size': { @@ -3295,7 +3267,6 @@ }, { 'direction': 'in', - 'grpc_streaming_type': 'ArrayFloatData', 'is_streaming_type': True, 'name': 'array', 'size': { @@ -3327,7 +3298,6 @@ }, { 'direction': 'in', - 'grpc_streaming_type': 'ArrayU32Data', 'is_streaming_type': True, 'name': 'array', 'size': { @@ -3359,7 +3329,6 @@ }, { 'direction': 'in', - 'grpc_streaming_type': 'ArrayU32Data', 'is_streaming_type': True, 'name': 'array', 'size': { @@ -3391,7 +3360,6 @@ }, { 'direction': 'in', - 'grpc_streaming_type': 'ArrayU64Data', 'is_streaming_type': True, 'name': 'array', 'size': { @@ -3423,7 +3391,6 @@ }, { 'direction': 'in', - 'grpc_streaming_type': 'ArrayU32Data', 'is_streaming_type': True, 'name': 'array', 'size': { @@ -3455,7 +3422,6 @@ }, { 'direction': 'in', - 'grpc_streaming_type': 'BoolData', 'is_streaming_type': True, 'name': 'value', 'type': 'NiFpga_Bool' @@ -3478,7 +3444,6 @@ }, { 'direction': 'in', - 'grpc_streaming_type': 'DoubleData', 'is_streaming_type': True, 'name': 'value', 'type': 'double' @@ -3997,7 +3962,6 @@ }, { 'direction': 'in', - 'grpc_streaming_type': 'I32Data', 'is_streaming_type': True, 'name': 'value', 'type': 'int16_t' @@ -4020,7 +3984,6 @@ }, { 'direction': 'in', - 'grpc_streaming_type': 'I32Data', 'is_streaming_type': True, 'name': 'value', 'type': 'int32_t' @@ -4043,7 +4006,6 @@ }, { 'direction': 'in', - 'grpc_streaming_type': 'I64Data', 'is_streaming_type': True, 'name': 'value', 'type': 'int64_t' @@ -4066,7 +4028,6 @@ }, { 'direction': 'in', - 'grpc_streaming_type': 'I32Data', 'is_streaming_type': True, 'name': 'value', 'type': 'int8_t' @@ -4089,7 +4050,6 @@ }, { 'direction': 'in', - 'grpc_streaming_type': 'FloatData', 'is_streaming_type': True, 'name': 'value', 'type': 'float' @@ -4112,7 +4072,6 @@ }, { 'direction': 'in', - 'grpc_streaming_type': 'U32Data', 'is_streaming_type': True, 'name': 'value', 'type': 'uint16_t' @@ -4135,7 +4094,6 @@ }, { 'direction': 'in', - 'grpc_streaming_type': 'U32Data', 'is_streaming_type': True, 'name': 'value', 'type': 'uint32_t' @@ -4158,7 +4116,6 @@ }, { 'direction': 'in', - 'grpc_streaming_type': 'U64Data', 'is_streaming_type': True, 'name': 'value', 'type': 'uint64_t' @@ -4181,7 +4138,6 @@ }, { 'direction': 'in', - 'grpc_streaming_type': 'U32Data', 'is_streaming_type': True, 'name': 'value', 'type': 'uint8_t' diff --git a/source/codegen/metadata_validation.py b/source/codegen/metadata_validation.py index ced095e94..94a007aea 100644 --- a/source/codegen/metadata_validation.py +++ b/source/codegen/metadata_validation.py @@ -126,7 +126,6 @@ class RULES: Optional("is_grpc_enum"): bool, Optional("return_on_error_key"): str, Optional("is_streaming_type"): bool, - Optional("grpc_streaming_type"): str, } ) diff --git a/source/codegen/templates/service_helpers.mako b/source/codegen/templates/service_helpers.mako index 5acadf327..20d20952a 100644 --- a/source/codegen/templates/service_helpers.mako +++ b/source/codegen/templates/service_helpers.mako @@ -25,7 +25,7 @@ session_initialized_param_name = common_helpers.get_cpp_local_name(session_initialized_param) add_session_snippet = f'add_session(grpc_device_session_name, init_lambda, cleanup_lambda, {session_behavior_param_name}, &{session_initialized_param_name})' %>\ -${initialize_input_params(function_name, parameters)} +${initialize_input_params(function_name, parameters, indent_level=1)} ${initialize_output_params(output_parameters_to_initialize, indent_level=1)}\ auto init_lambda = [&] () { ## If the session is not returned, it's an output param and need to be declared before calling. @@ -63,7 +63,7 @@ ${populate_response(function_data=function_data, parameters=parameters, init_met initiating_driver_input_var_name = common_helpers.get_cpp_local_name(initiating_driver_input_param) initiating_driver_c_name = f'{initiating_driver_input_var_name}_grpc_session' %>\ -${initialize_input_params(function_name, parameters)} +${initialize_input_params(function_name, parameters, indent_level=1)} ${initialize_output_params(output_parameters_to_initialize, indent_level=1)}\ auto initiating_session_name = ${initiating_driver_c_name}.name(); auto init_lambda = [&] () { @@ -86,7 +86,7 @@ ${initialize_output_params(output_parameters_to_initialize, indent_level=1)}\ (size_param, array_param, non_ivi_params) = common_helpers.get_ivi_dance_params(parameters) output_parameters = [p for p in parameters if common_helpers.is_output_parameter(p)] %>\ -${initialize_input_params(function_name, non_ivi_params)}\ +${initialize_input_params(function_name, non_ivi_params, indent_level=1)}\ while (true) { ${call_library_method( @@ -126,7 +126,7 @@ ${populate_response(function_data=function_data, parameters=parameters, indent_l array_output_parameters = [p for p in output_parameters if common_helpers.is_array(p['type'])] scalar_output_parameters = [p for p in output_parameters if p not in array_output_parameters] %>\ -${initialize_input_params(function_name, non_ivi_params)}\ +${initialize_input_params(function_name, non_ivi_params, indent_level=1)}\ ${initialize_output_params(scalar_output_parameters, indent_level=1)}\ while (true) { ${call_library_method( @@ -195,7 +195,7 @@ ${set_response_values(output_parameters=response_parameters, init_method=False)} const auto& session_repository_ = service->session_repository_; <%block filter="common_helpers.indent(1)">\ -${initialize_input_params(function_name, parameters)}\ +${initialize_input_params(function_name, parameters, indent_level=1)}\ \ ${call_library_method( @@ -230,7 +230,7 @@ ${populate_error_check(function_data, parameters, indent_level=1, service_deref= config = data['config'] output_parameters = [p for p in parameters if common_helpers.is_output_parameter(p)] %>\ -${initialize_input_params(function_name, parameters)}\ +${initialize_input_params(function_name, parameters, indent_level=1)}\ ${initialize_output_params(output_parameters, indent_level=1)}\ ${set_output_vararg_parameter_sizes(parameters)}\ ${call_library_method( @@ -249,7 +249,7 @@ ${populate_response(function_data=function_data, parameters=parameters)}\ config = data['config'] output_parameters = [p for p in parameters if common_helpers.is_output_parameter(p)] %>\ -${initialize_input_params(function_name, parameters)}\ +${initialize_input_params(function_name, parameters, indent_level=1)}\ ${initialize_output_params(output_parameters, indent_level=1)}\ % if function_name == config['close_function'] or service_helpers.is_custom_close_method(function_data): <% @@ -315,23 +315,20 @@ ${populate_response(function_data=function_data, parameters=parameters)}\ arg_string = service_helpers.create_args(non_streaming_function_parameters) output_parameters = [p for p in non_streaming_function_parameters if common_helpers.is_output_parameter(p)] %>\ -::grpc::Status ${moniker_function_name}(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) -{ + ::grpc::Status ${moniker_function_name}(void* data, google::protobuf::Arena& arena, google::protobuf::Any& packedData) + { ${struct_name}* function_data = static_cast<${struct_name}*>(data); auto library = function_data->library; auto response = &function_data->response; ${initialize_moniker_input_parameters(moniker_input_parameters)}\ +${initialize_moniker_request_for_in_functions(streaming_param, functions, function_name)}\ ${initialize_output_params(output_parameters)}\ - % if streaming_param and streaming_param['direction'] == 'in': - auto request = &function_data->request; -${streaming_handle_in_direction(functions, function_name)}\ - % endif auto status = library->${non_streaming_function_name}(${arg_string}); ${populate_moniker_response_for_out_functions(output_parameters, streaming_param)}\ return ::grpc::Status::OK; -} + } <%def name="define_streaming_api_body(function_name, parameters)">\ @@ -341,7 +338,7 @@ ${populate_moniker_response_for_out_functions(output_parameters, streaming_param moniker_input_parameters = common_helpers.get_non_streaming_input_parameters(parameters) output_parameters = [p for p in parameters if common_helpers.is_output_parameter(p)] %>\ -${initialize_input_params(function_name, moniker_input_parameters)} +${initialize_input_params(function_name, moniker_input_parameters, indent_level=1)} ${initialize_moniker_struct(struct_name, moniker_input_parameters, output_parameters)}\ auto moniker = std::make_unique(); ni::data_monikers::DataMonikerService::RegisterMonikerInstance("${moniker_function_name}", data.release(), *moniker); @@ -350,15 +347,19 @@ ${initialize_moniker_struct(struct_name, moniker_input_parameters, output_parame return ::grpc::Status::OK;\ -<%def name="streaming_handle_in_direction(functions, begin_function_name)"> -<% - request_message_type = common_helpers.get_data_moniker_request_message_type(begin_function_name) - non_streaming_function_name = begin_function_name.replace("Begin", "") - input_parameters, output_parameters = common_helpers.get_data_moniker_function_parameters(functions[non_streaming_function_name]) - common_helpers.extend_input_params_with_size_params(input_parameters, functions[non_streaming_function_name])\ -%>\ +<%def name="initialize_moniker_request_for_in_functions(streaming_param, functions, begin_function_name)">\ +% if streaming_param and streaming_param['direction'] == 'in': + <% + request_message_type = common_helpers.get_data_moniker_request_message_type(begin_function_name) + non_streaming_function_name = begin_function_name.replace("Begin", "") + input_parameters, output_parameters = common_helpers.get_data_moniker_function_parameters(functions[non_streaming_function_name]) + common_helpers.extend_input_params_with_size_params(input_parameters, functions[non_streaming_function_name])\ + %>\ + auto request = &function_data->request; + packedData.UnpackTo(request); ${initialize_input_params(non_streaming_function_name, input_parameters)}\ +% endif <%def name="populate_moniker_response_for_out_functions(output_parameters, streaming_param)">\ @@ -423,15 +424,17 @@ ${set_response_values(output_parameters=output_parameters, init_method=false)}\ ## Initialize the input parameters to the API call. -<%def name="initialize_input_params(function_name, parameters)">\ +<%def name="initialize_input_params(function_name, parameters, indent_level=0)">\ <% input_parameters = [p for p in parameters if common_helpers.is_input_parameter(p)] input_vararg_parameters = [p for p in input_parameters if common_helpers.is_repeated_varargs_parameter(p)] input_vararg_parameter = input_vararg_parameters[0] if len(input_vararg_parameters) > 0 else None %>\ +<%block filter="common_helpers.indent(indent_level)">\ % for parameter in input_parameters: ${initialize_input_param(function_name, parameter, parameters, input_vararg_parameter)}\ % endfor +\ ## Initialize an input parameter for an API call. @@ -447,7 +450,7 @@ ${initialize_enum_array_input_param(function_name, parameter)} % elif common_helpers.is_enum(parameter): ${initialize_enum_input_param(function_name, parameter)} % elif 'hardcoded_value' in parameter: - ${initialize_hardcoded_parameter(parameter)} +${initialize_hardcoded_parameter(parameter)} % elif 'callback_token' in parameter or 'callback_params' in parameter: ## pass % elif "determine_size_from" in parameter: ${initialize_len_input_param(parameter, parameters)} @@ -469,8 +472,8 @@ ${initialize_standard_input_param(parameter)} parameter_c_type_pointer = parameter_c_type.replace('[]','*') parameter_name = common_helpers.get_grpc_field_name(parameter) %>\ - auto get_${parameter['name']}_if = [](const google::protobuf::RepeatedPtrField<${stripped_grpc_type}>& vector, int n) -> ${parameter_c_type_pointer} { - if (vector.size() > n) { + auto get_${parameter['name']}_if = [](const google::protobuf::RepeatedPtrField<${stripped_grpc_type}>& vector, int n) -> ${parameter_c_type_pointer} { + if (vector.size() > n) { <% # Note that this code will not handle every datatype, but it works for all # the ones we currently use with repeated varargs. @@ -484,14 +487,14 @@ ${initialize_standard_input_param(parameter)} # that are ASCII-only. (For physical channels and lines.) return_snippet += f'.c_str()' %>\ - return vector[n]${return_snippet}; - } + return vector[n]${return_snippet}; + } % if common_helpers.is_string_arg(parameter): - return nullptr; + return nullptr; % else: - return 0; + return 0; % endif - };\ + };\ <%def name="initialize_repeated_varargs_param(parameter)">\ @@ -505,13 +508,13 @@ ${initialize_standard_input_param(parameter)} c_type_pointer = c_type.replace('[]','*') max_vector_size = parameter['max_length'] %>\ - auto ${parameter_name} = request->${field_name}(); - if (${parameter_name}.size() == 0) { - return ::grpc::Status(::grpc::INVALID_ARGUMENT, "No values for ${parameter["name"]} were specified"); - } - if (${parameter_name}.size() > ${max_vector_size}) { - return ::grpc::Status(::grpc::INVALID_ARGUMENT, "More than ${max_vector_size} values for ${parameter["name"]} were specified"); - } + auto ${parameter_name} = request->${field_name}(); + if (${parameter_name}.size() == 0) { + return ::grpc::Status(::grpc::INVALID_ARGUMENT, "No values for ${parameter["name"]} were specified"); + } + if (${parameter_name}.size() > ${max_vector_size}) { + return ::grpc::Status(::grpc::INVALID_ARGUMENT, "More than ${max_vector_size} values for ${parameter["name"]} were specified"); + } @@ -524,14 +527,14 @@ ${initialize_standard_input_param(parameter)} field_name = common_helpers.get_grpc_field_name(parameter) element_type = service_helpers.get_c_element_type(parameter) %>\ - auto ${parameter_name}_vector = std::vector<${element_type}>(); - ${parameter_name}_vector.reserve(request->${field_name}().size()); - std::transform( - request->${field_name}().begin(), - request->${field_name}().end(), - std::back_inserter(${parameter_name}_vector), - [](auto x) { return x; }); - auto ${parameter_name} = ${parameter_name}_vector.data(); + auto ${parameter_name}_vector = std::vector<${element_type}>(); + ${parameter_name}_vector.reserve(request->${field_name}().size()); + std::transform( + request->${field_name}().begin(), + request->${field_name}().end(), + std::back_inserter(${parameter_name}_vector), + [](auto x) { return x; }); + auto ${parameter_name} = ${parameter_name}_vector.data(); ## Initialize a bitfield as enum array input parameter for an API call. @@ -542,9 +545,9 @@ ${initialize_standard_input_param(parameter)} enum_type = common_helpers.get_bitfield_enum_type(parameter) bitfield_type = parameter["type"] %>\ - const auto ${parameter_name} = nidevice_grpc::converters::convert_bitfield_as_enum_array_input( - request->${field_name}_array(), - request->${field_name}_raw()); + const auto ${parameter_name} = nidevice_grpc::converters::convert_bitfield_as_enum_array_input( + request->${field_name}_array(), + request->${field_name}_raw()); ## Initialize an enum input parameter for an API call. @@ -571,60 +574,60 @@ ${initialize_standard_input_param(parameter)} raw_request_snippet = f'request->{field_name}_raw()' validate_attribute_enum = parameter.get("raw_attribute", False) %>\ - ${parameter_type_pointer} ${parameter_name}; + ${parameter_type_pointer} ${parameter_name}; % if parameter['grpc_type'] == "string": - std::string ${parameter_name}_buffer; + std::string ${parameter_name}_buffer; % endif - switch (request->${field_name}_enum_case()) { + switch (request->${field_name}_enum_case()) { % if has_unmapped_enum: - case ${one_of_case_prefix}::k${pascal_field_name}: { + case ${one_of_case_prefix}::k${pascal_field_name}: { % if parameter['grpc_type'] == "string": - ${parameter_name} = const_cast<${parameter['type']}>((${enum_request_snippet}).c_str()); + ${parameter_name} = const_cast<${parameter['type']}>((${enum_request_snippet}).c_str()); % else: - ${parameter_name} = static_cast<${parameter['type']}>(${enum_request_snippet}); + ${parameter_name} = static_cast<${parameter['type']}>(${enum_request_snippet}); % endif % if validate_attribute_enum: ## "raw" attributes always validate non-raw enum values before passing to driver ## this can be important if (a) the driver can't handle all validation scenarios ## and (b) the caller passes/casts an invalid enum value. ## Non-raw attributes allow the driver to handle validation. - ${parameter_name} = ${check_enum_is_valid} ? ${parameter_name} : 0; + ${parameter_name} = ${check_enum_is_valid} ? ${parameter_name} : 0; % endif - break; - } + break; + } % endif % if has_mapped_enum: - case ${one_of_case_prefix}::k${pascal_field_name}Mapped: { - auto ${mapped_enum_iterator_name} = ${map_name}.find(${mapped_request_snippet}); - if (${mapped_enum_iterator_name} == ${map_name}.end()) { - return ::grpc::Status(::grpc::INVALID_ARGUMENT, "The value for ${parameter_name}_mapped was not specified or out of range."); - } + case ${one_of_case_prefix}::k${pascal_field_name}Mapped: { + auto ${mapped_enum_iterator_name} = ${map_name}.find(${mapped_request_snippet}); + if (${mapped_enum_iterator_name} == ${map_name}.end()) { + return ::grpc::Status(::grpc::INVALID_ARGUMENT, "The value for ${parameter_name}_mapped was not specified or out of range."); + } % if parameter['grpc_type'] == "string": - ${parameter_name} = const_cast<${parameter_type_pointer}>((${f'{mapped_enum_iterator_name}->second'}).c_str()); + ${parameter_name} = const_cast<${parameter_type_pointer}>((${f'{mapped_enum_iterator_name}->second'}).c_str()); % else: - ${parameter_name} = static_cast<${parameter['type']}>(${f'{mapped_enum_iterator_name}->second'}); + ${parameter_name} = static_cast<${parameter['type']}>(${f'{mapped_enum_iterator_name}->second'}); % endif - break; - } + break; + } % endif - case ${one_of_case_prefix}::k${pascal_field_name}Raw: { + case ${one_of_case_prefix}::k${pascal_field_name}Raw: { % if parameter['grpc_type'] == "string": - ${parameter_name}_buffer = convert_from_grpc(${raw_request_snippet}); - ${parameter_name} = const_cast<${parameter_type_pointer}>(${parameter_name}_buffer.c_str()); + ${parameter_name}_buffer = convert_from_grpc(${raw_request_snippet}); + ${parameter_name} = const_cast<${parameter_type_pointer}>(${parameter_name}_buffer.c_str()); % else: - ${parameter_name} = static_cast<${parameter['type']}>(${raw_request_snippet}); + ${parameter_name} = static_cast<${parameter['type']}>(${raw_request_snippet}); % endif % if validate_attribute_enum: # raw validation can be overridden with a toggle. - auto ${parameter_name}_is_valid = ${check_enum_is_valid} || feature_toggles_.is_allow_undefined_attributes_enabled; - ${parameter_name} = ${parameter_name}_is_valid ? ${parameter_name} : 0; + auto ${parameter_name}_is_valid = ${check_enum_is_valid} || feature_toggles_.is_allow_undefined_attributes_enabled; + ${parameter_name} = ${parameter_name}_is_valid ? ${parameter_name} : 0; % endif - break; - } - case ${one_of_case_prefix}::${field_name.upper()}_ENUM_NOT_SET: { - return ::grpc::Status(::grpc::INVALID_ARGUMENT, "The value for ${parameter_name} was not specified or out of range"); - break; - } + break; } + case ${one_of_case_prefix}::${field_name.upper()}_ENUM_NOT_SET: { + return ::grpc::Status(::grpc::INVALID_ARGUMENT, "The value for ${parameter_name} was not specified or out of range"); + break; + } + } ## Initialize an input parameter that is determined by the 'len' size mechanism. @@ -640,28 +643,28 @@ ${initialize_standard_input_param(parameter)} allow_optional_as_cpp_constant = "true" if allow_optional else "false" %>\ % if len(size_sources) > 1: - auto ${parameter_name}_determine_from_sizes = std::array - { + auto ${parameter_name}_determine_from_sizes = std::array + { <%block filter="common_helpers.trim_trailing_comma()">\ % for size_source in size_sources: - request->${size_source}_size(), + request->${size_source}_size(), % endfor \ - }; - const auto ${parameter_name}_size_calculation = calculate_linked_array_size(${parameter_name}_determine_from_sizes, ${allow_optional_as_cpp_constant}); + }; + const auto ${parameter_name}_size_calculation = calculate_linked_array_size(${parameter_name}_determine_from_sizes, ${allow_optional_as_cpp_constant}); - if (${parameter_name}_size_calculation.match_state == MatchState::MISMATCH) { - return ::grpc::Status(::grpc::INVALID_ARGUMENT, "The sizes of linked repeated fields [${str.join(', ', size_sources)}] do not match"); - } + if (${parameter_name}_size_calculation.match_state == MatchState::MISMATCH) { + return ::grpc::Status(::grpc::INVALID_ARGUMENT, "The sizes of linked repeated fields [${str.join(', ', size_sources)}] do not match"); + } % if allow_optional: - // NULL out optional params with zero sizes. - if (${parameter_name}_size_calculation.match_state == MatchState::MATCH_OR_ZERO) { + // NULL out optional params with zero sizes. + if (${parameter_name}_size_calculation.match_state == MatchState::MATCH_OR_ZERO) { % for size_source in size_sources: - ${size_source} = request->${size_source}_size() ? std::move(${size_source}) : nullptr; + ${size_source} = request->${size_source}_size() ? std::move(${size_source}) : nullptr; % endfor - } + } % endif - auto ${parameter_name} = ${parameter_name}_size_calculation.size; + auto ${parameter_name} = ${parameter_name}_size_calculation.size; % else: <% size_field_name = size_sources[-1] @@ -672,13 +675,13 @@ ${initialize_standard_input_param(parameter)} if len(linked_array_param_name) > 1 and calculate_len_in_bytes: raise f"{parameter['name']} has 'len-in-bytes' set but has more than one 'determine-size-from' values!" %>\ - %if calculate_len_in_bytes: - ${parameter['type']} ${parameter_name} = static_cast<${parameter['type']}>(request->${size_field_name}().size() * sizeof(${linked_array_param_underlying_type}));\ - %elif linked_array_param['type'] in ['ViConstString', 'const char[]']: - ${parameter['type']} ${parameter_name} = static_cast<${parameter['type']}>(convert_from_grpc(request->${size_field_name}()).size());\ - %else: - ${parameter['type']} ${parameter_name} = static_cast<${parameter['type']}>(request->${size_field_name}().size());\ - %endif +%if calculate_len_in_bytes: + ${parameter['type']} ${parameter_name} = static_cast<${parameter['type']}>(request->${size_field_name}().size() * sizeof(${linked_array_param_underlying_type}));\ +%elif linked_array_param['type'] in ['ViConstString', 'const char[]']: + ${parameter['type']} ${parameter_name} = static_cast<${parameter['type']}>(convert_from_grpc(request->${size_field_name}()).size());\ +%else: + ${parameter['type']} ${parameter_name} = static_cast<${parameter['type']}>(request->${size_field_name}().size());\ +%endif % endif @@ -691,11 +694,11 @@ ${initialize_standard_input_param(parameter)} size_field_name = common_helpers.get_grpc_field_name(size_param) %>\ ${initialize_standard_input_param(parameter)} - auto total_length = std::accumulate(request->${size_field_name}().cbegin(), request->${size_field_name}().cend(), 0); + auto total_length = std::accumulate(request->${size_field_name}().cbegin(), request->${size_field_name}().cend(), 0); - if (total_length != request->${parameter_name}_size()) { - return ::grpc::Status(::grpc::INVALID_ARGUMENT, "The total size of the two-dimensional array ${parameter_name} does not match the expected size from the sum of ${size_field_name}"); - } + if (total_length != request->${parameter_name}_size()) { + return ::grpc::Status(::grpc::INVALID_ARGUMENT, "The total size of the two-dimensional array ${parameter_name} does not match the expected size from the sum of ${size_field_name}"); + } @@ -706,7 +709,7 @@ ${initialize_standard_input_param(parameter)} ## Initialize an input parameter that's passed by pointer. <%def name="initialize_pointer_input_parameter(parameter)">\ - ${parameter['type']} ${common_helpers.get_cpp_local_name(parameter)}_copy = request->${common_helpers.get_cpp_local_name(parameter)}();\ + ${parameter['type']} ${common_helpers.get_cpp_local_name(parameter)}_copy = request->${common_helpers.get_cpp_local_name(parameter)}();\ @@ -725,86 +728,86 @@ ${initialize_standard_input_param(parameter)} c_element_type_that_needs_coercion = service_helpers.get_c_element_type_for_array_that_needs_coercion(parameter) %>\ % if c_type in ['ViConstString', 'const char[]']: - auto ${parameter_name}_mbcs = convert_from_grpc(${request_snippet}); - auto ${parameter_name} = ${parameter_name}_mbcs.c_str();\ + auto ${parameter_name}_mbcs = convert_from_grpc(${request_snippet}); + auto ${parameter_name} = ${parameter_name}_mbcs.c_str();\ % elif grpc_type == 'string': - auto ${parameter_name}_mbcs = convert_from_grpc(${request_snippet}); - ${c_type_pointer} ${parameter_name} = (${c_type_pointer})${parameter_name}_mbcs.c_str();\ + auto ${parameter_name}_mbcs = convert_from_grpc(${request_snippet}); + ${c_type_pointer} ${parameter_name} = (${c_type_pointer})${parameter_name}_mbcs.c_str();\ % elif common_helpers.is_string_arg(parameter): - ${c_type_pointer} ${parameter_name} = (${c_type_pointer})${request_snippet}.c_str();\ + ${c_type_pointer} ${parameter_name} = (${c_type_pointer})${request_snippet}.c_str();\ % elif common_helpers.supports_standard_copy_conversion_routines(parameter): - auto ${parameter_name} = convert_from_grpc<${c_type_underlying_type}>(${str.join(", ", [request_snippet] + parameter.get("additional_arguments_to_copy_convert", []))});\ + auto ${parameter_name} = convert_from_grpc<${c_type_underlying_type}>(${str.join(", ", [request_snippet] + parameter.get("additional_arguments_to_copy_convert", []))});\ % elif grpc_type == 'repeated nidevice_grpc.Session': - auto ${parameter_name}_request = ${request_snippet}; - std::vector<${c_type_underlying_type}> ${parameter_name}; - std::transform( - ${parameter_name}_request.begin(), - ${parameter_name}_request.end(), - std::back_inserter(${parameter_name}), - [&](auto session) { return ${service_helpers.session_repository_field_name(parameter, config)}->access_session(session.name()); }); \ + auto ${parameter_name}_request = ${request_snippet}; + std::vector<${c_type_underlying_type}> ${parameter_name}; + std::transform( + ${parameter_name}_request.begin(), + ${parameter_name}_request.end(), + std::back_inserter(${parameter_name}), + [&](auto session) { return ${service_helpers.session_repository_field_name(parameter, config)}->access_session(session.name()); }); \ % elif c_type == 'ViBoolean[]': - auto ${parameter_name}_request = ${request_snippet}; - std::vector<${c_type_underlying_type}> ${parameter_name}; - std::transform( - ${parameter_name}_request.begin(), - ${parameter_name}_request.end(), - std::back_inserter(${parameter_name}), - [](auto x) { return x ? VI_TRUE : VI_FALSE; }); + auto ${parameter_name}_request = ${request_snippet}; + std::vector<${c_type_underlying_type}> ${parameter_name}; + std::transform( + ${parameter_name}_request.begin(), + ${parameter_name}_request.end(), + std::back_inserter(${parameter_name}), + [](auto x) { return x ? VI_TRUE : VI_FALSE; }); % elif c_type in ['ViInt16[]', 'ViUInt16[]']: - auto ${parameter_name}_request = ${request_snippet}; - std::vector<${c_type_underlying_type}> ${parameter_name}; - std::transform( - ${parameter_name}_request.begin(), - ${parameter_name}_request.end(), - std::back_inserter(${parameter_name}), - [](auto x) { return (${c_type_underlying_type})x; }); \ + auto ${parameter_name}_request = ${request_snippet}; + std::vector<${c_type_underlying_type}> ${parameter_name}; + std::transform( + ${parameter_name}_request.begin(), + ${parameter_name}_request.end(), + std::back_inserter(${parameter_name}), + [](auto x) { return (${c_type_underlying_type})x; }); \ % elif c_type == 'ViAddr': - ${c_type} ${parameter_name} = reinterpret_cast<${c_type}>(${request_snippet});\ + ${c_type} ${parameter_name} = reinterpret_cast<${c_type}>(${request_snippet});\ % elif c_type in ['ViChar', 'ViInt8', 'ViInt16']: - ${c_type} ${parameter_name} = static_cast<${c_type}>(${request_snippet});\ + ${c_type} ${parameter_name} = static_cast<${c_type}>(${request_snippet});\ % elif grpc_type == 'nidevice_grpc.Session': - auto ${parameter_name}_grpc_session = ${request_snippet}; - ${c_type} ${parameter_name} = ${service_helpers.session_repository_field_name(parameter, config)}->access_session(${parameter_name}_grpc_session.name());\ + auto ${parameter_name}_grpc_session = ${request_snippet}; + ${c_type} ${parameter_name} = ${service_helpers.session_repository_field_name(parameter, config)}->access_session(${parameter_name}_grpc_session.name());\ % elif is_array and common_helpers.is_driver_typedef_with_same_size_but_different_qualifiers(c_type_underlying_type): - auto ${parameter_name} = const_cast<${c_type_pointer}>(reinterpret_cast(${request_snippet}.data()));\ + auto ${parameter_name} = const_cast<${c_type_pointer}>(reinterpret_cast(${request_snippet}.data()));\ % elif c_type in ['const int32[]', 'const uInt32[]']: - auto ${parameter_name} = reinterpret_cast<${c_type_pointer}>(${request_snippet}.data());\ + auto ${parameter_name} = reinterpret_cast<${c_type_pointer}>(${request_snippet}.data());\ % elif grpc_type == 'bytes': - auto ${parameter_name} = reinterpret_cast(${request_snippet}.data());\ + auto ${parameter_name} = reinterpret_cast(${request_snippet}.data());\ % elif service_helpers.is_scalar_input_that_needs_coercion(parameter): - auto ${parameter_name}_raw = ${request_snippet}; - if (${parameter_name}_raw < std::numeric_limits<${c_type}>::min() || ${parameter_name}_raw > std::numeric_limits<${c_type}>::max()) { - std::string message("value "); - message.append(std::to_string(${parameter_name}_raw)); - message.append(" doesn't fit in datatype "); - message.append("${c_type}"); - throw nidevice_grpc::ValueOutOfRangeException(message); - } - auto ${parameter_name} = static_cast<${c_type}>(${parameter_name}_raw); + auto ${parameter_name}_raw = ${request_snippet}; + if (${parameter_name}_raw < std::numeric_limits<${c_type}>::min() || ${parameter_name}_raw > std::numeric_limits<${c_type}>::max()) { + std::string message("value "); + message.append(std::to_string(${parameter_name}_raw)); + message.append(" doesn't fit in datatype "); + message.append("${c_type}"); + throw nidevice_grpc::ValueOutOfRangeException(message); + } + auto ${parameter_name} = static_cast<${c_type}>(${parameter_name}_raw); % elif service_helpers.is_input_array_that_needs_coercion(parameter): - auto ${parameter_name}_raw = ${request_snippet}; - auto ${parameter_name} = std::vector<${c_element_type_that_needs_coercion}>(); - ${parameter_name}.reserve(${parameter_name}_raw.size()); - std::transform( - ${parameter_name}_raw.begin(), - ${parameter_name}_raw.end(), - std::back_inserter(${parameter_name}), - [](auto x) { - if (x < std::numeric_limits<${c_element_type_that_needs_coercion}>::min() || x > std::numeric_limits<${c_element_type_that_needs_coercion}>::max()) { - std::string message("value "); - message.append(std::to_string(x)); - message.append(" doesn't fit in datatype "); - message.append("${c_element_type_that_needs_coercion}"); - throw nidevice_grpc::ValueOutOfRangeException(message); - } - return static_cast<${c_element_type_that_needs_coercion}>(x); - }); + auto ${parameter_name}_raw = ${request_snippet}; + auto ${parameter_name} = std::vector<${c_element_type_that_needs_coercion}>(); + ${parameter_name}.reserve(${parameter_name}_raw.size()); + std::transform( + ${parameter_name}_raw.begin(), + ${parameter_name}_raw.end(), + std::back_inserter(${parameter_name}), + [](auto x) { + if (x < std::numeric_limits<${c_element_type_that_needs_coercion}>::min() || x > std::numeric_limits<${c_element_type_that_needs_coercion}>::max()) { + std::string message("value "); + message.append(std::to_string(x)); + message.append(" doesn't fit in datatype "); + message.append("${c_element_type_that_needs_coercion}"); + throw nidevice_grpc::ValueOutOfRangeException(message); + } + return static_cast<${c_element_type_that_needs_coercion}>(x); + }); % elif common_helpers.is_array(c_type): - auto ${parameter_name} = const_cast<${c_type_pointer}>(${request_snippet}.data());\ + auto ${parameter_name} = const_cast<${c_type_pointer}>(${request_snippet}.data());\ % elif common_helpers.is_nidevice_enum_parameter(grpc_type): - auto ${parameter_name} = ${request_snippet};\ + auto ${parameter_name} = ${request_snippet};\ % else: - ${c_type} ${parameter_name} = ${request_snippet};\ + ${c_type} ${parameter_name} = ${request_snippet};\ % endif @@ -1086,19 +1089,19 @@ ${copy_to_response_with_transform(source_buffer=parameter_name, parameter_name=p ## Allocate the response buffer using get_size_expression. <%def name="initialize_response_buffer(parameter_name, parameter)">\ - response->mutable_${parameter_name}()->Clear(); - response->mutable_${parameter_name}()->Reserve(${common_helpers.get_size_expression(parameter)}); + response->mutable_${parameter_name}()->Clear(); + response->mutable_${parameter_name}()->Reserve(${common_helpers.get_size_expression(parameter)}); ## Copy source_buffer to response->mutable_[parameter_name]() applying transform_x. <%def name="copy_to_response_with_transform(source_buffer, parameter_name, transform_x, size)">\ - std::transform( - ${source_buffer}.begin(), - ${source_buffer}.begin() + ${size}, - google::protobuf::RepeatedFieldBackInserter(response->mutable_${parameter_name}()), - [&](auto x) { - return ${transform_x}; - }); + std::transform( + ${source_buffer}.begin(), + ${source_buffer}.begin() + ${size}, + google::protobuf::RepeatedFieldBackInserter(response->mutable_${parameter_name}()), + [&](auto x) { + return ${transform_x}; + }); ## Call the driver library method function_name.