[docs]classDuplexOperator(Generic[TransmissionType,ReceptionType],Transmitter[TransmissionType],Receiver[ReceptionType]):"""Operator binding to both transmit and receive slots of any device."""__device:Device|Nonedef__init__(self,device:Device|None=None,reference:Device|None=None,selected_transmit_ports:Sequence[int]|None=None,selected_receive_ports:Sequence[int]|None=None,seed:int|None=None,):""" Args: device (Device, optional): Device the duplex operator operates. """self.__device=NoneTransmitter.__init__(self,seed,selected_transmit_ports)Receiver.__init__(self,seed,reference,selected_receive_ports)self.device=device@propertydefdevice(self)->Device|None:"""Device this object is assigned to. :obj:`None` if this object is currently considered floating / unassigned. """returnself.__device@device.setterdefdevice(self,value:Device|None)->None:# Abort if the device is already assignedifself.__deviceisvalue:returnifvalueisnotself.__deviceandself.__deviceisnotNone:self.__device.transmitters.remove(self)self.__device.receivers.remove(self)self.__device=valueifvalueisnotNone:value.transmitters.add(self)value.receivers.add(self)return@Transmitter.slot.setterdefslot(self,value:OperatorSlot[Transmitter])->None:ifvalueisnotNoneandself.deviceisnotvalue.device:self.device=value.deviceTransmitter.slot.fset(self,value)@abstractmethoddef_transmit(self,duration:float=0.0)->TransmissionType:...# pragma: no cover@abstractmethoddef_receive(self,signal:Signal)->ReceptionType:...# pragma: no cover@property@abstractmethoddefsampling_rate(self)->float:...# pragma: no cover@property@abstractmethoddefframe_duration(self)->float:...# pragma: no cover@property@abstractmethoddefpower(self)->float:...# pragma: no cover@abstractmethoddef_recall_transmission(self,group:Group)->TransmissionType:...# pragma: no cover@abstractmethoddef_recall_reception(self,group:Group)->ReceptionType:...# pragma: no cover