writing frame number to the file for eiger

This commit is contained in:
Dhanya Maliakal 2015-03-30 17:16:31 +02:00
parent 248848c666
commit e35867227f
2 changed files with 8 additions and 2 deletions

View File

@ -499,7 +499,8 @@ protected:
typedef struct
{
unsigned char num1[4];
unsigned char num2[4];
unsigned char num2[3];
unsigned char num3[1];
} eiger_packet_header;
/** max number of listening threads */

View File

@ -2306,8 +2306,13 @@ void UDPStandardImplementation::writeToFile_withoutCompression(char* buf,int num
if((enableFileWrite) && (sfilefd)){
offset = HEADER_SIZE_NUM_TOT_PACKETS;
if(myDetectorType == EIGER)
if(myDetectorType == EIGER){
offset += EIGER_HEADER_LENGTH;
(*(uint32_t*)(((eiger_packet_header *)((char*)(buf + offset)))->num1)) = framenum;
//cprintf(RED, "framenum:0x%x\n", (*(unsigned int*)(((eiger_packet_header *)((char*)(buf + offset)))->num1)));
//cprintf(RED, "2packetnumber:0x%x\n", (*(uint16_t*)(((eiger_packet_header *)((char*)(buf + offset)))->num3)));
//cprintf(RED, "22packetnumber:0x%x\n",(*(uint16_t*)(((eiger_packet_header *)((char*)(buf + offset +1040)))->num3)));
}
while(numpackets > 0){
//for progress and packet loss calculation(new files)