(self, seq_num, force=False)
return bytes(self.frag_map[seq_num]['concat'])
Concatenate all Blocksat Packet payloads composing an API message

        Args:
            seq_num : API message sequence number
            force   : Force concatenation even if there are fragment gaps

        Returns:
            Bytes array with the concatenated payloads
Concatenate all Blocksat Packet payloads composing an API message
Concatenate all Blocksat Packet payloads composing an API message
def concat(self, seq_num, force=False):
        """Concatenate all Blocksat Packet payloads composing an API message

        Args:
            seq_num : API message sequence number
            force   : Force concatenation even if there are fragment gaps

        Returns:
            Bytes array with the concatenated payloads

        """
        assert (seq_num in self.frag_map)

        # The caller should call this function only when it's known that the
        # message can be decoded
        if (not force and not self._check_gaps(seq_num)):
            raise RuntimeError("Gap found between message fragments")

        if (not force and not self._check_ready(seq_num)):
            raise RuntimeError("Tried to decode while fragments are missing")

        logger.debug("BlocksatPktHandler: Concatenated message with {} bytes "
                     "(force: {})".format(
                         len(self.frag_map[seq_num]['concat']), force))

        # Take the concatenated message directly from the cache
        return bytes(self.frag_map[seq_num]['concat'])
def concat ( self , seq_num , force = False ) : assert ( seq_num in self . frag_map ) # The caller should call this function only when it's known that the # message can be decoded if ( not force and not self . _check_gaps ( seq_num ) ) : raise RuntimeError ( "Gap found between message fragments" ) if ( not force and not self . _check_ready ( seq_num ) ) : raise RuntimeError ( "Tried to decode while fragments are missing" ) logger . debug ( "BlocksatPktHandler: Concatenated message with {} bytes " "(force: {})" . format ( len ( self . frag_map [ seq_num ] [ 'concat' ] ) , force ) ) # Take the concatenated message directly from the cache return bytes ( self . frag_map [ seq_num ] [ 'concat' ] )