RFmx Demod Python API Documentation =================================== About ===== The **nirfmx-python** repository generates Python bindings (Application Programming Interface) for interacting with the NI-RFmx drivers. **nirfmx-python** follows `Python Software Foundation `_ support policy for different versions. Operating System Support ======================== **nirfmxdemod** supports Windows systems where the supported drivers are installed. Refer to `NI Hardware and Operating System Compatibility `_ for which versions of the driver support your hardware on a given operating system. Installation ============ You can use `pip `_ to download `nirfmxdemod `_ and install it. .. code-block:: shell $ python -m pip install nirfmxdemod Support and Feedback ==================== For support with Python API, hardware, the driver runtime or any other questions, please visit `NI Community Forums `_. Documentation: ============== .. toctree:: :maxdepth: 1 analog_demod analog_demod_configuration analog_demod_results attributes demod digital_demod digital_demod_configuration digital_demod_results enums errors grpc_session_options Example: ======== .. code-block:: python import nirfmxinstr import nirfmxdemod instr_session = None demod = None try: # Create a new RFmx Session instr_session = nirfmxinstr.Session(resource_name="RFSA", option_string="") # Get Demod signal demod = instr_session.get_demod_signal_configuration() # Configure measurement demod.set_selected_ports(selector_string="", value="") demod.configure_rf(selector_string="", center_frequency=1e9, reference_level=0.0, external_attenuation=0.0) demod.analog_demod.configuration.configure_rbw_filter( selector_string="", rbw=100e3, rbw_filter_type=nirfmxdemod.ADemodRbwFilterType.FLAT, rbw_rrc_alpha=0.1 ) demod.analog_demod.configuration.configure_measurement_interval(selector_string="", measurement_interval=10e-3) demod.analog_demod.configuration.configure_am_carrier_suppressed( selector_string="", am_carrier_suppressed_enabled=nirfmxdemod.ADemodAMCarrierSuppressedEnabled.FALSE ) demod.analog_demod.configuration.configure_averaging( selector_string="", averaging_enabled=nirfmxdemod.ADemodAveragingEnabled.FALSE, averaging_count=10, averaging_type=nirfmxdemod.ADemodAveragingType.LINEAR ) # Retrieve results mean_modulation_depth, mean_carrier_power, error_code = demod.analog_demod.results.read_am( selector_string="", timeout=10.0 ) # Print Results print(f"Mean Modulation Depth (%) : {mean_modulation_depth}") print(f"Mean Carrier Power (dBm) : {mean_carrier_power}") except Exception as e: print("ERROR: " + str(e)) finally: # Close Session if demod is not None: demod.dispose() demod = None if instr_session is not None: instr_session.close() instr_session = None Additional Documentation ======================== Refer to the `NI-RFmx User Manual `_ for an overview of NI-RFmx, system requirements, troubleshooting, key concepts, etc. License ======= This project is licensed under the MIT License. While the source code is not publicly released, the license permits binary distribution with attribution. **Note:** This Python driver depends on several third-party components that are subject to separate commercial licenses. Users are responsible for ensuring they have the appropriate rights and licenses to use those dependencies in their environments. gRPC Features ============= For driver APIs that support it, passing a GrpcSessionOptions instance as a parameter to :py:meth:`nirfmxinstr.Session.__init__()` is subject to the NI General Purpose EULA. SSL/TLS Support =============== The server supports both server-side TLS and mutual TLS. Security configuration is accomplished by setting the `server_cert`, `server_key` and `root_cert` values in the server's configuration file. The server expects the certificate files specified in the configuration file to exist in a `certs` folder that is located in the same directory as the configuration file being used by the server. For more detailed information on SSL/TLS support refer to the [Server Security Support wiki page](https://github.com/ni/grpc-device/wiki/Server-Security-Support). Indices and Tables ================== * :ref:`genindex` * :ref:`modindex`