Skip to content

Commit

Permalink
Split API code for LTE Bluetooth and WLAN (#1094)
Browse files Browse the repository at this point in the history
Co-authored-by: rnagaraj <rahul.nagaraju@ni.com>
  • Loading branch information
RahulBenaka and RahulNagaraju15 committed Sep 20, 2024
1 parent 6c3964a commit cdefbae
Show file tree
Hide file tree
Showing 37 changed files with 4,873 additions and 139 deletions.
30 changes: 30 additions & 0 deletions generated/nirfmxbluetooth/nirfmxbluetooth.proto
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ service NiRFmxBluetooth {
rpc ACPFetchSpectrum(ACPFetchSpectrumRequest) returns (ACPFetchSpectrumResponse);
rpc AbortMeasurements(AbortMeasurementsRequest) returns (AbortMeasurementsResponse);
rpc AnalyzeIQ1Waveform(AnalyzeIQ1WaveformRequest) returns (AnalyzeIQ1WaveformResponse);
rpc AnalyzeIQ1WaveformSplit(AnalyzeIQ1WaveformSplitRequest) returns (AnalyzeIQ1WaveformSplitResponse);
rpc AutoDetectSignal(AutoDetectSignalRequest) returns (AutoDetectSignalResponse);
rpc AutoLevel(AutoLevelRequest) returns (AutoLevelResponse);
rpc BuildOffsetString(BuildOffsetStringRequest) returns (BuildOffsetStringResponse);
Expand Down Expand Up @@ -96,6 +97,7 @@ service NiRFmxBluetooth {
rpc ModAccFetchCSDetrendedPhaseTrace(ModAccFetchCSDetrendedPhaseTraceRequest) returns (ModAccFetchCSDetrendedPhaseTraceResponse);
rpc ModAccFetchCSToneTrace(ModAccFetchCSToneTraceRequest) returns (ModAccFetchCSToneTraceResponse);
rpc ModAccFetchConstellationTrace(ModAccFetchConstellationTraceRequest) returns (ModAccFetchConstellationTraceResponse);
rpc ModAccFetchConstellationTraceSplit(ModAccFetchConstellationTraceSplitRequest) returns (ModAccFetchConstellationTraceSplitResponse);
rpc ModAccFetchDEVM(ModAccFetchDEVMRequest) returns (ModAccFetchDEVMResponse);
rpc ModAccFetchDEVMMagnitudeError(ModAccFetchDEVMMagnitudeErrorRequest) returns (ModAccFetchDEVMMagnitudeErrorResponse);
rpc ModAccFetchDEVMPerSymbolTrace(ModAccFetchDEVMPerSymbolTraceRequest) returns (ModAccFetchDEVMPerSymbolTraceResponse);
Expand Down Expand Up @@ -778,6 +780,21 @@ message AnalyzeIQ1WaveformResponse {
int32 status = 1;
}

message AnalyzeIQ1WaveformSplitRequest {
nidevice_grpc.Session instrument = 1;
string selector_string = 2;
string result_name = 3;
double x0 = 4;
double dx = 5;
repeated float iqi = 6;
repeated float iqq = 7;
int32 reset = 8;
}

message AnalyzeIQ1WaveformSplitResponse {
int32 status = 1;
}

message AutoDetectSignalRequest {
nidevice_grpc.Session instrument = 1;
string selector_string = 2;
Expand Down Expand Up @@ -1558,6 +1575,19 @@ message ModAccFetchConstellationTraceResponse {
int32 actual_array_size = 3;
}

message ModAccFetchConstellationTraceSplitRequest {
nidevice_grpc.Session instrument = 1;
string selector_string = 2;
double timeout = 3;
}

message ModAccFetchConstellationTraceSplitResponse {
int32 status = 1;
repeated float constellation_i = 2;
repeated float constellation_q = 3;
int32 actual_array_size = 4;
}

message ModAccFetchDEVMRequest {
nidevice_grpc.Session instrument = 1;
string selector_string = 2;
Expand Down
43 changes: 43 additions & 0 deletions generated/nirfmxbluetooth/nirfmxbluetooth_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,30 @@ analyze_iq1_waveform(const StubPtr& stub, const nidevice_grpc::Session& instrume
return response;
}

AnalyzeIQ1WaveformSplitResponse
analyze_iq1_waveform_split(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const std::string& result_name, const double& x0, const double& dx, const std::vector<float>& iqi, const std::vector<float>& iqq, const pb::int32& reset)
{
::grpc::ClientContext context;

auto request = AnalyzeIQ1WaveformSplitRequest{};
request.mutable_instrument()->CopyFrom(instrument);
request.set_selector_string(selector_string);
request.set_result_name(result_name);
request.set_x0(x0);
request.set_dx(dx);
copy_array(iqi, request.mutable_iqi());
copy_array(iqq, request.mutable_iqq());
request.set_reset(reset);

auto response = AnalyzeIQ1WaveformSplitResponse{};

raise_if_error(
stub->AnalyzeIQ1WaveformSplit(&context, request, &response),
context);

return response;
}

AutoDetectSignalResponse
auto_detect_signal(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& timeout)
{
Expand Down Expand Up @@ -1654,6 +1678,25 @@ mod_acc_fetch_constellation_trace(const StubPtr& stub, const nidevice_grpc::Sess
return response;
}

ModAccFetchConstellationTraceSplitResponse
mod_acc_fetch_constellation_trace_split(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& timeout)
{
::grpc::ClientContext context;

auto request = ModAccFetchConstellationTraceSplitRequest{};
request.mutable_instrument()->CopyFrom(instrument);
request.set_selector_string(selector_string);
request.set_timeout(timeout);

auto response = ModAccFetchConstellationTraceSplitResponse{};

raise_if_error(
stub->ModAccFetchConstellationTraceSplit(&context, request, &response),
context);

return response;
}

ModAccFetchDEVMResponse
mod_acc_fetch_devm(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& timeout)
{
Expand Down
2 changes: 2 additions & 0 deletions generated/nirfmxbluetooth/nirfmxbluetooth_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ ACPFetchReferenceChannelPowerResponse acp_fetch_reference_channel_power(const St
ACPFetchSpectrumResponse acp_fetch_spectrum(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& timeout);
AbortMeasurementsResponse abort_measurements(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string);
AnalyzeIQ1WaveformResponse analyze_iq1_waveform(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const std::string& result_name, const double& x0, const double& dx, const std::vector<nidevice_grpc::NIComplexNumberF32>& iq, const pb::int32& reset);
AnalyzeIQ1WaveformSplitResponse analyze_iq1_waveform_split(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const std::string& result_name, const double& x0, const double& dx, const std::vector<float>& iqi, const std::vector<float>& iqq, const pb::int32& reset);
AutoDetectSignalResponse auto_detect_signal(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& timeout);
AutoLevelResponse auto_level(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& measurement_interval);
BuildOffsetStringResponse build_offset_string(const StubPtr& stub, const std::string& selector_string, const pb::int32& offset_number);
Expand Down Expand Up @@ -101,6 +102,7 @@ ModAccCfgBurstSynchronizationTypeResponse mod_acc_cfg_burst_synchronization_type
ModAccFetchCSDetrendedPhaseTraceResponse mod_acc_fetch_cs_detrended_phase_trace(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& timeout);
ModAccFetchCSToneTraceResponse mod_acc_fetch_cs_tone_trace(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& timeout);
ModAccFetchConstellationTraceResponse mod_acc_fetch_constellation_trace(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& timeout);
ModAccFetchConstellationTraceSplitResponse mod_acc_fetch_constellation_trace_split(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& timeout);
ModAccFetchDEVMResponse mod_acc_fetch_devm(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& timeout);
ModAccFetchDEVMMagnitudeErrorResponse mod_acc_fetch_devm_magnitude_error(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& timeout);
ModAccFetchDEVMPerSymbolTraceResponse mod_acc_fetch_devm_per_symbol_trace(const StubPtr& stub, const nidevice_grpc::Session& instrument, const std::string& selector_string, const double& timeout);
Expand Down
10 changes: 10 additions & 0 deletions generated/nirfmxbluetooth/nirfmxbluetooth_compilation_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ int32 AnalyzeIQ1Waveform(niRFmxInstrHandle instrumentHandle, char selectorString
return RFmxBT_AnalyzeIQ1Waveform(instrumentHandle, selectorString, resultName, x0, dx, iq, arraySize, reset, reserved);
}

int32 AnalyzeIQ1WaveformSplit(niRFmxInstrHandle instrumentHandle, char selectorString[], char resultName[], float64 x0, float64 dx, float32 iqi[], float32 iqq[], int32 arraySize, int32 reset, int64 reserved)
{
return RFmxBT_AnalyzeIQ1WaveformSplit(instrumentHandle, selectorString, resultName, x0, dx, iqi, iqq, arraySize, reset, reserved);
}

int32 AutoDetectSignal(niRFmxInstrHandle instrumentHandle, char selectorString[], float64 timeout)
{
return RFmxBT_AutoDetectSignal(instrumentHandle, selectorString, timeout);
Expand Down Expand Up @@ -402,6 +407,11 @@ int32 ModAccFetchConstellationTrace(niRFmxInstrHandle instrumentHandle, char sel
return RFmxBT_ModAccFetchConstellationTrace(instrumentHandle, selectorString, timeout, constellation, arraySize, actualArraySize);
}

int32 ModAccFetchConstellationTraceSplit(niRFmxInstrHandle instrumentHandle, char selectorString[], float64 timeout, float32 constellationI[], float32 constellationQ[], int32 arraySize, int32* actualArraySize)
{
return RFmxBT_ModAccFetchConstellationTraceSplit(instrumentHandle, selectorString, timeout, constellationI, constellationQ, arraySize, actualArraySize);
}

int32 ModAccFetchDEVM(niRFmxInstrHandle instrumentHandle, char selectorString[], float64 timeout, float64* peakRMSDEVMMaximum, float64* peakDEVMMaximum, float64* ninetyninePercentDEVM)
{
return RFmxBT_ModAccFetchDEVM(instrumentHandle, selectorString, timeout, peakRMSDEVMMaximum, peakDEVMMaximum, ninetyninePercentDEVM);
Expand Down
18 changes: 18 additions & 0 deletions generated/nirfmxbluetooth/nirfmxbluetooth_library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ NiRFmxBluetoothLibrary::NiRFmxBluetoothLibrary(std::shared_ptr<nidevice_grpc::Sh
function_pointers_.ACPFetchSpectrum = reinterpret_cast<ACPFetchSpectrumPtr>(shared_library_->get_function_pointer("RFmxBT_ACPFetchSpectrum"));
function_pointers_.AbortMeasurements = reinterpret_cast<AbortMeasurementsPtr>(shared_library_->get_function_pointer("RFmxBT_AbortMeasurements"));
function_pointers_.AnalyzeIQ1Waveform = reinterpret_cast<AnalyzeIQ1WaveformPtr>(shared_library_->get_function_pointer("RFmxBT_AnalyzeIQ1Waveform"));
function_pointers_.AnalyzeIQ1WaveformSplit = reinterpret_cast<AnalyzeIQ1WaveformSplitPtr>(shared_library_->get_function_pointer("RFmxBT_AnalyzeIQ1WaveformSplit"));
function_pointers_.AutoDetectSignal = reinterpret_cast<AutoDetectSignalPtr>(shared_library_->get_function_pointer("RFmxBT_AutoDetectSignal"));
function_pointers_.AutoLevel = reinterpret_cast<AutoLevelPtr>(shared_library_->get_function_pointer("RFmxBT_AutoLevel"));
function_pointers_.BuildOffsetString = reinterpret_cast<BuildOffsetStringPtr>(shared_library_->get_function_pointer("RFmxBT_BuildOffsetString"));
Expand Down Expand Up @@ -106,6 +107,7 @@ NiRFmxBluetoothLibrary::NiRFmxBluetoothLibrary(std::shared_ptr<nidevice_grpc::Sh
function_pointers_.ModAccFetchCSDetrendedPhaseTrace = reinterpret_cast<ModAccFetchCSDetrendedPhaseTracePtr>(shared_library_->get_function_pointer("RFmxBT_ModAccFetchCSDetrendedPhaseTrace"));
function_pointers_.ModAccFetchCSToneTrace = reinterpret_cast<ModAccFetchCSToneTracePtr>(shared_library_->get_function_pointer("RFmxBT_ModAccFetchCSToneTrace"));
function_pointers_.ModAccFetchConstellationTrace = reinterpret_cast<ModAccFetchConstellationTracePtr>(shared_library_->get_function_pointer("RFmxBT_ModAccFetchConstellationTrace"));
function_pointers_.ModAccFetchConstellationTraceSplit = reinterpret_cast<ModAccFetchConstellationTraceSplitPtr>(shared_library_->get_function_pointer("RFmxBT_ModAccFetchConstellationTraceSplit"));
function_pointers_.ModAccFetchDEVM = reinterpret_cast<ModAccFetchDEVMPtr>(shared_library_->get_function_pointer("RFmxBT_ModAccFetchDEVM"));
function_pointers_.ModAccFetchDEVMMagnitudeError = reinterpret_cast<ModAccFetchDEVMMagnitudeErrorPtr>(shared_library_->get_function_pointer("RFmxBT_ModAccFetchDEVMMagnitudeError"));
function_pointers_.ModAccFetchDEVMPerSymbolTrace = reinterpret_cast<ModAccFetchDEVMPerSymbolTracePtr>(shared_library_->get_function_pointer("RFmxBT_ModAccFetchDEVMPerSymbolTrace"));
Expand Down Expand Up @@ -283,6 +285,14 @@ int32 NiRFmxBluetoothLibrary::AnalyzeIQ1Waveform(niRFmxInstrHandle instrumentHan
return function_pointers_.AnalyzeIQ1Waveform(instrumentHandle, selectorString, resultName, x0, dx, iq, arraySize, reset, reserved);
}

int32 NiRFmxBluetoothLibrary::AnalyzeIQ1WaveformSplit(niRFmxInstrHandle instrumentHandle, char selectorString[], char resultName[], float64 x0, float64 dx, float32 iqi[], float32 iqq[], int32 arraySize, int32 reset, int64 reserved)
{
if (!function_pointers_.AnalyzeIQ1WaveformSplit) {
throw nidevice_grpc::LibraryLoadException("Could not find RFmxBT_AnalyzeIQ1WaveformSplit.");
}
return function_pointers_.AnalyzeIQ1WaveformSplit(instrumentHandle, selectorString, resultName, x0, dx, iqi, iqq, arraySize, reset, reserved);
}

int32 NiRFmxBluetoothLibrary::AutoDetectSignal(niRFmxInstrHandle instrumentHandle, char selectorString[], float64 timeout)
{
if (!function_pointers_.AutoDetectSignal) {
Expand Down Expand Up @@ -811,6 +821,14 @@ int32 NiRFmxBluetoothLibrary::ModAccFetchConstellationTrace(niRFmxInstrHandle in
return function_pointers_.ModAccFetchConstellationTrace(instrumentHandle, selectorString, timeout, constellation, arraySize, actualArraySize);
}

int32 NiRFmxBluetoothLibrary::ModAccFetchConstellationTraceSplit(niRFmxInstrHandle instrumentHandle, char selectorString[], float64 timeout, float32 constellationI[], float32 constellationQ[], int32 arraySize, int32* actualArraySize)
{
if (!function_pointers_.ModAccFetchConstellationTraceSplit) {
throw nidevice_grpc::LibraryLoadException("Could not find RFmxBT_ModAccFetchConstellationTraceSplit.");
}
return function_pointers_.ModAccFetchConstellationTraceSplit(instrumentHandle, selectorString, timeout, constellationI, constellationQ, arraySize, actualArraySize);
}

int32 NiRFmxBluetoothLibrary::ModAccFetchDEVM(niRFmxInstrHandle instrumentHandle, char selectorString[], float64 timeout, float64* peakRMSDEVMMaximum, float64* peakDEVMMaximum, float64* ninetyninePercentDEVM)
{
if (!function_pointers_.ModAccFetchDEVM) {
Expand Down
6 changes: 6 additions & 0 deletions generated/nirfmxbluetooth/nirfmxbluetooth_library.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class NiRFmxBluetoothLibrary : public nirfmxbluetooth_grpc::NiRFmxBluetoothLibra
int32 ACPFetchSpectrum(niRFmxInstrHandle instrumentHandle, char selectorString[], float64 timeout, float64* x0, float64* dx, float32 spectrum[], int32 arraySize, int32* actualArraySize) override;
int32 AbortMeasurements(niRFmxInstrHandle instrumentHandle, char selectorString[]) override;
int32 AnalyzeIQ1Waveform(niRFmxInstrHandle instrumentHandle, char selectorString[], char resultName[], float64 x0, float64 dx, NIComplexSingle iq[], int32 arraySize, int32 reset, int64 reserved) override;
int32 AnalyzeIQ1WaveformSplit(niRFmxInstrHandle instrumentHandle, char selectorString[], char resultName[], float64 x0, float64 dx, float32 iqi[], float32 iqq[], int32 arraySize, int32 reset, int64 reserved) override;
int32 AutoDetectSignal(niRFmxInstrHandle instrumentHandle, char selectorString[], float64 timeout) override;
int32 AutoLevel(niRFmxInstrHandle instrumentHandle, char selectorString[], float64 measurementInterval, float64* referenceLevel) override;
int32 BuildOffsetString(char selectorString[], int32 offsetNumber, int32 selectorStringOutLength, char selectorStringOut[]) override;
Expand Down Expand Up @@ -100,6 +101,7 @@ class NiRFmxBluetoothLibrary : public nirfmxbluetooth_grpc::NiRFmxBluetoothLibra
int32 ModAccFetchCSDetrendedPhaseTrace(niRFmxInstrHandle instrumentHandle, char selectorString[], float64 timeout, float64* x0, float64* dx, float32 csDetrendedPhase[], int32 arraySize, int32* actualArraySize) override;
int32 ModAccFetchCSToneTrace(niRFmxInstrHandle instrumentHandle, char selectorString[], float64 timeout, float64* x0, float64* dx, float32 csToneAmplitude[], float32 csTonePhase[], int32 arraySize, int32* actualArraySize) override;
int32 ModAccFetchConstellationTrace(niRFmxInstrHandle instrumentHandle, char selectorString[], float64 timeout, NIComplexSingle constellation[], int32 arraySize, int32* actualArraySize) override;
int32 ModAccFetchConstellationTraceSplit(niRFmxInstrHandle instrumentHandle, char selectorString[], float64 timeout, float32 constellationI[], float32 constellationQ[], int32 arraySize, int32* actualArraySize) override;
int32 ModAccFetchDEVM(niRFmxInstrHandle instrumentHandle, char selectorString[], float64 timeout, float64* peakRMSDEVMMaximum, float64* peakDEVMMaximum, float64* ninetyninePercentDEVM) override;
int32 ModAccFetchDEVMMagnitudeError(niRFmxInstrHandle instrumentHandle, char selectorString[], float64 timeout, float64* averageRMSMagnitudeErrorMean, float64* peakRMSMagnitudeErrorMaximum) override;
int32 ModAccFetchDEVMPerSymbolTrace(niRFmxInstrHandle instrumentHandle, char selectorString[], float64 timeout, float32 devmPerSymbol[], int32 arraySize, int32* actualArraySize) override;
Expand Down Expand Up @@ -175,6 +177,7 @@ class NiRFmxBluetoothLibrary : public nirfmxbluetooth_grpc::NiRFmxBluetoothLibra
using ACPFetchSpectrumPtr = decltype(&RFmxBT_ACPFetchSpectrum);
using AbortMeasurementsPtr = decltype(&RFmxBT_AbortMeasurements);
using AnalyzeIQ1WaveformPtr = decltype(&RFmxBT_AnalyzeIQ1Waveform);
using AnalyzeIQ1WaveformSplitPtr = decltype(&RFmxBT_AnalyzeIQ1WaveformSplit);
using AutoDetectSignalPtr = decltype(&RFmxBT_AutoDetectSignal);
using AutoLevelPtr = decltype(&RFmxBT_AutoLevel);
using BuildOffsetStringPtr = decltype(&RFmxBT_BuildOffsetString);
Expand Down Expand Up @@ -241,6 +244,7 @@ class NiRFmxBluetoothLibrary : public nirfmxbluetooth_grpc::NiRFmxBluetoothLibra
using ModAccFetchCSDetrendedPhaseTracePtr = decltype(&RFmxBT_ModAccFetchCSDetrendedPhaseTrace);
using ModAccFetchCSToneTracePtr = decltype(&RFmxBT_ModAccFetchCSToneTrace);
using ModAccFetchConstellationTracePtr = decltype(&RFmxBT_ModAccFetchConstellationTrace);
using ModAccFetchConstellationTraceSplitPtr = decltype(&RFmxBT_ModAccFetchConstellationTraceSplit);
using ModAccFetchDEVMPtr = decltype(&RFmxBT_ModAccFetchDEVM);
using ModAccFetchDEVMMagnitudeErrorPtr = decltype(&RFmxBT_ModAccFetchDEVMMagnitudeError);
using ModAccFetchDEVMPerSymbolTracePtr = decltype(&RFmxBT_ModAccFetchDEVMPerSymbolTrace);
Expand Down Expand Up @@ -316,6 +320,7 @@ class NiRFmxBluetoothLibrary : public nirfmxbluetooth_grpc::NiRFmxBluetoothLibra
ACPFetchSpectrumPtr ACPFetchSpectrum;
AbortMeasurementsPtr AbortMeasurements;
AnalyzeIQ1WaveformPtr AnalyzeIQ1Waveform;
AnalyzeIQ1WaveformSplitPtr AnalyzeIQ1WaveformSplit;
AutoDetectSignalPtr AutoDetectSignal;
AutoLevelPtr AutoLevel;
BuildOffsetStringPtr BuildOffsetString;
Expand Down Expand Up @@ -382,6 +387,7 @@ class NiRFmxBluetoothLibrary : public nirfmxbluetooth_grpc::NiRFmxBluetoothLibra
ModAccFetchCSDetrendedPhaseTracePtr ModAccFetchCSDetrendedPhaseTrace;
ModAccFetchCSToneTracePtr ModAccFetchCSToneTrace;
ModAccFetchConstellationTracePtr ModAccFetchConstellationTrace;
ModAccFetchConstellationTraceSplitPtr ModAccFetchConstellationTraceSplit;
ModAccFetchDEVMPtr ModAccFetchDEVM;
ModAccFetchDEVMMagnitudeErrorPtr ModAccFetchDEVMMagnitudeError;
ModAccFetchDEVMPerSymbolTracePtr ModAccFetchDEVMPerSymbolTrace;
Expand Down
Loading

0 comments on commit cdefbae

Please sign in to comment.