Transmitter¶

- class Transmitter(seed=None, selected_transmit_ports=None, carrier_frequency=None)[source]¶
Bases:
Generic
[TransmissionType
],RandomNode
,MixingOperator
Operator transmitting over a device.
- Parameters:
seed (
int
|None
) – 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 operatedDevice's
antenna array. If not specified, all available ports will be considered.carrier_frequency (
float
|None
) – 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.
- abstract _transmit(state, duration)[source]¶
Generate information to be transmitted.
Subroutine of the public
transmit
method that performs the pipeline-specific transmit-processing and consolidates the generated information into a singlehermespy.core.device.Transmission
object.- Parameters:
state (
TransmitState
) – State of the device at the time of transmission.duration (
float
) – Duration of the transmitted signal in seconds. If not specified, the duration of a single frame will be assumed.
- Return type:
TypeVar
(TransmissionType
, bound= Transmission)
Returns: Information to be transmitted.
- add_transmit_callback(callback)[source]¶
Add a callback to be called after processing the transmit DSP algorithm.
- Parameters:
callback (
Callable
[[TypeVar
(TransmissionType
, bound= Transmission)],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.
- notify_transmit_callbacks(transmission)[source]¶
Notify the registered callbacks about the generated transmission.
- serialize(process)[source]¶
Serialize this object’s state.
Objects cannot be serialized directly, instead a
Factory
must be instructed to carry out the serialization process.- Parameters:
process (
SerializationProcess
) – The current stage of the serialization process. This object is generated by theFactory
and provides an interface to serialization methods supporting multiple backends.- Return type:
- 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
) – State of the device at the time of transmission. If not specified, the device’s current state will be queried by callinghermespy.core.device.Device.state()
.duration (
float
) – Duration of the transmitted signal. If not specified, i.e. zero, the duration will be inferred by the transmitter.notify (
bool
) – 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.