My Project
 All Classes Files Functions Variables Macros
Public Member Functions | Public Attributes | List of all members
slsReceiverUsers Class Reference

Class for implementing the SLS data receiver in the users application. Callbacks can be defined for processing and/or saving data. More...

#include <slsReceiverUsers.h>

Public Member Functions

 slsReceiverUsers (int argc, char *argv[], int &success)
 
 ~slsReceiverUsers ()
 
int start ()
 
void stop ()
 
int64_t getReceiverVersion ()
 
void registerCallBackStartAcquisition (int(*func)(char *filepath, char *filename, uint64_t fileindex, uint32_t datasize, void *), void *arg)
 register calbback for starting the acquisition More...
 
void registerCallBackAcquisitionFinished (void(*func)(uint64_t nf, void *), void *arg)
 register callback for end of acquisition More...
 
void registerCallBackRawDataReady (void(*func)(char *header, char *datapointer, uint32_t datasize, void *), void *arg)
 register callback to be called when data are available (to process and/or save the data). More...
 
void registerCallBackRawDataModifyReady (void(*func)(char *header, char *datapointer, uint32_t &revDatasize, void *), void *arg)
 register callback to be called when data are available (to process and/or save the data). More...
 

Public Attributes

slsReceiver * receiver
 

Detailed Description

Class for implementing the SLS data receiver in the users application. Callbacks can be defined for processing and/or saving data.

slsReceiverUsers is a class that can be instantiated in the users software to receive the data from the detectors. Callbacks can be defined for processing and/or saving data

Definition at line 15 of file slsReceiverUsers.h.

Constructor & Destructor Documentation

slsReceiverUsers::slsReceiverUsers ( int  argc,
char *  argv[],
int &  success 
)

Constructor reads config file, creates socket, assigns function table

Parameters
argcfrom command line
argvfrom command line
successsocket creation was successfull
slsReceiverUsers::~slsReceiverUsers ( )

Destructor

Member Function Documentation

int64_t slsReceiverUsers::getReceiverVersion ( )

get get Receiver Version

Returns
id
void slsReceiverUsers::registerCallBackAcquisitionFinished ( void(*)(uint64_t nf, void *)  func,
void *  arg 
)

register callback for end of acquisition

Parameters
funcend of acquisition callback. Argument nf is total frames caught
argargument
Returns
nothing
void slsReceiverUsers::registerCallBackRawDataModifyReady ( void(*)(char *header, char *datapointer, uint32_t &revDatasize, void *)  func,
void *  arg 
)

register callback to be called when data are available (to process and/or save the data).

Parameters
funcraw data ready callback. arguments are sls_receiver_header, dataPointer, revDatasize is the reference of data size in bytes. Can be modified to the new size to be written/streamed. (only smaller value).
argargument
Returns
nothing
void slsReceiverUsers::registerCallBackRawDataReady ( void(*)(char *header, char *datapointer, uint32_t datasize, void *)  func,
void *  arg 
)

register callback to be called when data are available (to process and/or save the data).

Parameters
funcraw data ready callback. arguments are sls_receiver_header, dataPointer, dataSize
argargument
Returns
nothing
void slsReceiverUsers::registerCallBackStartAcquisition ( int(*)(char *filepath, char *filename, uint64_t fileindex, uint32_t datasize, void *)  func,
void *  arg 
)

register calbback for starting the acquisition

Parameters
funccallback to be called when starting the acquisition. Its arguments are filepath, filename, fileindex, datasize
argargument
Returns
value is insignificant at the moment, we write depending on file write enable, users get data to write depending on call backs registered
int slsReceiverUsers::start ( )

starts listening on the TCP port for client comminication

Returns
0 for success or 1 for FAIL in creating TCP server
void slsReceiverUsers::stop ( )

stops listening to the TCP & UDP port and exit receiver program

Member Data Documentation

slsReceiver* slsReceiverUsers::receiver

Definition at line 86 of file slsReceiverUsers.h.


The documentation for this class was generated from the following file: