mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-19 16:27:13 +02:00
separated slsReceiverInterface from slsDetector
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@314 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
98
slsDetectorSoftware/slsReceiverInterface/receiverInterface.h
Normal file
98
slsDetectorSoftware/slsReceiverInterface/receiverInterface.h
Normal file
@ -0,0 +1,98 @@
|
||||
|
||||
|
||||
|
||||
#ifndef SLS_RECEIVER_INTERFACE_H
|
||||
#define SLS_RECEIVER_INTERFACE_H
|
||||
|
||||
#include "MySocketTCP.h"
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @short the slsReceiverInterface class is the interface between the sls detector and the sls receiver
|
||||
* @author Dhanya Maliakal
|
||||
* @version 0.1alpha
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
@short interface between sls detector and sls receiver
|
||||
*/
|
||||
class receiverInterface{
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* (default) constructor
|
||||
* @param socket tcp socket between client and receiver
|
||||
*/
|
||||
receiverInterface(MySocketTCP *socket);
|
||||
|
||||
|
||||
/**
|
||||
* destructor
|
||||
*/
|
||||
virtual ~receiverInterface();
|
||||
|
||||
|
||||
void setSocket(MySocketTCP *socket){dataSocket=socket;};
|
||||
|
||||
|
||||
/**
|
||||
* Send a string to receiver
|
||||
* @param fnum function enum to determine what parameter
|
||||
* @param retval return value
|
||||
* @param arg value to send
|
||||
* \returns success of operation
|
||||
*/
|
||||
int sendString(int fnum, char retval[], char arg[]);
|
||||
|
||||
|
||||
/**
|
||||
* Send a string to receiver
|
||||
* @param fnum function enum to determine what parameter
|
||||
* @param retval return value
|
||||
* @param arg value to send
|
||||
* \returns success of operation
|
||||
*/
|
||||
int sendInt(int fnum, int &retval, int arg);
|
||||
|
||||
|
||||
/**
|
||||
* Send a string to receiver
|
||||
* @param fnum function enum to determine what parameter
|
||||
* @param retval return value
|
||||
* \returns success of operation
|
||||
*/
|
||||
int getInt(int fnum, int &retval);
|
||||
|
||||
|
||||
/**
|
||||
* Send a string to receiver
|
||||
* @param fnum function enum to get last client up
|
||||
* @param retval return value
|
||||
* \returns success of operation
|
||||
*/
|
||||
int getLastClientIP(int fnum, char retval[]);
|
||||
|
||||
|
||||
/**
|
||||
* Send a string to receiver
|
||||
* @param fnum function enum to determine which function to execute
|
||||
* \returns success of operation
|
||||
*/
|
||||
int executeFunction(int fnum);
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* socket for data acquisition
|
||||
*/
|
||||
MySocketTCP *dataSocket;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user