S15qkd/transferd.py
def _transferlog_digest():
    '''
    Digests the transferlog which is written by the transferd process.

    This function usually runs as a thread and watches the transferlog file. 
    If this is the low count side this function notifies the splicer about file arrival.
    '''
    global first_received_epoch, low_count_side, last_received_epoch
    fd = os.open(PipesQKD.TRANSFERLOG, os.O_RDONLY | os.O_NONBLOCK)
    f = os.fdopen(fd, 'rb', 0)  # non-blocking
    logger.info('Thread started.')
    while is_running():
        time.sleep(0.1)
        try:
            message = f.readline().decode().rstrip()
            if len(message) != 0:
                last_received_epoch = message
                logger.debug(f'[read msg] {message}')
                if first_received_epoch == None:
                    first_received_epoch = message
                    logger.info(f'[first_rx_epoch] {first_received_epoch}')
                if low_count_side is True:
                    qkd_globals.writer(PipesQKD.SPLICER, message)
                    logger.debug(f'Sent epoch name {message} to splicer.')
        except OSError:
            pass
    logger.info(f'Thread finished.')

    Digests the transferlog which is written by the transferd process.

    This function usually runs as a thread and watches the transferlog file. 
    If this is the low count side this function notifies the splicer about file arrival.
    
Digests the transferlog which is written by the transferd process.
This function usually runs as a thread and watches the transferlog file.
If this is the low count side this function notifies the splicer about file arrival.
Digests the transferlog which is written by the transferd process . This function usually runs as a thread and watches the transferlog file . If this is the low count side this function notifies the splicer about file arrival .
def _transferlog_digest():
    global first_received_epoch, low_count_side, last_received_epoch
    fd = os.open(PipesQKD.TRANSFERLOG, os.O_RDONLY | os.O_NONBLOCK)
    f = os.fdopen(fd, 'rb', 0)  
    logger.info('Thread started.')
    while is_running():
        time.sleep(0.1)
        try:
            message = f.readline().decode().rstrip()
            if len(message) != 0:
                last_received_epoch = message
                logger.debug(f'[read msg] {message}')
                if first_received_epoch == None:
                    first_received_epoch = message
                    logger.info(f'[first_rx_epoch] {first_received_epoch}')
                if low_count_side is True:
                    qkd_globals.writer(PipesQKD.SPLICER, message)
                    logger.debug(f'Sent epoch name {message} to splicer.')
        except OSError:
            pass
    logger.info(f'Thread finished.')
def _transferlog_digest ( ) : global first_received_epoch , low_count_side , last_received_epoch fd = os . open ( PipesQKD . TRANSFERLOG , os . O_RDONLY | os . O_NONBLOCK ) f = os . fdopen ( fd , 'rb' , 0 ) logger . info ( 'Thread started.' ) while is_running ( ) : time . sleep ( 0.1 ) try : message = f . readline ( ) . decode ( ) . rstrip ( ) if len ( message ) != 0 : last_received_epoch = message logger . debug ( f'[read msg] {message}' ) if first_received_epoch == None : first_received_epoch = message logger . info ( f'[first_rx_epoch] {first_received_epoch}' ) if low_count_side is True : qkd_globals . writer ( PipesQKD . SPLICER , message ) logger . debug ( f'Sent epoch name {message} to splicer.' ) except OSError : pass logger . info ( f'Thread finished.' )
Digests the transferlog which is written by the transferd process.
Digests the transferlog which is written by the transferd process .
'''
    Digests the transferlog which is written by the transferd process.

    This function usually runs as a thread and watches the transferlog file. 
    If this is the low count side this function notifies the splicer about file arrival.
    ''' # non-blocking