mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-07 10:30:41 +02:00
top image reconstruct works with make flga
This commit is contained in:
parent
b5e8c104db
commit
6cd28165ca
@ -498,8 +498,8 @@ protected:
|
|||||||
/** structure of an eiger image header*/
|
/** structure of an eiger image header*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
unsigned char num1[4];
|
unsigned char num1[6];
|
||||||
unsigned char num2[3];
|
unsigned char num2[1];
|
||||||
unsigned char num3[1];
|
unsigned char num3[1];
|
||||||
} eiger_packet_header;
|
} eiger_packet_header;
|
||||||
|
|
||||||
|
@ -1963,6 +1963,7 @@ int UDPStandardImplementation::startWriting(){
|
|||||||
}else if (numpackets > 0){
|
}else if (numpackets > 0){
|
||||||
for(i=0;i<numListeningThreads;++i)
|
for(i=0;i<numListeningThreads;++i)
|
||||||
writeToFile_withoutCompression(wbuf[i], numpackets,currframenum);
|
writeToFile_withoutCompression(wbuf[i], numpackets,currframenum);
|
||||||
|
|
||||||
#ifdef VERYDEBUG
|
#ifdef VERYDEBUG
|
||||||
cout << "written everyting" << endl;
|
cout << "written everyting" << endl;
|
||||||
#endif
|
#endif
|
||||||
@ -2308,10 +2309,21 @@ void UDPStandardImplementation::writeToFile_withoutCompression(char* buf,int num
|
|||||||
offset = HEADER_SIZE_NUM_TOT_PACKETS;
|
offset = HEADER_SIZE_NUM_TOT_PACKETS;
|
||||||
if(myDetectorType == EIGER){
|
if(myDetectorType == EIGER){
|
||||||
offset += EIGER_HEADER_LENGTH;
|
offset += EIGER_HEADER_LENGTH;
|
||||||
(*(uint32_t*)(((eiger_packet_header *)((char*)(buf + offset)))->num1)) = framenum;
|
#ifdef WRITE_HEADERS
|
||||||
cprintf(RED, "framenum:0x%x\n", (*(unsigned int*)(((eiger_packet_header *)((char*)(buf + offset)))->num1)));
|
for (int i = 0; i < packetsPerFrame; i++)
|
||||||
cprintf(RED, "2packetnumber:0x%x\n", (*(uint16_t*)(((eiger_packet_header *)((char*)(buf + offset)))->num3)));
|
(*(uint32_t*)(((eiger_packet_header *)((char*)(buf + offset + 1040*i)))->num1)) = framenum;
|
||||||
cprintf(RED, "22packetnumber:0x%x\n",(*(uint16_t*)(((eiger_packet_header *)((char*)(buf + offset +1040)))->num3)));
|
|
||||||
|
cprintf(RED, "\np1 fnum:0x%x\n", (*(unsigned int*)(((eiger_packet_header *)((char*)(buf + offset)))->num1)));
|
||||||
|
cprintf(RED, "p1:0x%x\n", (*(uint8_t*)(((eiger_packet_header *)((char*)(buf + offset)))->num2)));
|
||||||
|
cprintf(RED, "p1 num:0x%x\n", (*(uint8_t*)(((eiger_packet_header *)((char*)(buf + offset)))->num3)));
|
||||||
|
cprintf(RED, "p2 fnum:0x%x\n", (*(unsigned int*)(((eiger_packet_header *)((char*)(buf + offset +1040)))->num1)));
|
||||||
|
cprintf(RED, "p2:0x%x\n", (*(uint8_t*)(((eiger_packet_header *)((char*)(buf + offset +1040)))->num2)));
|
||||||
|
cprintf(RED, "p2 num:0x%x\n", (*(uint8_t*)(((eiger_packet_header *)((char*)(buf + offset +1040)))->num3)));
|
||||||
|
cprintf(RED, "p3 fnum:0x%x\n", (*(unsigned int*)(((eiger_packet_header *)((char*)(buf + offset + 2080)))->num1)));
|
||||||
|
cprintf(RED, "p3:0x%x\n", (*(uint8_t*)(((eiger_packet_header *)((char*)(buf + offset +2080)))->num2)));
|
||||||
|
cprintf(RED, "p3 num:0x%x\n", (*(uint8_t*)(((eiger_packet_header *)((char*)(buf + offset +2080)))->num3)));
|
||||||
|
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
while(numpackets > 0){
|
while(numpackets > 0){
|
||||||
|
|
||||||
|
@ -1488,8 +1488,8 @@ int slsReceiverTCPIPInterface::eiger_read_frame(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
/*int inum = 0;
|
int inum = 0;
|
||||||
//dr = 16, hence uint16_t
|
//dr = 16, hence uint16_t
|
||||||
for(inum = 0; inum < 2; inum++)
|
for(inum = 0; inum < 2; inum++)
|
||||||
cprintf(YELLOW,"before htonl %d,0 :%d\n",inum,((uint16_t)(*((uint16_t*)((char*)(retval+(inum*(dynamicrange/8))))))));
|
cprintf(YELLOW,"before htonl %d,0 :%d\n",inum,((uint16_t)(*((uint16_t*)((char*)(retval+(inum*(dynamicrange/8))))))));
|
||||||
@ -1499,8 +1499,8 @@ int slsReceiverTCPIPInterface::eiger_read_frame(){
|
|||||||
cprintf(YELLOW,"before htonl %d,2 :%d\n",inum,((uint16_t)(*((uint16_t*)((char*)(retval+((2048+inum)*(dynamicrange/8))))))));
|
cprintf(YELLOW,"before htonl %d,2 :%d\n",inum,((uint16_t)(*((uint16_t*)((char*)(retval+((2048+inum)*(dynamicrange/8))))))));
|
||||||
for(inum = 254; inum < 258; inum++)
|
for(inum = 254; inum < 258; inum++)
|
||||||
cprintf(YELLOW,"before htonl %d,2 :%d\n",inum,((uint16_t)(*((uint16_t*)((char*)(retval+((2048+inum)*(dynamicrange/8))))))));
|
cprintf(YELLOW,"before htonl %d,2 :%d\n",inum,((uint16_t)(*((uint16_t*)((char*)(retval+((2048+inum)*(dynamicrange/8))))))));
|
||||||
|
*/
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
//64 bit htonl cuz of endianness
|
//64 bit htonl cuz of endianness
|
||||||
for(i=0;i<(1024*(16*dynamicrange)*2)/8;i++){
|
for(i=0;i<(1024*(16*dynamicrange)*2)/8;i++){
|
||||||
@ -1515,7 +1515,7 @@ int slsReceiverTCPIPInterface::eiger_read_frame(){
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
//dr = 16, hence uint16_t
|
//dr = 16, hence uint16_t
|
||||||
for(inum = 0; inum < 2; inum++)
|
for(inum = 0; inum < 2; inum++)
|
||||||
cprintf(MAGENTA,"after htonl %d,0 :%d\n",inum,((uint16_t)(*((uint16_t*)((char*)(retval+(inum*(dynamicrange/8))))))));
|
cprintf(MAGENTA,"after htonl %d,0 :%d\n",inum,((uint16_t)(*((uint16_t*)((char*)(retval+(inum*(dynamicrange/8))))))));
|
||||||
@ -1525,7 +1525,7 @@ int slsReceiverTCPIPInterface::eiger_read_frame(){
|
|||||||
cprintf(MAGENTA,"after htonl %d,2 :%d\n",inum,((uint16_t)(*((uint16_t*)((char*)(retval+((2048+inum)*(dynamicrange/8))))))));
|
cprintf(MAGENTA,"after htonl %d,2 :%d\n",inum,((uint16_t)(*((uint16_t*)((char*)(retval+((2048+inum)*(dynamicrange/8))))))));
|
||||||
for(inum = 254; inum < 258; inum++)
|
for(inum = 254; inum < 258; inum++)
|
||||||
cprintf(MAGENTA,"after htonl %d,2 :%d\n",inum,((uint16_t)(*((uint16_t*)((char*)(retval+((2048+inum)*(dynamicrange/8))))))));
|
cprintf(MAGENTA,"after htonl %d,2 :%d\n",inum,((uint16_t)(*((uint16_t*)((char*)(retval+((2048+inum)*(dynamicrange/8))))))));
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user