mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-06 18:10:40 +02:00
udpport2 module
This commit is contained in:
parent
5cfe7b4338
commit
665401669e
@ -232,6 +232,11 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual void setUDPPortNo(int p) = 0;
|
virtual void setUDPPortNo(int p) = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set UDP Port Number
|
||||||
|
*/
|
||||||
|
virtual void setUDPPortNo2(int p) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set Ethernet Interface or IP to listen to
|
* Set Ethernet Interface or IP to listen to
|
||||||
*/
|
*/
|
||||||
|
@ -613,10 +613,10 @@ int slsReceiverTCPIPInterface::setup_udp(){
|
|||||||
ret=OK;
|
ret=OK;
|
||||||
strcpy(mess,"could not set up udp connection");
|
strcpy(mess,"could not set up udp connection");
|
||||||
char retval[MAX_STR_LENGTH]="";
|
char retval[MAX_STR_LENGTH]="";
|
||||||
char args[2][MAX_STR_LENGTH];
|
char args[3][MAX_STR_LENGTH];
|
||||||
|
|
||||||
string temp;
|
string temp;
|
||||||
int udpport;
|
int udpport,udpport2;
|
||||||
char eth[MAX_STR_LENGTH];
|
char eth[MAX_STR_LENGTH];
|
||||||
|
|
||||||
|
|
||||||
@ -641,8 +641,9 @@ int slsReceiverTCPIPInterface::setup_udp(){
|
|||||||
else{
|
else{
|
||||||
//set up udp port
|
//set up udp port
|
||||||
sscanf(args[1],"%d",&udpport);
|
sscanf(args[1],"%d",&udpport);
|
||||||
|
sscanf(args[2],"%d",&udpport2);
|
||||||
receiverBase->setUDPPortNo(udpport);
|
receiverBase->setUDPPortNo(udpport);
|
||||||
|
receiverBase->setUDPPortNo2(udpport2);
|
||||||
//setup udpip
|
//setup udpip
|
||||||
//get ethernet interface or IP to listen to
|
//get ethernet interface or IP to listen to
|
||||||
temp = genericSocket::ipToName(args[0]);
|
temp = genericSocket::ipToName(args[0]);
|
||||||
|
@ -443,9 +443,16 @@ void slsReceiverUDPFunctions::setEthernetInterface(char* c){
|
|||||||
|
|
||||||
|
|
||||||
void slsReceiverUDPFunctions::setUDPPortNo(int p){
|
void slsReceiverUDPFunctions::setUDPPortNo(int p){
|
||||||
for(int i=0;i<numListeningThreads;i++){
|
//for(int i=0;i<numListeningThreads;i++){
|
||||||
server_port[i] = p+i;
|
server_port[0] = p;
|
||||||
}
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void slsReceiverUDPFunctions::setUDPPortNo2(int p){
|
||||||
|
//for(int i=0;i<numListeningThreads;i++){
|
||||||
|
server_port[1] = p;
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -904,7 +911,9 @@ int slsReceiverUDPFunctions::createUDPSockets(){
|
|||||||
int iret;
|
int iret;
|
||||||
for(int i=0;i<numListeningThreads;i++){
|
for(int i=0;i<numListeningThreads;i++){
|
||||||
iret = udpSocket[i]->getErrorStatus();
|
iret = udpSocket[i]->getErrorStatus();
|
||||||
if(iret){
|
if(!iret)
|
||||||
|
cout << "UDP port opened at port " << server_port[i] << endl;
|
||||||
|
else{
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << "Could not create UDP socket on port " << server_port[i] << " error:" << iret << endl;
|
cout << "Could not create UDP socket on port " << server_port[i] << " error:" << iret << endl;
|
||||||
#endif
|
#endif
|
||||||
|
@ -213,6 +213,11 @@ public:
|
|||||||
*/
|
*/
|
||||||
void setUDPPortNo(int p);
|
void setUDPPortNo(int p);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set UDP Port Number2
|
||||||
|
*/
|
||||||
|
void setUDPPortNo2(int p);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns number of frames to receive
|
* Returns number of frames to receive
|
||||||
* This is the number of frames to expect to receiver from the detector.
|
* This is the number of frames to expect to receiver from the detector.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user