[docs]classTransmitStreamEncoder(Precoder,ABC):"""Stream MIMO coding during signal transmission."""
[docs]@abstractmethoddefencode_streams(self,streams:Signal)->Signal:"""Encode a signal MIMO stream during transmission. This operation may modify the number of streams. Args: streams (Signal): The signal stream to be encoded. Returns: The encoded signal stream. """...# pragma: no cover
@abstractpropertydefnum_transmit_input_streams(self)->int:"""Number of input streams required by this coding. Returns: Number of input streams. """...# pragma: no cover@abstractpropertydefnum_transmit_output_streams(self)->int:"""Number of output streams generated by this coding. Returns: Number of output streams. """...# pragma: no cover@propertydefnum_input_streams(self)->int:returnself.num_transmit_input_streams@propertydefnum_output_streams(self)->int:returnself.num_transmit_output_streams
[docs]classReceiveStreamDecoder(Precoder,ABC):"""Stream MIMO coding during signal reception."""
[docs]@abstractmethoddefdecode_streams(self,streams:Signal)->Signal:"""Encode a signal MIMO stream during signal recepeption. This operation may modify the number of streams. Args: streams (Signal): The signal stream to be decoded. Returns: The decoded signal stream. """...# pragma: no cover
@abstractpropertydefnum_receive_input_streams(self)->int:"""Number of input streams required by this coding. Returns: Number of input streams. """...# pragma: no cover@abstractpropertydefnum_receive_output_streams(self)->int:"""Number of output streams generated by this coding. Returns: Number of output streams. """...# pragma: no cover@propertydefnum_input_streams(self)->int:returnself.num_receive_output_streams@propertydefnum_output_streams(self)->int:returnself.num_input_streams
[docs]classTransmitStreamCoding(Precoding[TransmitStreamEncoder],Serializable):"""Stream MIMO coding configuration during signal transmission."""yaml_tag="TransmitCoding""""YAML serialization tag."""
[docs]defencode(self,signal:Signal)->Signal:"""Encode a signal MIMO stream during transmission. This operation may modify the number of streams. Args: streams (Signal): The signal stream to be encoded. Returns: The encoded signal stream. """# Iteratively apply each encoding stepencoded_signal=signal.copy()forprecoderinself:encoded_signal=precoder.encode_streams(encoded_signal)returnencoded_signal
[docs]classReceiveStreamCoding(Precoding[ReceiveStreamDecoder],Serializable):"""Stream MIMO coding configuration during signal transmission."""yaml_tag="ReceiveCoding""""YAML serialization tag."""
[docs]defdecode(self,signal:Signal)->Signal:"""Decode a signal MIMO stream during reception. This operation may modify the number of streams. Args: streams (Signal): The signal stream to be decoded. Returns: The decode signal stream. """# Iteratively apply each encoding stepdecoded_signal=signal.copy()forprecoderinself:decoded_signal=precoder.decode_streams(decoded_signal)returndecoded_signal