struct tapi_pat_receiver

Overview

Pattern receiver settings More…

#include <tapi_rpc_misc.h>

struct tapi_pat_receiver {
    // fields

    const char* gen_func;
    tarpc_pat_gen_arg gen_arg;
    iomux_func iomux;
    int duration_sec;
    unsigned int time2wait;
    tarpc_bool ignore_pollerr;
    uint64_t exp_received;
    uint64_t received;
    bool recv_failed;
    tarpc_pat_gen_arg* gen_arg_ptr;
    uint64_t* received_ptr;
    bool* recv_failed_ptr;
};

Detailed Documentation

Pattern receiver settings

Fields

const char* gen_func

Pattern generator function name

tarpc_pat_gen_arg gen_arg

Pattern generator arguments

iomux_func iomux

Iomux function to be used

int duration_sec

How long to run (in seconds; if time2wait is positive, the function can finish earlier)

unsigned int time2wait

Maximum time to wait for readability before stopping receiving, in milliseconds (if 0, the function will wait until duration_sec expires)

tarpc_bool ignore_pollerr

If true, ignore POLLERR if it arrives instead of POLLIN, and continue polling

uint64_t exp_received

Number of bytes expected to be received (ignored if 0; if > 0, stop after receiving this number of bytes)

uint64_t received

Number of received bytes

bool recv_failed

true if recv() call was failed

tarpc_pat_gen_arg* gen_arg_ptr

Pointer to arguments of pattern generator

uint64_t* received_ptr

Where to save number of received bytes

bool* recv_failed_ptr

Pointer to a variable which will be set to true if recv() fails.