gRPC Reference Document (rtg_api_service.proto)

Plain text of the RTG API Service protocol buffer file.

Copy and paste the following into a text document. Save as rtg_api_service.proto.

// Proto3 Language Guide: https://developers.google.com/protocol-buffers/docs/proto3 
// Proto Buffer File Style Guide: https://developers.google.com/protocol-buffers/docs/style

syntax = "proto3";

package ni.rtg.v1;

option csharp_namespace = "NI.RTG.V1";
option go_package = "rtgv1";
option java_multiple_files = true;
option java_outer_classname = "RTGProto";
option java_package = "com.ni.rtg.v1";
option objc_class_prefix = "NIRTG";
option php_namespace = "NI\\RTG\\V1";
option ruby_package = "NI::RTG::V1";

//////////////
// service //
////////////

service  RtgApiService {
// *** Configuration *** 

//	GetMinimumAttenuations
//		Returns the minimum attenuations from a calibrated RTG system.
rpc GetMinimumAttenuations(GetMinimumAttenuationsRequest) returns (GetMinimumAttenuationsResponse);

//	GetMinimumTimeDelay
//		Returns the minimum time delay from an RTG system.
rpc GetMinimumTimeDelay(GetMinimumTimeDelayRequest) returns (GetMinimumTimeDelayResponse);

//	PulseDetectionCalibration
//		Runs Pulse Detection Calibration on the specified device in an RTG system.
rpc PulseDetectionCalibration(PulseDetectionCalibrationRequest) returns (PulseDetectionCalibrationResponse);

//	SetOutputExternalAttenuation
//		Sets the total Output External Attenuation connected to the specified device in the RTG system.
//		This VI can only be called when the RTG is in the inactive state.
rpc SetOutputExternalAttenuation(SetOutputExternalAttenuationRequest) returns (SetOutputExternalAttenuationResponse);

//	SetExternalTimeDelay
//		Sets the External Delay connected to the specific device in the RTG system.
//		This VI can only be called when the RTG is in the inactive state.
rpc SetExternalTimeDelay(SetExternalTimeDelayRequest) returns (SetExternalTimeDelayResponse);

//	SetOffsetFrequency
//		Sets the Offset Frequency for the specified device in the RTG system.
//		The RTG System uses 1 GHz of real-time bandwidth.
//		When used in conjunction with narrower band radars, this parameter is used to shift the effective frequency
//		of operation away from the LOs in the RTG system's RF Analyzer and Generator which can improve performance
//		in terms of SNR and Dynamic Range.
//		Setting this parameter does not change any setting directly on the specified device, rather it uses this
//		offset frequency to read a more accurate value from its calibration database.
//		This VI can only be called when the RTG is in the inactive state.
rpc SetOffsetFrequency(SetOffsetFrequencyRequest) returns (SetOffsetFrequencyResponse);

//	SetCommonAttenuation
//		Sets the Common Attenuation to be used by the RTG system.
//		The Common Attenuation is the amount of RF power reduction to use for all targets.
//		Setting this can help optimize the RTG System for the best available dynamic range in a given scenario.
//		This VI can only be called when the RTG is in the inactive state.
rpc SetCommonAttenuation(SetCommonAttenuationRequest) returns (SetCommonAttenuationResponse);

//	EnableMmWave
//		Enables the mmWave Heads for the specified device in an RTG system.
//		This VI can only be called when the RTG is in the inactive state.
rpc EnableMmWave(EnableMmWaveRequest) returns (EnableMmWaveResponse);

//	Initialize
//		Initializes the RTG system.
//		* Opens sessions to specified hardware.
//		* Moves the RTG system to the inactive state.
rpc Initialize(InitializeRequest) returns (InitializeResponse);

//	QuerySystemResources
//		Returns information about the hardware in an RTG system.
//		Indexing each array with the same value corresponds to information about the same device.
rpc QuerySystemResources(QuerySystemResourcesRequest) returns (QuerySystemResourcesResponse);

// SetCenterFrequency
//		Sets the center frequency for the specified device in an RTG system.
//		This VI can only be called when the RTG is in the inactive state.
rpc SetCenterFrequency(SetCenterFrequencyRequest) returns (SetCenterFrequencyResponse);

//	SetReferenceLevel
//		Sets the Reference Level for the specified device in an RTG system.
//		This VI can only be called when the RTG is in the inactive state.
rpc SetReferenceLevel(SetReferenceLevelRequest) returns (SetReferenceLevelResponse);

//	SetHardwareTrigger
//		Specifies the hardware (input) trigger to be used to trigger the application of a new Target Configuration.
//		This VI can only be called when the RTG is in the inactive state.
rpc SetHardwareTrigger(SetHardwareTriggerRequest) returns (SetHardwareTriggerResponse);

//  EnableFrequencyCorrection
//		Determines whether frequency correction is enabled.
//		This VI can only be called when RTG is in the inactive state.
rpc EnableFrequencyCorrection(EnableFrequencyCorrectionRequest) returns (EnableFrequencyCorrectionResponse);

//  SetExternalLo
//  	Configures an external LO to be used with the RTG instrument.
//  	This VI can only be called when RTG is in the inactive state.
rpc SetExternalLo(SetExternalLoRequest) returns (SetExternalLoResponse);

//  GetExternalLo
//  	Gets the external LO parameters for the specified device in an RTG system.
//  	This VI can only be called when RTG is in the inactive state.
rpc GetExternalLo(GetExternalLoRequest) returns (GetExternalLoResponse);

// *** RTG ***

//	GetRtgStatus
//		Returns current state information from an RTG system.
rpc GetRtgStatus(GetRtgStatusRequest) returns (GetRtgStatusResponse);

//	GetVersion
//		Returns version information from an RTG device.
rpc GetVersion(GetVersionRequest) returns (GetVersionResponse);

//	SendTargetConfiguration
//		Sends a Target Configuration to the specified device in an RTG system.
//		Call the Stop method to interrupt this process after it is called.
rpc SendTargetConfiguration(SendTargetConfigurationRequest) returns (SendTargetConfigurationResponse);

//	SendTargetConfigurationTimeFrequency
//		Sends a Target Configuration to the specified device in an RTG system with delay specified in (s) and doppler specified in (Hz).
//		Call the Stop method to interrupt this process after it is called.
rpc	SendTargetConfigurationTimeFrequency(SendTargetConfigurationTimeFrequencyRequest) returns (SendTargetConfigurationTimeFrequencyResponse);

//	SendTargetConfigurationRangeVelocity
//		Sends a Target Configuration to the specified device in an RTG system with delay specified in (m) and doppler specified in (m/s).
//		Call the Stop method to interrupt this process after it is called.
rpc	SendTargetConfigurationRangeVelocity(SendTargetConfigurationRangeVelocityRequest) returns (SendTargetConfigurationRangeVelocityResponse);

//	SendTargetConfigurationListFiles
//		Send the contents of the specified list of files, which contain target configurations, to the specified device on an RTG System.
rpc SendTargetConfigurationListFiles(SendTargetConfigurationListFilesRequest) returns (SendTargetConfigurationListFilesResponse);

//	SendTargetConfigurationParameterSweep
//		Sends a Target Configuration List which performs a user defined sweep of the specified parameter(s). 
//		Call the Stop method to interrupt this process after it is called.
rpc SendTargetConfigurationParameterSweep(SendTargetConfigurationParameterSweepRequest) returns (SendTargetConfigurationParameterSweepResponse);

//	SendSoftwareTrigger
//		Sends a Software Trigger to the specified device in an RTG system.
rpc SendSoftwareTrigger(SendSoftwareTriggerRequest) returns (SendSoftwareTriggerResponse);

//	SetPri
//		Sets the Pulse Repetition Interval (PRI) for the specified device on an RTG system.
//		This VI can only be called when the RTG is in the inactive state.
rpc SetPri(SetPriRequest) returns (SetPriResponse);

// *** System ***

//	Close
//		Close releases references to hardware and moves the RTG into the idle state.
rpc Close(CloseRequest) returns (CloseResponse);

//	Start
//		Starts the RTG system and moves it into the active state.
//		This VI has no effect if the RTG system is not in the inactive state.
rpc Start(StartRequest) returns (StartResponse);

//	Stop
//		Stops the RTG system and moves it into the inactive state.
//		This can be used to stop an RTG system that is in the active state.
rpc Stop(StopRequest) returns (StopResponse);

// *** Signal Monitor ***

//	ReadMaxPower
//		Returns the maximum power measured by the Signal Monitor.
rpc ReadMaxPower(ReadMaxPowerRequest) returns (ReadMaxPowerResponse);

//	ReadMinPower
//		Returns the minimum power measured by the Signal Monitor.
rpc ReadMinPower(ReadMinPowerRequest) returns (ReadMinPowerResponse);

//	ReadOverflowStatus
//		Returns the overflow status flag measured by the Signal Monitor.
rpc ReadOverflowStatus(ReadOverflowStatusRequest) returns (ReadOverflowStatusResponse);

//	ResetMaxPower
//		Resets the maximum power measurement in the Signal Monitor.
rpc ResetMaxPower(ResetMaxPowerRequest) returns (ResetMaxPowerResponse);

//	ResetOverflowStatus
//		Resets the overflow status flag measured by the Signal Monitor.
rpc ResetOverflowStatus(ResetOverflowStatusRequest) returns (ResetOverflowStatusResponse);

//  WriteArmIspDma
//  	Arms the ISP DMA to allow it to be read.
rpc WriteArmIspDma(WriteArmIspDmaRequest) returns (WriteArmIspDmaResponse);

//  ReadIspDmaData
//  	Reads data from the ISP DMA FIFO.
rpc ReadIspDmaData(ReadIspDmaDataRequest) returns (ReadIspDmaDataResponse);

} 

//////////////////////
// common messages //
////////////////////

//	Status
//		error_status: TRUE = error, FALSE = no error.
//		error_code: Identifies the error that occurred.
//		error_message: Provides more details about this error.
message Status {
	bool error_status = 1;
	int32 error_code = 2;
	string error_message = 3;
}

//	DeviceId
//		device_id: The index of the RTG device.
message DeviceId {
	int32 device_id = 1;
}

//	DeviceIdDouble
//		device_id: The index of the RTG device.
//		parameter: Varies by calling function.
message DeviceIdDouble {
	DeviceId device_id = 1;
	double parameter = 2;
}

//	TargetConfigurationParameterSweep
//		target_enable: TRUE: this target is active.
//		start_time_offset: Amount of delay (in seconds) at start of scenario.
//		time_offset_rate_of_change: Rate of change in delay (seconds per second).
//		start_attenuation: Amount of attenuation (in dB) at start of scenario.
//		attenuation_rate_of_change: Rate of change in attenuation (dB per second).
//		start_freq_shift: Amount of frequency shift (in Hz) at start of scenario.
//		freq_shift_rate_of_change: Rate of change in frequency shift (Hz per second).
message TargetConfigurationParameterSweep {
	bool target_enable = 1;
	double start_time_offset = 2;
	double time_offset_rate_of_change = 3;
	double start_attenuation = 4;
	double attenuation_rate_of_change = 5;
	double start_freq_shift = 6;
	double freq_shift_rate_of_change = 7;
}

//	BasicTarget
//		target_time_offset: The time (in seconds) an incoming signal should be delayed by.
//		target_attenuation: The amount of attenuation (in dB) applied to the incoming signal.
//		target_doppler: Applies a frequency shift to the incoming signal depending on the value of relative velocity enable.
//		target_enable: TRUE: This target is included in the output.  FALSE: Target is not included in the output.
//		target_relative_velocity_enable: TRUE: target_doppler units are in m/s. FALSE: target_doppler units are in Hz.
message BasicTarget {
	double target_time_offset = 1;
	double target_attenuation = 2;
	double target_doppler = 3;
	bool target_enable = 4;
	bool target_relative_velocity_enable = 5; 
}

//	TargetRangeVelocity
//		target_range: The distance (in meters) an incoming signal should be delayed by.
//		target_attenuation: The amount of attenuation (in dB) applied to the incoming signal.
//		target_velocity_offset: Applies a frequency shift to the incoming signal in terms of a velocity offset (in m/s).
//		target_enable: TRUE: This target is included in the output.  FALSE: Target is not included in the output.
message TargetRangeVelocity {
	double target_range = 1;
	double target_attenuation = 2;
	double target_velocity_offset = 3;
	bool target_enable = 4;
}

//	TargetTimeFrequency
//		target_time_offset: The time (in seconds) an incoming signal should be delayed by.
//		target_attenuation: The amount of attenuation (in dB) applied to the incoming signal.
//		target_frequency_offset: Applies a frequency shift to the incoming signal in terms of a frequency offset (in Hz).
//		target_enable: TRUE: This target is included in the output.  FALSE: Target is not included in the output.
message TargetTimeFrequency {
	double target_time_offset = 1;
	double target_attenuation = 2;
	double target_frequency_offset = 3;
	bool target_enable = 4;
}

//	Synchronization
//		sync_mode: the selected method of applying the target configuration.
//		time_offset: the time (in seconds) after the selected sync mode for
//		which the RTG targets will be applied. This has no effect on
//		Software Trigger or Hardware Trigger which are applied
//		immediately upon receipt of the specified trigger.
message Synchronization {
	int32 sync_mode = 1;
	double time_offset = 2;
}

//  ExternalLoParameters
//  	enable_external_lo: TRUE: The RTG will be configured to accept an external LO with the specified parameters. FALSE: Onboard LO is used.
//  	lo_in_frequency: The frequency of the signal being sent into the RTG's external LO in port (in Hz).
//  	lo_in_power: The power of the signal being sent into the RTG's external LO in port (in dBm).
message ExternalLoParameters {
	bool enable_external_lo = 1;
	double lo_in_frequency = 2;
	double lo_in_power = 3;
}

//////////////////////
// method messages //
////////////////////

message GetMinimumAttenuationsRequest {
	DeviceId device_id = 1;
}

//	GetMinimumAttenuationsResponse
//		cal_data: An array of attenuations in dB. This is essentially the list of Common Attenuations that can be used.
//		cal_data_found: Indicates that the list of attenuations is from a calibrated system.
message GetMinimumAttenuationsResponse {
	repeated double cal_data = 1;
	bool cal_data_found = 2;
	Status error = 3;
}

message GetMinimumTimeDelayRequest {
	DeviceId device_id = 1;
}

//	GetMinimumTimeDelayResponse
//		cal_data: The minimum time delay in seconds.
//		cal_data_found: Indicates that the minimum time delay is from a calibrated system.
message GetMinimumTimeDelayResponse {
	double cal_data = 1;
	bool cal_data_found = 2;
	Status error = 3;
}

message PulseDetectionCalibrationRequest {
	DeviceId device_id = 1;
}

message PulseDetectionCalibrationResponse {
	Status error = 1;
}

//	SetOutputExternalAttenuationRequest
//		parameter: The known value of attenuation (in dB) external to the output of the device.
message SetOutputExternalAttenuationRequest {
	DeviceIdDouble parameter = 1;
}

message SetOutputExternalAttenuationResponse {
	Status error = 1;
}

//	SetExternalTimeDelayRequest
//		parameter: The known delay (in seconds) connected externally to the device.
message SetExternalTimeDelayRequest {
	DeviceIdDouble parameter = 1;
}

message SetExternalTimeDelayResponse {
	Status error = 1;
}

//	SetOffsetFrequencyRequest
//		parameter: The offset frequency of the device in Hz.
message SetOffsetFrequencyRequest {
	DeviceIdDouble parameter = 1;
}

message SetOffsetFrequencyResponse {
	Status error = 1;
}

//	SetCommonAttenuationRequest
//		parameter: The amount of RF attenuation (in dB) to use.
message SetCommonAttenuationRequest {
	DeviceIdDouble parameter = 1;
}

//	SetCommonAttenuationResponse
//		coerced_attenuation: The actual amount of RF attenuation (in dB) that the system will use.
message SetCommonAttenuationResponse {
	double coerced_attenuation = 1;
	Status error = 2;
}

//	EnableMmWaveRequest
//		parameter: Enables or disables the mmWave Head.
message EnableMmWaveRequest {
	DeviceId device_id = 1;
	bool parameter = 2;
}

message EnableMmWaveResponse {
	Status error = 1;
}

//	InitializeRequest
//		instrument_names: An array of instrument names defined in NI Max.
message InitializeRequest {
	repeated string instrument_names = 1;
	string options = 2;
}

message InitializeResponse {
	Status error = 1;
}

//	QuerySystemResourcesRequest
//		experts: Experts used to query the system.
message QuerySystemResourcesRequest {
	string experts = 1;
}

//	QuerySystemResourcesResponse
//		resource_names: An array of resource names.
//		product_names: An array of product names.
//		serial_numbers: An array of serial numbers.
message QuerySystemResourcesResponse {
	repeated string resource_names = 1;
	repeated string product_names = 2;
	repeated string serial_numbers = 3;
	Status error = 4;
}

//	SetCenterFrequencyRequest
//		parameter: The desired frequency (in Hz) of operation.
message SetCenterFrequencyRequest {
	DeviceIdDouble parameter = 1;
}

message SetCenterFrequencyResponse {
	Status error = 1;
}

//	SetReferenceLevelRequest
//		parameter: The reference level (in dBm) to be used.
message SetReferenceLevelRequest {
	DeviceIdDouble parameter = 1;
}

message SetReferenceLevelResponse {
	Status error = 1;
}

//	SetHardwareTriggerRequest
//		parameter: Any valid trigger that can be routed to the specified device.
message SetHardwareTriggerRequest {
	DeviceId device_id = 1;
	string parameter = 2;
}

message SetHardwareTriggerResponse {
	Status error = 1;
}

//  EnableFrequencyCorrectionRequest
//      parameter: Enables or disables frequency correction.
message EnableFrequencyCorrectionRequest {
	DeviceId device_id = 1;
	bool parameter = 2;
}

message EnableFrequencyCorrectionResponse {
	Status error = 1;
}

message GetRtgStatusRequest {}

//	GetRtgStatusResponse
//		rtg_state: The current state of the RTG.
//		rtg_details: Status messages sent from the RTG.
message GetRtgStatusResponse {
	string rtg_state = 1;
	string rtg_details = 2;
	Status error = 3;
}

message GetVersionRequest {
	DeviceId device_id = 1;
}

//	GetVersionResponse
//		version: The version information from the RTG system.
message GetVersionResponse {
	string version = 1;
	Status error = 2;
}

//	SendTargetConfigurationRequest
//		device_id:
//		sync: Section that is provided to all targets.
//		* sync mode: The selected method of applying the target configuration.
//		* time offset: The time (in seconds) after the selected sync mode for which 
//		the RTG targets will be applied.  This has no effect on Software Trigger or 
//		Hardware Trigger which are applied immediately upon receipt of the specified trigger.
//		targets: An array of up to four RTG targets.
//		* time offset: The time (in seconds) an incoming signal should be delayed by.
//		* attenuation: The amount of attenuation (in dB) applied to the incoming signal.
//		* doppler: Applies a frequency shift to the incoming signal (in Hz).
message SendTargetConfigurationRequest {
	DeviceId device_id = 1;
	Synchronization sync = 2;
	repeated BasicTarget targets = 3;	
}

message SendTargetConfigurationResponse {
	bool response = 1;
	Status error = 2;
}

message SendTargetConfigurationRangeVelocityRequest {
	DeviceId device_id = 1;
	Synchronization sync = 2;
	repeated TargetRangeVelocity targets = 3;
}

message SendTargetConfigurationRangeVelocityResponse {
	bool response = 1;
	Status error = 2;
}

message SendTargetConfigurationTimeFrequencyRequest {
	DeviceId device_id = 1;
	Synchronization sync = 2;
	repeated TargetTimeFrequency targets = 3;
}

message SendTargetConfigurationTimeFrequencyResponse {
	bool response = 1;
	Status error = 2;
}

//	SendTargetConfigurationListFilesRequest
//		file_paths: An array of the files to be sent.
message SendTargetConfigurationListFilesRequest {
	DeviceId device_id = 1;
	repeated string file_paths = 2;
}

message SendTargetConfigurationListFilesResponse {
	Status error = 1;
}

//	SendTargetConfigurationParameterSweepRequest
//		scenario_duration: The length of time (in seconds) for which the Target Configuration Parameter Sweep scenario is to be run.
//		configuration_update_rate: The rate (in Hz) at which the configurations specified in target configuration parameter sweeps are applied.
message SendTargetConfigurationParameterSweepRequest {
	DeviceId device_id = 1;
	repeated TargetConfigurationParameterSweep target_configuration_parameter_sweeps = 2;
	double scenerio_duration = 3;
	double configuration_update_rate = 4;
}

message SendTargetConfigurationParameterSweepResponse {
	Status error = 1;
}

message SendSoftwareTriggerRequest {
	DeviceId device_id = 1;
}

message SendSoftwareTriggerResponse {
	Status error = 1;
}

//	SetPriRequest
//		parameter: The PRI to be used (in seconds).
message SetPriRequest {
	DeviceIdDouble parameter = 1;
}

message SetPriResponse {
	Status error = 1;
}

message SetExternalLoRequest {
	DeviceId device_id = 1;
	ExternalLoParameters external_lo_parameters = 2;
}

message SetExternalLoResponse {
	Status error = 1;
}

message GetExternalLoRequest {
	DeviceId device_id = 1;
}

message GetExternalLoResponse {
	ExternalLoParameters external_lo_parameters = 1;
	Status error = 2;
}

message CloseRequest {}

message CloseResponse {
	Status error = 1;
}

message StartRequest {}

message StartResponse {
	Status error = 1;
}

message StopRequest {}

message StopResponse {
	Status error = 1;
}

// *** Signal Monitor Messages ***

//	SignalMonitor
//		signal_monitor: Specifies which signal monitor to be used.
//		Input: 0, Output: 1
message SignalMonitor {
	int32 signal_monitor = 1;
}

message ReadMaxPowerRequest {
	DeviceId device_id = 1;
	SignalMonitor signal_monitor = 2;
}

//	ReadMaxPowerResponse
//		max_power: The maximum power read from the specified signal monitor (in magnitude squared).
message ReadMaxPowerResponse {
	double max_power = 1;
	Status error = 2;
}

message ReadMinPowerRequest {
	DeviceId device_id = 1;
	SignalMonitor signal_monitor = 2;
}

//	ReadMinPowerResponse
//		min_power: The minimum power read from the specified signal monitor (in magnitude squared).
message ReadMinPowerResponse {
	double min_power = 1;
	Status error = 2;
}

message ReadOverflowStatusRequest {
	DeviceId device_id = 1;
	SignalMonitor signal_monitor = 2;
}

message ReadOverflowStatusResponse {
	bool response = 1;
	Status error = 2;
}

message ResetMaxPowerRequest {
	DeviceId device_id = 1;
	SignalMonitor signal_monitor = 2;	
}	

message ResetMaxPowerResponse {
	Status error = 1;
}

message ResetOverflowStatusRequest {
	DeviceId device_id = 1;
	SignalMonitor signal_monitor = 2;
}

message ResetOverflowStatusResponse {
	Status error = 1;
}

message WriteArmIspDmaRequest {
	DeviceId device_id = 1;
}

message WriteArmIspDmaResponse {
	Status error = 1;
}

message ReadIspDmaDataRequest {
	DeviceId device_id = 1;
}

//	ReadISPDmaDateResponse
//		isp_dma_data: Complex data returned from the ISP DMA FIFO.
message ReadIspDmaDataResponse {
	repeated double isp_dma_data = 1;
	Status error = 2;
}