mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 12:27:14 +02:00
ctb file frame header back in
This commit is contained in:
@ -33,12 +33,11 @@ class BinaryFile : private virtual slsDetectorDefs, public File, public BinaryFi
|
||||
* @param dr pointer to dynamic range
|
||||
* @param portno pointer to udp port number for logging
|
||||
* @param smode pointer to silent mode
|
||||
* @param hwenable header writer enable (ctb)
|
||||
*/
|
||||
BinaryFile(int ind, uint32_t* maxf,
|
||||
int* nd, char* fname, char* fpath, uint64_t* findex, bool* owenable,
|
||||
int* dindex, int* nunits, uint64_t* nf, uint32_t* dr, uint32_t* portno,
|
||||
bool* smode, bool hwenable);
|
||||
bool* smode);
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
@ -117,8 +116,5 @@ class BinaryFile : private virtual slsDetectorDefs, public File, public BinaryFi
|
||||
/** Number of actual packets caught in file */
|
||||
uint64_t numActualPacketsInFile;
|
||||
|
||||
/** Header writer enable */
|
||||
bool headerWriteEnable;
|
||||
|
||||
};
|
||||
|
||||
|
@ -100,7 +100,6 @@ class BinaryFileStatic {
|
||||
* @param fd pointer to file handle
|
||||
* @param fname master file name
|
||||
* @param owenable overwrite enable
|
||||
* @param hwenable header write enable
|
||||
* @param dr dynamic range
|
||||
* @param tenE ten giga enable
|
||||
* @param size image size
|
||||
@ -115,7 +114,7 @@ class BinaryFileStatic {
|
||||
* @param version version of software for binary writing
|
||||
* @returns 0 for success and 1 for fail
|
||||
*/
|
||||
static int CreateMasterDataFile(FILE*& fd, std::string fname, bool owenable, bool hwenable,
|
||||
static int CreateMasterDataFile(FILE*& fd, std::string fname, bool owenable,
|
||||
uint32_t dr, bool tenE, uint32_t size,
|
||||
uint32_t nPixelsX, uint32_t nPixelsY, uint64_t nf,
|
||||
uint32_t maxf,
|
||||
@ -136,24 +135,6 @@ class BinaryFileStatic {
|
||||
return 1;
|
||||
}
|
||||
time_t t = time(0);
|
||||
char header[MAX_STR_LENGTH];
|
||||
strcpy(header,
|
||||
"#Frame Header\n"
|
||||
"Frame Number : 8 bytes\n"
|
||||
"SubFrame Number/ExpLength : 4 bytes\n"
|
||||
"Packet Number : 4 bytes\n"
|
||||
"Bunch ID : 8 bytes\n"
|
||||
"Timestamp : 8 bytes\n"
|
||||
"Module Id : 2 bytes\n"
|
||||
"Row : 2 bytes\n"
|
||||
"Column : 2 bytes\n"
|
||||
"Reserved : 2 bytes\n"
|
||||
"Debug : 4 bytes\n"
|
||||
"Round Robin Number : 2 bytes\n"
|
||||
"Detector Type : 1 byte\n"
|
||||
"Header Version : 1 byte\n"
|
||||
"Packets Caught Mask : 64 bytes\n");
|
||||
|
||||
char message[MAX_MASTER_FILE_LENGTH];
|
||||
sprintf(message,
|
||||
"Version : %.1f\n"
|
||||
@ -170,7 +151,21 @@ class BinaryFileStatic {
|
||||
"Period (ns) : %lld\n"
|
||||
"Timestamp : %s\n\n"
|
||||
|
||||
"%s"
|
||||
"#Frame Header\n"
|
||||
"Frame Number : 8 bytes\n"
|
||||
"SubFrame Number/ExpLength : 4 bytes\n"
|
||||
"Packet Number : 4 bytes\n"
|
||||
"Bunch ID : 8 bytes\n"
|
||||
"Timestamp : 8 bytes\n"
|
||||
"Module Id : 2 bytes\n"
|
||||
"Row : 2 bytes\n"
|
||||
"Column : 2 bytes\n"
|
||||
"Reserved : 2 bytes\n"
|
||||
"Debug : 4 bytes\n"
|
||||
"Round Robin Number : 2 bytes\n"
|
||||
"Detector Type : 1 byte\n"
|
||||
"Header Version : 1 byte\n"
|
||||
"Packets Caught Mask : 64 bytes\n"
|
||||
,
|
||||
version,
|
||||
dr,
|
||||
@ -184,9 +179,7 @@ class BinaryFileStatic {
|
||||
(long long int)subexposuretime,
|
||||
(long long int)subperiod,
|
||||
(long long int)acquisitionPeriod,
|
||||
ctime(&t),
|
||||
(hwenable ? header : "")
|
||||
);
|
||||
ctime(&t));
|
||||
if (strlen(message) > MAX_MASTER_FILE_LENGTH) {
|
||||
FILE_LOG(logERROR) << "Master File Size " << strlen(message) <<
|
||||
" is greater than max str size " << MAX_MASTER_FILE_LENGTH;
|
||||
|
@ -87,9 +87,6 @@ public:
|
||||
/** default udp socket buffer size */
|
||||
uint32_t defaultUdpSocketBufferSize;
|
||||
|
||||
/** header write enable */
|
||||
bool headerWriteEnable;
|
||||
|
||||
|
||||
|
||||
|
||||
@ -117,8 +114,7 @@ public:
|
||||
nPixelsYComplete(0),
|
||||
imageSizeComplete(0),
|
||||
standardheader(false),
|
||||
defaultUdpSocketBufferSize(RECEIVE_SOCKET_BUFFER_SIZE),
|
||||
headerWriteEnable(true)
|
||||
defaultUdpSocketBufferSize(RECEIVE_SOCKET_BUFFER_SIZE)
|
||||
{};
|
||||
|
||||
/** Destructor */
|
||||
@ -257,7 +253,6 @@ public:
|
||||
FILE_LOG(level) << "Complete Image Size: " << imageSizeComplete;
|
||||
FILE_LOG(level) << "Standard Header: " << standardheader;
|
||||
FILE_LOG(level) << "UDP Socket Buffer Size: " << defaultUdpSocketBufferSize;
|
||||
FILE_LOG(level) << "Header Write Enable: " << headerWriteEnable;
|
||||
};
|
||||
};
|
||||
|
||||
@ -581,7 +576,6 @@ public:
|
||||
fifoBufferHeaderSize= FIFO_HEADER_NUMBYTES + sizeof(slsDetectorDefs::sls_receiver_header);
|
||||
defaultFifoDepth = 2500;
|
||||
standardheader = true;
|
||||
headerWriteEnable = false;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user