mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-20 16:48:01 +02:00
Added status resetting for REST
This commit is contained in:
@ -29,25 +29,25 @@ slsReceiverTCPIPInterface::~slsReceiverTCPIPInterface() {
|
||||
|
||||
|
||||
slsReceiverTCPIPInterface::slsReceiverTCPIPInterface(int &success, UDPInterface* rbase, int pn):
|
||||
myDetectorType(GOTTHARD),
|
||||
receiverBase(rbase),
|
||||
ret(OK),
|
||||
lockStatus(0),
|
||||
shortFrame(-1),
|
||||
packetsPerFrame(GOTTHARD_PACKETS_PER_FRAME),
|
||||
dynamicrange(16),
|
||||
socket(NULL),
|
||||
killTCPServerThread(0),
|
||||
tenGigaEnable(0), portNumber(DEFAULT_PORTNO+2){
|
||||
|
||||
int port_no=portNumber;
|
||||
|
||||
|
||||
if (pn>0)
|
||||
port_no = pn;
|
||||
|
||||
success=OK;
|
||||
|
||||
myDetectorType(GOTTHARD),
|
||||
receiverBase(rbase),
|
||||
ret(OK),
|
||||
lockStatus(0),
|
||||
shortFrame(-1),
|
||||
packetsPerFrame(GOTTHARD_PACKETS_PER_FRAME),
|
||||
dynamicrange(16),
|
||||
socket(NULL),
|
||||
killTCPServerThread(0),
|
||||
tenGigaEnable(0), portNumber(DEFAULT_PORTNO+2){
|
||||
|
||||
int port_no=portNumber;
|
||||
|
||||
|
||||
if (pn>0)
|
||||
port_no = pn;
|
||||
|
||||
success=OK;
|
||||
|
||||
//create socket
|
||||
if(success == OK){
|
||||
socket = new MySocketTCP(port_no);
|
||||
@ -56,24 +56,25 @@ slsReceiverTCPIPInterface::slsReceiverTCPIPInterface(int &success, UDPInterface*
|
||||
delete socket;
|
||||
socket=NULL;
|
||||
} else {
|
||||
portNumber=port_no;
|
||||
portNumber=port_no;
|
||||
//initialize variables
|
||||
strcpy(socket->lastClientIP,"none");
|
||||
strcpy(socket->thisClientIP,"none1");
|
||||
strcpy(mess,"dummy message");
|
||||
|
||||
|
||||
function_table();
|
||||
#ifdef VERBOSE
|
||||
cout << "Function table assigned." << endl;
|
||||
#endif
|
||||
|
||||
|
||||
//Catch signal SIGINT to close files properly
|
||||
signal(SIGINT,staticCloseFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
int slsReceiverTCPIPInterface::setPortNumber(int pn){
|
||||
int p_number;
|
||||
MySocketTCP *oldsocket=NULL;;
|
||||
|
Reference in New Issue
Block a user