mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 15:00:02 +02:00
Merge branch 'startlater'
This commit is contained in:
commit
cb51de145b
@ -65,6 +65,11 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
|
||||
*/
|
||||
int setDetectorType(detectorType det);
|
||||
|
||||
/**
|
||||
* Set bottom to bot
|
||||
* @param bot = 1 if bottom
|
||||
*/
|
||||
void setBottom(int bot);
|
||||
|
||||
//Frame indices and numbers caught
|
||||
/**
|
||||
|
@ -225,6 +225,12 @@ class UDPInterface {
|
||||
**************************************** Added by Dhanya *********************************************************
|
||||
*******************************************************************************************************************/
|
||||
|
||||
/**
|
||||
* Set bottom to bot
|
||||
* @param bot = 1 if bottom
|
||||
*/
|
||||
virtual void setBottom(int bot)= 0;
|
||||
|
||||
/**
|
||||
* Returns File Index
|
||||
*/
|
||||
|
@ -143,7 +143,7 @@ int UDPBaseImplementation::setDetectorType(detectorType det){
|
||||
|
||||
|
||||
|
||||
|
||||
void UDPBaseImplementation::setBottom(int bot){bottom=bot;};
|
||||
|
||||
/*Frame indices and numbers caught*/
|
||||
|
||||
|
@ -36,6 +36,7 @@ slsReceiver::slsReceiver(int argc, char *argv[], int &success){
|
||||
string fname = "";
|
||||
string udp_interface_type = "standard";
|
||||
string rest_hostname = "localhost:8081";
|
||||
udp_interface = NULL;
|
||||
|
||||
bool bottom = false; //TODO: properly set new parameter -> mode?
|
||||
//parse command line for config
|
||||
@ -128,10 +129,11 @@ slsReceiver::slsReceiver(int argc, char *argv[], int &success){
|
||||
|
||||
if (success==OK){
|
||||
FILE_LOG(logINFO) << "SLS Receiver starting " << udp_interface_type << " on port " << tcpip_port_no << " with mode " << bottom << endl;
|
||||
#ifdef REST
|
||||
udp_interface = UDPInterface::create(udp_interface_type);
|
||||
udp_interface->configure(configuration_map);
|
||||
#endif
|
||||
tcpipInterface = new slsReceiverTCPIPInterface(success, udp_interface, tcpip_port_no, bottom);
|
||||
//tcp ip interface
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ slsReceiverTCPIPInterface::slsReceiverTCPIPInterface(int &success, UDPInterface*
|
||||
bottom(bot){
|
||||
|
||||
int port_no=portNumber;
|
||||
|
||||
if(receiverBase == NULL) receiverBase = 0;
|
||||
|
||||
if (pn>0)
|
||||
port_no = pn;
|
||||
@ -198,11 +198,12 @@ void slsReceiverTCPIPInterface::startTCPServer(){
|
||||
//if tcp command was to exit server
|
||||
if(v==GOODBYE){
|
||||
cout << "Shutting down UDP Socket" << endl;
|
||||
if(receiverBase)
|
||||
if(receiverBase){
|
||||
receiverBase->shutDownUDPSockets();
|
||||
|
||||
cout << "Closing Files... " << endl;
|
||||
receiverBase->closeFile();
|
||||
}
|
||||
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
@ -364,6 +365,10 @@ int slsReceiverTCPIPInterface::set_detector_type(){
|
||||
}
|
||||
else{
|
||||
myDetectorType = dr;
|
||||
#ifndef REST
|
||||
receiverBase = UDPInterface::create("standard");
|
||||
receiverBase->setBottom(bottom);
|
||||
#endif
|
||||
ret=receiverBase->setDetectorType(dr);
|
||||
retval = myDetectorType;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user