Skip to content

Commit

Permalink
RFmxSpecAn Update to 24.0 (#1029)
Browse files Browse the repository at this point in the history
  • Loading branch information
alenkani authored Dec 15, 2023
1 parent aeef999 commit a5df3aa
Show file tree
Hide file tree
Showing 7 changed files with 3,760 additions and 3,691 deletions.
21 changes: 19 additions & 2 deletions generated/nirfmxspecan/nirfmxspecan.proto
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ enum NiRFmxSpecAnAttribute {
NIRFMXSPECAN_ATTRIBUTE_TRIGGER_MINIMUM_QUIET_TIME_DURATION = 1048588;
NIRFMXSPECAN_ATTRIBUTE_AUTO_LEVEL_INITIAL_REFERENCE_LEVEL = 1048589;
NIRFMXSPECAN_ATTRIBUTE_LIMITED_CONFIGURATION_CHANGE = 1048590;
NIRFMXSPECAN_ATTRIBUTE_SELECTED_PATH = 1048591;
NIRFMXSPECAN_ATTRIBUTE_LIST_STEP_TIMER_OFFSET = 1052663;
NIRFMXSPECAN_ATTRIBUTE_NUMBER_OF_STEPS = 1052664;
NIRFMXSPECAN_ATTRIBUTE_LIST_STEP_TIMER_DURATION = 1052665;
Expand Down Expand Up @@ -1643,6 +1644,16 @@ enum IQPowerEdgeTriggerSlope {
IQ_POWER_EDGE_TRIGGER_SLOPE_FALLING = 1;
}

enum IdpdReferenceWaveformIdleDurationPresent {
IDPD_REFERENCE_WAVEFORM_IDLE_DURATION_PRESENT_FALSE = 0;
IDPD_REFERENCE_WAVEFORM_IDLE_DURATION_PRESENT_TRUE = 1;
}

enum IdpdSignalType {
IDPD_SIGNAL_TYPE_MODULATED = 0;
IDPD_SIGNAL_TYPE_TONES = 1;
}

enum MarkerNextPeak {
MARKER_NEXT_PEAK_NEXT_HIGHEST = 0;
MARKER_NEXT_PEAK_NEXT_LEFT = 1;
Expand Down Expand Up @@ -5330,8 +5341,14 @@ message IDPDCfgReferenceWaveformRequest {
double x0 = 3;
double dx = 4;
repeated nidevice_grpc.NIComplexNumberF32 reference_waveform = 5;
int32 idle_duration_present = 6;
int32 signal_type = 7;
oneof idle_duration_present_enum {
IdpdReferenceWaveformIdleDurationPresent idle_duration_present = 6;
int32 idle_duration_present_raw = 7;
}
oneof signal_type_enum {
IdpdSignalType signal_type = 8;
int32 signal_type_raw = 9;
}
}

message IDPDCfgReferenceWaveformResponse {
Expand Down
20 changes: 17 additions & 3 deletions generated/nirfmxspecan/nirfmxspecan_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4375,7 +4375,7 @@ idpd_cfg_predistorted_waveform(const StubPtr& stub, const nidevice_grpc::Session
}

IDPDCfgReferenceWaveformResponse
idpd_cfg_reference_waveform(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& x0, const double& dx, const std::vector<nidevice_grpc::NIComplexNumberF32>& reference_waveform, const pb::int32& idle_duration_present, const pb::int32& signal_type)
idpd_cfg_reference_waveform(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& x0, const double& dx, const std::vector<nidevice_grpc::NIComplexNumberF32>& reference_waveform, const simple_variant<IdpdReferenceWaveformIdleDurationPresent, pb::int32>& idle_duration_present, const simple_variant<IdpdSignalType, pb::int32>& signal_type)
{
::grpc::ClientContext context;

Expand All @@ -4385,8 +4385,22 @@ idpd_cfg_reference_waveform(const StubPtr& stub, const nidevice_grpc::Session& i
request.set_x0(x0);
request.set_dx(dx);
copy_array(reference_waveform, request.mutable_reference_waveform());
request.set_idle_duration_present(idle_duration_present);
request.set_signal_type(signal_type);
const auto idle_duration_present_ptr = idle_duration_present.get_if<IdpdReferenceWaveformIdleDurationPresent>();
const auto idle_duration_present_raw_ptr = idle_duration_present.get_if<pb::int32>();
if (idle_duration_present_ptr) {
request.set_idle_duration_present(*idle_duration_present_ptr);
}
else if (idle_duration_present_raw_ptr) {
request.set_idle_duration_present_raw(*idle_duration_present_raw_ptr);
}
const auto signal_type_ptr = signal_type.get_if<IdpdSignalType>();
const auto signal_type_raw_ptr = signal_type.get_if<pb::int32>();
if (signal_type_ptr) {
request.set_signal_type(*signal_type_ptr);
}
else if (signal_type_raw_ptr) {
request.set_signal_type_raw(*signal_type_raw_ptr);
}

auto response = IDPDCfgReferenceWaveformResponse{};

Expand Down
2 changes: 1 addition & 1 deletion generated/nirfmxspecan/nirfmxspecan_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ HarmFetchTHDResponse harm_fetch_thd(const StubPtr& stub, const nidevice_grpc::Se
HarmReadResponse harm_read(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& timeout);
IDPDCfgEqualizerCoefficientsResponse idpd_cfg_equalizer_coefficients(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& x0, const double& dx, const std::vector<nidevice_grpc::NIComplexNumberF32>& equalizer_coefficients);
IDPDCfgPredistortedWaveformResponse idpd_cfg_predistorted_waveform(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& x0, const double& dx, const std::vector<nidevice_grpc::NIComplexNumberF32>& predistorted_waveform, const double& target_gain);
IDPDCfgReferenceWaveformResponse idpd_cfg_reference_waveform(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& x0, const double& dx, const std::vector<nidevice_grpc::NIComplexNumberF32>& reference_waveform, const pb::int32& idle_duration_present, const pb::int32& signal_type);
IDPDCfgReferenceWaveformResponse idpd_cfg_reference_waveform(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& x0, const double& dx, const std::vector<nidevice_grpc::NIComplexNumberF32>& reference_waveform, const simple_variant<IdpdReferenceWaveformIdleDurationPresent, pb::int32>& idle_duration_present, const simple_variant<IdpdSignalType, pb::int32>& signal_type);
IDPDFetchEqualizerCoefficientsResponse idpd_fetch_equalizer_coefficients(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& timeout);
IDPDFetchPredistortedWaveformResponse idpd_fetch_predistorted_waveform(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& timeout);
IDPDFetchProcessedMeanAcquiredWaveformResponse idpd_fetch_processed_mean_acquired_waveform(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& timeout);
Expand Down
34 changes: 32 additions & 2 deletions generated/nirfmxspecan/nirfmxspecan_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7619,8 +7619,38 @@ namespace nirfmxspecan_grpc {
float64 dx = request->dx();
auto reference_waveform = convert_from_grpc<NIComplexSingle>(request->reference_waveform());
int32 array_size = static_cast<int32>(request->reference_waveform().size());
int32 idle_duration_present = request->idle_duration_present();
int32 signal_type = request->signal_type();
int32 idle_duration_present;
switch (request->idle_duration_present_enum_case()) {
case nirfmxspecan_grpc::IDPDCfgReferenceWaveformRequest::IdleDurationPresentEnumCase::kIdleDurationPresent: {
idle_duration_present = static_cast<int32>(request->idle_duration_present());
break;
}
case nirfmxspecan_grpc::IDPDCfgReferenceWaveformRequest::IdleDurationPresentEnumCase::kIdleDurationPresentRaw: {
idle_duration_present = static_cast<int32>(request->idle_duration_present_raw());
break;
}
case nirfmxspecan_grpc::IDPDCfgReferenceWaveformRequest::IdleDurationPresentEnumCase::IDLE_DURATION_PRESENT_ENUM_NOT_SET: {
return ::grpc::Status(::grpc::INVALID_ARGUMENT, "The value for idle_duration_present was not specified or out of range");
break;
}
}

int32 signal_type;
switch (request->signal_type_enum_case()) {
case nirfmxspecan_grpc::IDPDCfgReferenceWaveformRequest::SignalTypeEnumCase::kSignalType: {
signal_type = static_cast<int32>(request->signal_type());
break;
}
case nirfmxspecan_grpc::IDPDCfgReferenceWaveformRequest::SignalTypeEnumCase::kSignalTypeRaw: {
signal_type = static_cast<int32>(request->signal_type_raw());
break;
}
case nirfmxspecan_grpc::IDPDCfgReferenceWaveformRequest::SignalTypeEnumCase::SIGNAL_TYPE_ENUM_NOT_SET: {
return ::grpc::Status(::grpc::INVALID_ARGUMENT, "The value for signal_type was not specified or out of range");
break;
}
}

auto status = library_->IDPDCfgReferenceWaveform(instrument, selector_string, x0, dx, reference_waveform.data(), array_size, idle_duration_present, signal_type);
if (!status_ok(status)) {
return ConvertApiErrorStatusForNiRFmxInstrHandle(context, status, instrument);
Expand Down
Loading

0 comments on commit a5df3aa

Please sign in to comment.