\hypertarget{classslsReceiverUsers}{
\subsection{sls\-Receiver\-Users Class Reference}
\label{classslsReceiverUsers}\index{slsReceiverUsers@{slsReceiverUsers}}
}
Class for implementing the SLS data receiver in the users application. Callbacks can be defined for processing and/or saving data.  


{\tt \#include $<$sls\-Receiver\-Users.h$>$}

\subsubsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\hyperlink{classslsReceiverUsers_79a82ba94fbb19761c7701aa3901b8b1}{sls\-Receiver\-Users} (int argc, char $\ast$argv\mbox{[}$\,$\mbox{]}, int \&success)
\item 
\hyperlink{classslsReceiverUsers_9b45943d81ce7a09543aa446de857cb0}{$\sim$sls\-Receiver\-Users} ()
\item 
void \hyperlink{classslsReceiverUsers_bad0b3265826da2d9ebf48e59e9d5787}{close\-File} (int p)
\item 
int \hyperlink{classslsReceiverUsers_ef40b4987367b8a0116bcb66534dd7b7}{start} ()
\item 
void \hyperlink{classslsReceiverUsers_394001d873a4b7912865a971d4d25f87}{stop} ()
\item 
int64\_\-t \hyperlink{classslsReceiverUsers_f206092e2744e12ce6b717f4181d91a2}{get\-Receiver\-Version} ()
\item 
void \hyperlink{classslsReceiverUsers_5d4bb9244008d0bc570778230d30c5e3}{register\-Call\-Back\-Start\-Acquisition} (int($\ast$func)(char $\ast$filepath, char $\ast$filename, int fileindex, int datasize, void $\ast$), void $\ast$arg)
\item 
void \hyperlink{classslsReceiverUsers_7471d2945e8650eece86258e6ca56156}{register\-Call\-Back\-Acquisition\-Finished} (void($\ast$func)(int nf, void $\ast$), void $\ast$arg)
\item 
void \hyperlink{classslsReceiverUsers_343b9fac505e8c08a7fbf9efdd0f5762}{register\-Call\-Back\-Raw\-Data\-Ready} (void($\ast$func)(int framenumber, char $\ast$datapointer, int datasize, FILE $\ast$filedescriptor, char $\ast$guidatapointer, void $\ast$), void $\ast$arg)
\end{CompactItemize}
\subsubsection*{Static Public Attributes}
\begin{CompactItemize}
\item 
static sls\-Receiver\-TCPIPInterface $\ast$ \hyperlink{classslsReceiverUsers_8f262724fb99ecd3976214710d82dd18}{receiver}
\end{CompactItemize}


\subsubsection{Detailed Description}
Class for implementing the SLS data receiver in the users application. Callbacks can be defined for processing and/or saving data. 

\hyperlink{classslsReceiverUsers}{sls\-Receiver\-Users} 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 21 of file sls\-Receiver\-Users.h.

\subsubsection{Constructor \& Destructor Documentation}
\hypertarget{classslsReceiverUsers_79a82ba94fbb19761c7701aa3901b8b1}{
\index{slsReceiverUsers@{sls\-Receiver\-Users}!slsReceiverUsers@{slsReceiverUsers}}
\index{slsReceiverUsers@{slsReceiverUsers}!slsReceiverUsers@{sls\-Receiver\-Users}}
\paragraph[slsReceiverUsers]{\setlength{\rightskip}{0pt plus 5cm}sls\-Receiver\-Users::sls\-Receiver\-Users (int {\em argc}, char $\ast$ {\em argv}\mbox{[}$\,$\mbox{]}, int \& {\em success})}\hfill}
\label{classslsReceiverUsers_79a82ba94fbb19761c7701aa3901b8b1}


Constructor reads config file, creates socket, assigns function table \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em argc}]from command line \item[{\em argv}]from command line \item[{\em succecc}]socket creation was successfull \end{description}
\end{Desc}
\hypertarget{classslsReceiverUsers_9b45943d81ce7a09543aa446de857cb0}{
\index{slsReceiverUsers@{sls\-Receiver\-Users}!~slsReceiverUsers@{$\sim$slsReceiverUsers}}
\index{~slsReceiverUsers@{$\sim$slsReceiverUsers}!slsReceiverUsers@{sls\-Receiver\-Users}}
\paragraph[$\sim$slsReceiverUsers]{\setlength{\rightskip}{0pt plus 5cm}sls\-Receiver\-Users::$\sim$sls\-Receiver\-Users ()}\hfill}
\label{classslsReceiverUsers_9b45943d81ce7a09543aa446de857cb0}


Destructor 

\subsubsection{Member Function Documentation}
\hypertarget{classslsReceiverUsers_bad0b3265826da2d9ebf48e59e9d5787}{
\index{slsReceiverUsers@{sls\-Receiver\-Users}!closeFile@{closeFile}}
\index{closeFile@{closeFile}!slsReceiverUsers@{sls\-Receiver\-Users}}
\paragraph[closeFile]{\setlength{\rightskip}{0pt plus 5cm}void sls\-Receiver\-Users::close\-File (int {\em p})}\hfill}
\label{classslsReceiverUsers_bad0b3265826da2d9ebf48e59e9d5787}


Close File and exits receiver server \hypertarget{classslsReceiverUsers_f206092e2744e12ce6b717f4181d91a2}{
\index{slsReceiverUsers@{sls\-Receiver\-Users}!getReceiverVersion@{getReceiverVersion}}
\index{getReceiverVersion@{getReceiverVersion}!slsReceiverUsers@{sls\-Receiver\-Users}}
\paragraph[getReceiverVersion]{\setlength{\rightskip}{0pt plus 5cm}int64\_\-t sls\-Receiver\-Users::get\-Receiver\-Version ()}\hfill}
\label{classslsReceiverUsers_f206092e2744e12ce6b717f4181d91a2}


get get Receiver Version \begin{Desc}
\item[Returns:]id \end{Desc}
\hypertarget{classslsReceiverUsers_7471d2945e8650eece86258e6ca56156}{
\index{slsReceiverUsers@{sls\-Receiver\-Users}!registerCallBackAcquisitionFinished@{registerCallBackAcquisitionFinished}}
\index{registerCallBackAcquisitionFinished@{registerCallBackAcquisitionFinished}!slsReceiverUsers@{sls\-Receiver\-Users}}
\paragraph[registerCallBackAcquisitionFinished]{\setlength{\rightskip}{0pt plus 5cm}void sls\-Receiver\-Users::register\-Call\-Back\-Acquisition\-Finished (void($\ast$)(int nf, void $\ast$) {\em func}, void $\ast$ {\em arg})}\hfill}
\label{classslsReceiverUsers_7471d2945e8650eece86258e6ca56156}


register callback for end of acquisition \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em func}]end of acquisition callback. Argument nf is total frames caught \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]nothing \end{Desc}
\hypertarget{classslsReceiverUsers_343b9fac505e8c08a7fbf9efdd0f5762}{
\index{slsReceiverUsers@{sls\-Receiver\-Users}!registerCallBackRawDataReady@{registerCallBackRawDataReady}}
\index{registerCallBackRawDataReady@{registerCallBackRawDataReady}!slsReceiverUsers@{sls\-Receiver\-Users}}
\paragraph[registerCallBackRawDataReady]{\setlength{\rightskip}{0pt plus 5cm}void sls\-Receiver\-Users::register\-Call\-Back\-Raw\-Data\-Ready (void($\ast$)(int framenumber, char $\ast$datapointer, int datasize, FILE $\ast$filedescriptor, char $\ast$guidatapointer, void $\ast$) {\em func}, void $\ast$ {\em arg})}\hfill}
\label{classslsReceiverUsers_343b9fac505e8c08a7fbf9efdd0f5762}


register callback to be called when data are available (to process and/or save the data). \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em func}]raw data ready callback. arguments are framenum datapointer datasize file descriptor guidatapointer (NULL, no data required) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]nothing \end{Desc}
\hypertarget{classslsReceiverUsers_5d4bb9244008d0bc570778230d30c5e3}{
\index{slsReceiverUsers@{sls\-Receiver\-Users}!registerCallBackStartAcquisition@{registerCallBackStartAcquisition}}
\index{registerCallBackStartAcquisition@{registerCallBackStartAcquisition}!slsReceiverUsers@{sls\-Receiver\-Users}}
\paragraph[registerCallBackStartAcquisition]{\setlength{\rightskip}{0pt plus 5cm}void sls\-Receiver\-Users::register\-Call\-Back\-Start\-Acquisition (int($\ast$)(char $\ast$filepath, char $\ast$filename, int fileindex, int datasize, void $\ast$) {\em func}, void $\ast$ {\em arg})}\hfill}
\label{classslsReceiverUsers_5d4bb9244008d0bc570778230d30c5e3}


register calbback for starting the acquisition \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em func}]callback to be called when starting the acquisition. Its arguments are filepath filename fileindex data size\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 callback takes care of open,close,write file; 1 callback writes file, we have to open, close it; 2 we open, close, write file, callback does not do anything \end{Desc}
\hypertarget{classslsReceiverUsers_ef40b4987367b8a0116bcb66534dd7b7}{
\index{slsReceiverUsers@{sls\-Receiver\-Users}!start@{start}}
\index{start@{start}!slsReceiverUsers@{sls\-Receiver\-Users}}
\paragraph[start]{\setlength{\rightskip}{0pt plus 5cm}int sls\-Receiver\-Users::start ()}\hfill}
\label{classslsReceiverUsers_ef40b4987367b8a0116bcb66534dd7b7}


starts listening on the TCP port for client comminication \begin{Desc}
\item[Returns:]0 for success or 1 for FAIL in creating TCP server \end{Desc}


Referenced by main().\hypertarget{classslsReceiverUsers_394001d873a4b7912865a971d4d25f87}{
\index{slsReceiverUsers@{sls\-Receiver\-Users}!stop@{stop}}
\index{stop@{stop}!slsReceiverUsers@{sls\-Receiver\-Users}}
\paragraph[stop]{\setlength{\rightskip}{0pt plus 5cm}void sls\-Receiver\-Users::stop ()}\hfill}
\label{classslsReceiverUsers_394001d873a4b7912865a971d4d25f87}


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

Referenced by main().

\subsubsection{Member Data Documentation}
\hypertarget{classslsReceiverUsers_8f262724fb99ecd3976214710d82dd18}{
\index{slsReceiverUsers@{sls\-Receiver\-Users}!receiver@{receiver}}
\index{receiver@{receiver}!slsReceiverUsers@{sls\-Receiver\-Users}}
\paragraph[receiver]{\setlength{\rightskip}{0pt plus 5cm}sls\-Receiver\-TCPIPInterface$\ast$ \hyperlink{classslsReceiverUsers_8f262724fb99ecd3976214710d82dd18}{sls\-Receiver\-Users::receiver}\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}\hfill}
\label{classslsReceiverUsers_8f262724fb99ecd3976214710d82dd18}




Definition at line 87 of file sls\-Receiver\-Users.h.

The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
\hyperlink{slsReceiverUsers_8h}{sls\-Receiver\-Users.h}\end{CompactItemize}
