mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 21:37:13 +02:00
initializing variables and copying ot gui only full frames
This commit is contained in:
@ -103,6 +103,10 @@ enum communicationProtocol{
|
|||||||
nsent(0),
|
nsent(0),
|
||||||
total_sent(0)// sender (client): where to? ip
|
total_sent(0)// sender (client): where to? ip
|
||||||
{
|
{
|
||||||
|
memset(&serverAddress, 0, sizeof(sockaddr_in));
|
||||||
|
memset(&clientAddress, 0, sizeof(sockaddr_in));
|
||||||
|
// serverAddress = {0};
|
||||||
|
// clientAddress = {0};
|
||||||
// strcpy(hostname,host_ip_or_name);
|
// strcpy(hostname,host_ip_or_name);
|
||||||
struct hostent *hostInfo = gethostbyname(host_ip_or_name);
|
struct hostent *hostInfo = gethostbyname(host_ip_or_name);
|
||||||
if (hostInfo == NULL){
|
if (hostInfo == NULL){
|
||||||
@ -158,7 +162,10 @@ enum communicationProtocol{
|
|||||||
nsent(0),
|
nsent(0),
|
||||||
total_sent(0)
|
total_sent(0)
|
||||||
{
|
{
|
||||||
|
memset(&serverAddress, 0, sizeof(sockaddr_in));
|
||||||
|
memset(&clientAddress, 0, sizeof(sockaddr_in));
|
||||||
|
// serverAddress = {0};
|
||||||
|
// clientAddress = {0};
|
||||||
/* // you can specify an IP address: */
|
/* // you can specify an IP address: */
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
|
@ -1890,7 +1890,7 @@ int UDPStandardImplementation::startWriting(){
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
//copy to gui
|
//copy to gui
|
||||||
if((packetsPerFrame * numpackets) == bufferSize){
|
if(numpackets == packetsPerFrame * numJobsPerThread){ //only full frames
|
||||||
copyFrameToGui(NULL,-1,wbuf[0]+HEADER_SIZE_NUM_TOT_PACKETS);
|
copyFrameToGui(NULL,-1,wbuf[0]+HEADER_SIZE_NUM_TOT_PACKETS);
|
||||||
#ifdef VERYVERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout << ithread << " finished copying" << endl;
|
cout << ithread << " finished copying" << endl;
|
||||||
|
Reference in New Issue
Block a user