Receiver

class Receiver : private virtual slsDetectorDefs

Public Functions

Receiver(int argc, char *argv[])

Constructor Starts up a Receiver server. Reads configuration file, options, and assembles a Receiver using TCP and UDP detector interfaces throws an exception in case of failure

Parameters
  • argc – from command line

  • argv – from command line

Receiver(uint16_t tcpip_port_no = 1954)

Constructor Starts up a Receiver server. Reads configuration file, options, and assembles a Receiver using TCP and UDP detector interfaces throws an exception in case of failure

Parameters

tcpip_port_no – TCP/IP port number

std::string getReceiverVersion()

get get Receiver Version

Returns

id

void registerCallBackStartAcquisition(int (*func)(const std::string&, const std::string&, uint64_t, size_t, void*), void *arg)

Start Acquisition Call back (slsMultiReceiver writes data if file write enabled) if registerCallBackRawDataReady or registerCallBackRawDataModifyReady registered, users get data callback arguments are:

  • file path

  • file name prefix

  • file index

  • image size in bytes

void registerCallBackAcquisitionFinished(void (*func)(uint64_t, void*), void *arg)

Call back for acquisition finished callback argument is:

  • total frames caught

void registerCallBackRawDataReady(void (*func)(sls_receiver_header&, char*, size_t, void*), void *arg)

Call back for raw data args to raw data ready callback are:

  • sls_receiver_header frame metadata,

  • pointer to data

  • image size in bytes

void registerCallBackRawDataModifyReady(void (*func)(sls_receiver_header&, char*, size_t&, void*), void *arg)

Call back for raw data (modified) args to raw data ready callback are:

  • sls_receiver_header frame metadata,

  • pointer to data

  • revDatasize is the reference of data size in bytes. Can be modified to the new size to be written/streamed. (only smaller value allowed).