Transmitter¶
- class Transmitter(seed=None, selected_transmit_ports=None, carrier_frequency=None)[source]¶
Bases:
Generic
[TransmissionType
],MixingOperator
,RandomNode
Operator transmitting over a device.
- Parameters:
seed (int, optional) – Random seed used to initialize the pseudo-random number generator.
selected_transmit_ports (Sequence[int] | None) – Indices of antenna ports selected for transmission from the operated
Device's
antenna array. If not specified, all available ports will be considered.carrier_frequency (float, optional) – Central frequency of the mixed signal in radio-frequency transmission band. If not specified, the operated device’s default carrier frequency will be assumed during signal processing.
- add_transmit_callback(callback)[source]¶
Add a callback to be called after processing the transmit DSP algorithm.
- Parameters:
callback (Callable[[TransmissionType], None]) – Function to be called after processing the transmit DSP algorithm. The transmit output is passed as the only argument.
- Return type:
Returns: Hook to be used for removal.
- transmit(state, duration=0.0, notify=True)[source]¶
Transmit a signal.
Registers the signal samples to be transmitted by the underlying device.
Wrapper around the abstract
_transmit
method.- Parameters:
state (DeviceState, optional) – State of the device at the time of transmission. If not specified, the device’s current state will be queried by calling
hermespy.core.device.Device.state()
.duration (float, optional) – Duration of the transmitted signal. If not specified, i.e. zero, the duration will be inferred by the transmitter.
notify (bool, optional) – Notify the transmitter’s callbacks about the generated transmission.
- Return type:
TypeVar
(TransmissionType
, bound= Transmission)- Returns:
Information generated while transmitting over this operator.
- Raises:
FloatingError – If the transmitter is currently considered floating.