UHD System#
- class UsrpSystem(*args, **kwargs)#
Bases:
Serializable
,PhysicalScenario
[UsrpDevice
]Scenario of USRPs running the UHD server application.
- yaml_tag: Optional[str] = 'UsrpSystem'#
YAML serialization tag
- new_device(ip, port=5555, *args, **kwargs)#
Create a new UHD device managed by the system.
- Parameters:
parameters. (Device initialization) –
to (Refer) – class:.UsrpDevice for further details.
- Return type:
Returns: A handle to the initialized device.
- add_device(device)#
Register an existing UHD device to be managed by the system.
- Parameters:
device (UsrpDevice) – The device to be added.
- Return type:
None
UHD Device#
- class UsrpDevice(ip, port=5555, carrier_frequency=700000000.0, sampling_rate=None, tx_gain=0.0, rx_gain=0.0, scale_transmission=False, num_prepended_zeros=200, num_appended_zeros=200, *args, **kwargs)#
Bases:
PhysicalDevice
,Serializable
Bindung to a USRP device via the UHD library.
- Parameters:
ip (str) – The IP address of the USRP device.
port (int, optional) – The port of the USRP device.
carrier_frequency (float, optional) – Carrier frequency of the USRP device. \(700~\mathrm{MHz}\) by default.
sampling_rate (float, optional) – Sampling rate of the USRP device. If not provided, the sampling rate is determined from the configured operators.
tx_gain (float, optional) – The transmission gain of the USRP device. Zero by default.
rx_gain (float, optional) – The reception gain of the USRP device. Zero by default.
scale_transmission (bool, optional) – If True, the transmission signal is scaled to the maximum floating point value of the USRP device. This ensures a proper digital to analog conversion.
num_prepended_zeros (int, optional) – The number of zeros prepended to the transmission signal. \(200\) by default.
num_appended_zeros (int, optional) – The number of zeros appended to the transmission signal. \(200\) by default.
*args – Additional arguments passed to the
PhysicalDevice
parent class.**kwargs –
Additional arguments passed to the
PhysicalDevice
parent class.
- yaml_tag: Optional[str] = 'USRP'#
YAML serialization tag
- property_blacklist: Set[str] = {'topology', 'velocity', 'wavelength'}#
Set of properties to be ignored during serialization.
- trigger()#
Trigger the device.
- Return type:
None
- property ip: str#
Internet protocol address of the remote host.
- Returns:
IP adress.
- property port: int#
Internet protocol port of the remote host.
- Returns:
Port.
- property tx_gain: float#
Gain of the transmitting front-end in dB.
- property rx_gain: float#
Gain of the receiving front-end in dB.
- property sampling_rate: float#
Sampling rate at which the device’s analog-to-digital converters operate.
- Returns:
Sampling rate in Hz.
- Return type:
sampling_rate (float)
- Raises:
ValueError – If the sampling rate is not greater than zero.
- property max_sampling_rate: float#
Maximal device sampling rate.
Returns: The samplin rate in Hz.
- property carrier_frequency: float#
Central frequency of the device’s emissions in the RF-band.
- Returns:
Carrier frequency in Hz.
- Return type:
frequency (float)
- Raises:
ValueError – On negative carrier frequencies.
- property num_prepeneded_zeros: int#
Number of zero padding samples prepended to the transmitted signal.
Returns: Number of prepended samples.
- Raises:
ValueError – For negative values.
- property num_appended_zeros: int#
Number of zero padding samples appended to the transmitted signal.
Returns: Number of appended samples.
- Raises:
ValueError – For negative values.
- property scale_transmission: bool#
Indicates whether the transmission is scaled to the full DAC range.
Returns: Boolean enabled flag.