(self)
Forward error correction (FEC) decoding

        Try to decode the FEC-encoded message held in the internal container,
        which may be missing some parts of the original FEC-encoded message.

        Note:
            This function should be called only when the FEC-encoded object is
            decodable. Otherwise, it throws a RuntimeError exception. Use the
            "is_fec_decodable()" method before calling it.
Forward error correction (FEC) decoding
Forward error correction ( FEC ) decoding
def fec_decode(self):
        """Forward error correction (FEC) decoding

        Try to decode the FEC-encoded message held in the internal container,
        which may be missing some parts of the original FEC-encoded message.

        Note:
            This function should be called only when the FEC-encoded object is
            decodable. Otherwise, it throws a RuntimeError exception. Use the
            "is_fec_decodable()" method before calling it.

        """
        assert (self.data['fec_encoded'] is not None)

        fec = Fec()
        decoded_data = fec.decode(self.data['fec_encoded'])

        # The encoded data should be decodable at this point
        if (not decoded_data):
            raise RuntimeError("Failed to decode the FEC-encoded message")

        # We can't know whether the underlying message is encrypted or
        # encapsulated. Thus, for now, put the data into all fields. These
        # fields can be overwritten by calling "decrypt()" or "decapsulate()".
        self.data['original'] = decoded_data
        self.data['encapsulated'] = decoded_data
        self.data['encrypted'] = decoded_data
def fec_decode ( self ) : assert ( self . data [ 'fec_encoded' ] is not None ) fec = Fec ( ) decoded_data = fec . decode ( self . data [ 'fec_encoded' ] ) # The encoded data should be decodable at this point if ( not decoded_data ) : raise RuntimeError ( "Failed to decode the FEC-encoded message" ) # We can't know whether the underlying message is encrypted or # encapsulated. Thus, for now, put the data into all fields. These # fields can be overwritten by calling "decrypt()" or "decapsulate()". self . data [ 'original' ] = decoded_data self . data [ 'encapsulated' ] = decoded_data self . data [ 'encrypted' ] = decoded_data