The class ChemClient lets a Python program inspect and control CHEM. You can use it in experiment scripts and in your own tools.
from pychem import ChemClient
client = ChemClient(addr="localhost", port=5000)
print(client.get_version())
print(client.get_nodes())
print(client.get_channels())
client.close()
ChemClient(addr="", port=5000): create a client. If the address is empty, PyCHEM finds it as described in Section 7.1.
connect(): open the connection.
close(): close the connection.
connected: a property that shows if the client is connected.
get_version(), get_status(), get_config()
get_nodes(), get_channels(), get_individual_channels()
get_antenna_patterns(), get_antenna_types()
get_shadow_std(), get_shadow_std_for_freq(freq_mhz)
set_config(vehicle_poll_rate_ms, channel_update_rate_ms, cir_max_taps)
set_node_antenna(node, pattern, tx_pattern, rx_pattern)
set_source_power(node, source_power_dbfs). Use None to change to the measured (dynamic) level.
set_pathloss(freq_mhz, model, ground_coeff=-1, *, scenario, environment, refractivity, ground_conductivity, ground_permittivity, climate_zone)
set_default_pathloss(model, ...) with the same keywords as set_pathloss.
set_coeff(freq_mhz, src, dest, p_src, p_dest, coeff)
set_noise_model(freq_mhz, src, dest, noise_model, snr)
set_frequency_offset(freq_mhz, src, dest, offset_hz)
set_doppler(freq_mhz, src, dest, enabled)
set_shadow_std(std, freq_mhz=None)
set_cir(freq_mhz, src, dest, p_src, p_dest, taps). See Section 7.5 for the tap formats.
apply_profile(profile)
Module functions: pychem.all_profiles(), load_custom_profiles(), save_profile(profile)
extension(name, action, params), extension_list(), sionna_start(), sionna_stop(), sionna_status(). See Section 7.6.
For ready-to-use code, see Section 7.8.