Content-type: text/html Man page of LCG_SET_TRANSFER_CALLBACK

LCG_SET_TRANSFER_CALLBACK

Section: Library Functions (3)
Updated: $Date: 2009/04/16 15:51:30 $
Index Return to Main Contents

 

NAME

lcg_set_transfer_callback - Get/Set the pointer of the transfer file callback

 

SYNOPSIS

#include "lcg_util.h"

void lcg_set_transfer_callback (copyfile_callback_t *cb);

copyfile_callback_t lcg_get_transfer_callback ();

 

DESCRIPTION

lcg_set_transfer_callback sets the pointer of the transfer file callback
cb
specifies the pointer to the desired function.


    typedef struct {
        GFAL_LONG64 transferred_bytes;

        float instant_throughput;

        float avg_throughput;

    } perf_t;
    
    typedef void (* copyfile_callback_t) (
        perf_t                  s_perf,

        struct  timespec        ts,

        int                     *timeoutflg

        );

 

EXAMPLE

Here is the function which is used in verbose mode:


    void copy_print_callback(perf_t perf, struct timespec ts, int *timeoutflg) {
        fprintf(stderr,"\r %12lld bytes", (GFAL_LONG64)perf.transferred_bytes);
        fprintf(stderr," %9.2lf KB/sec avg", (double)perf.avg_throughput/1024);
        fprintf(stderr," %9.2lf KB/sec inst", (double)perf.instant_throughput/1024);
    }

 

FILES

/opt/lcg/include/lcg_util.h
/opt/lcg/lib/liblcg_util.so

 

SEE ALSO

lcg_cp(3), lcg_cr(3), lcg_del(3), lcg_gt(3), lcg_la(3), lcg_lg(3), lcg_lr(3), lcg_ra(3), lcg_rep(3), lcg_rf(3), lcg_sd(3), lcg_stmd(3), lcg_uf(3)


 

Index

NAME
SYNOPSIS
DESCRIPTION
EXAMPLE
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 14:16:53 GMT, July 14, 2009