mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
sending and writing subexptime in the receiver files, adding 0x in front of all numbers printed in command line which is hexa
This commit is contained in:
@ -66,11 +66,12 @@ class BinaryFile : private virtual slsReceiverDefs, public File, public BinaryFi
|
||||
* @param nx number of pixels in x direction
|
||||
* @param ny number of pixels in y direction
|
||||
* @param at acquisition time
|
||||
* @param at sub exposure time
|
||||
* @param ap acquisition period
|
||||
* @returns OK or FAIL
|
||||
*/
|
||||
int CreateMasterFile(bool en, uint32_t size,
|
||||
uint32_t nx, uint32_t ny, uint64_t at, uint64_t ap);
|
||||
uint32_t nx, uint32_t ny, uint64_t at, uint64_t st, uint64_t ap);
|
||||
|
||||
/**
|
||||
* Close Current File
|
||||
|
@ -108,12 +108,13 @@ class BinaryFileStatic {
|
||||
* @param nf number of images
|
||||
* @param acquisitionTime acquisition time
|
||||
* @param acquisitionPeriod acquisition period
|
||||
* @param subexposuretime sub exposure time
|
||||
* @param version version of software for binary writing
|
||||
* @returns 0 for success and 1 for fail
|
||||
*/
|
||||
static int CreateMasterDataFile(FILE*& fd, string fname, bool owenable,
|
||||
uint32_t dr, bool tenE, uint32_t size, uint32_t nPixelsX, uint32_t nPixelsY, uint64_t nf,
|
||||
uint64_t acquisitionTime, uint64_t acquisitionPeriod, double version)
|
||||
uint64_t acquisitionTime, uint64_t subexposuretime, uint64_t acquisitionPeriod, double version)
|
||||
{
|
||||
if(!owenable){
|
||||
if (NULL == (fd = fopen((const char *) fname.c_str(), "wx"))){
|
||||
@ -129,16 +130,17 @@ class BinaryFileStatic {
|
||||
time_t t = time(0);
|
||||
char message[MAX_STR_LENGTH];
|
||||
sprintf(message,
|
||||
"Version : %.1f\n"
|
||||
"Dynamic Range : %d\n"
|
||||
"Ten Giga : %d\n"
|
||||
"Image Size : %d bytes\n"
|
||||
"x : %d pixels\n"
|
||||
"y : %d pixels\n"
|
||||
"Total Frames : %lld\n"
|
||||
"Exptime (ns) : %lld\n"
|
||||
"Period (ns) : %lld\n"
|
||||
"Timestamp : %s\n\n"
|
||||
"Version : %.1f\n"
|
||||
"Dynamic Range : %d\n"
|
||||
"Ten Giga : %d\n"
|
||||
"Image Size : %d bytes\n"
|
||||
"x : %d pixels\n"
|
||||
"y : %d pixels\n"
|
||||
"Total Frames : %lld\n"
|
||||
"Exptime (ns) : %lld\n"
|
||||
"SubExptime (ns) : %lld\n"
|
||||
"Period (ns) : %lld\n"
|
||||
"Timestamp : %s\n\n"
|
||||
|
||||
"#Frame Header\n"
|
||||
"Frame Number : 8 bytes\n"
|
||||
@ -163,6 +165,7 @@ class BinaryFileStatic {
|
||||
nPixelsY,
|
||||
(long long int)nf,
|
||||
(long long int)acquisitionTime,
|
||||
(long long int)subexposuretime,
|
||||
(long long int)acquisitionPeriod,
|
||||
ctime(&t));
|
||||
if (strlen(message) > MAX_STR_LENGTH) {
|
||||
|
@ -175,10 +175,11 @@ class DataProcessor : private virtual slsReceiverDefs, public ThreadObject {
|
||||
* @param en ten giga enable
|
||||
* @param nf number of frames
|
||||
* @param at acquisition time
|
||||
* @param at sub exposure time
|
||||
* @param ap acquisition period
|
||||
* @returns OK or FAIL
|
||||
*/
|
||||
int CreateNewFile(bool en, uint64_t nf, uint64_t at, uint64_t ap);
|
||||
int CreateNewFile(bool en, uint64_t nf, uint64_t at, uint64_t st, uint64_t ap);
|
||||
|
||||
/**
|
||||
* Closes files
|
||||
|
@ -144,11 +144,12 @@ class File : private virtual slsReceiverDefs {
|
||||
* @param nx number of pixels in x direction
|
||||
* @param ny number of pixels in y direction
|
||||
* @param at acquisition time
|
||||
* @param at sub exposure time
|
||||
* @param ap acquisition period
|
||||
* @returns OK or FAIL
|
||||
*/
|
||||
virtual int CreateMasterFile(bool en, uint32_t size,
|
||||
uint32_t nx, uint32_t ny, uint64_t at, uint64_t ap) {
|
||||
uint32_t nx, uint32_t ny, uint64_t at, uint64_t st, uint64_t ap) {
|
||||
bprintf(RED,"This is a generic function CreateMasterFile that should be overloaded by a derived class\n");
|
||||
return OK;
|
||||
}
|
||||
|
@ -200,6 +200,12 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
|
||||
*/
|
||||
uint64_t getAcquisitionTime() const;
|
||||
|
||||
/**
|
||||
* Get Sub Exposure Time
|
||||
* @return Sub Exposure Time
|
||||
*/
|
||||
uint64_t getSubExpTime() const;
|
||||
|
||||
/*
|
||||
* Get Number of Frames expected by receiver from detector
|
||||
* The data receiver status will change from running to idle when it gets this number of frames FIXME: (Not implemented)
|
||||
@ -396,6 +402,13 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
|
||||
*/
|
||||
int setAcquisitionTime(const uint64_t i);
|
||||
|
||||
/**
|
||||
* Set Sub Exposure Time
|
||||
* @param i Sub Exposure Time
|
||||
* @return OK or FAIL
|
||||
*/
|
||||
void setSubExpTime(const uint64_t i);
|
||||
|
||||
/**
|
||||
* Set Number of Frames expected by receiver from detector
|
||||
* The data receiver status will change from running to idle when it gets this number of frames
|
||||
@ -581,6 +594,8 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
|
||||
uint64_t acquisitionPeriod;
|
||||
/** Acquisition Time */
|
||||
uint64_t acquisitionTime;
|
||||
/** Sub Exposure Time */
|
||||
uint64_t subExpTime;
|
||||
/** Frame Number */
|
||||
uint64_t numberOfFrames;
|
||||
/** Dynamic Range */
|
||||
|
@ -43,6 +43,7 @@ class UDPInterface {
|
||||
* -setAcquisitionPeriod
|
||||
* -setNumberOfFrames
|
||||
* -setAcquisitionTime
|
||||
* -setSubExpTime
|
||||
* -setDynamicRange
|
||||
* -setFlippedData
|
||||
* -setActivate
|
||||
@ -284,6 +285,12 @@ class UDPInterface {
|
||||
*/
|
||||
virtual uint64_t getAcquisitionTime() const = 0;
|
||||
|
||||
/**
|
||||
* Get Sub Exposure Time
|
||||
* @return Sub Exposure Time
|
||||
*/
|
||||
virtual uint64_t getSubExpTime() const = 0;
|
||||
|
||||
/*
|
||||
* Get Number of Frames expected by receiver from detector
|
||||
* The data receiver status will change from running to idle when it gets this number of frames FIXME: (Not implemented)
|
||||
@ -476,6 +483,13 @@ class UDPInterface {
|
||||
*/
|
||||
virtual int setAcquisitionTime(const uint64_t i) = 0;
|
||||
|
||||
/**
|
||||
* Set Sub Exposure Time
|
||||
* @param i Sub Exposure Time
|
||||
* @return OK or FAIL
|
||||
*/
|
||||
virtual void setSubExpTime(const uint64_t i) = 0;
|
||||
|
||||
/**
|
||||
* Set Number of Frames expected by receiver from detector
|
||||
* The data receiver status will change from running to idle when it gets this number of frames FIXME: (Not implemented)
|
||||
|
@ -80,28 +80,6 @@ class UDPStandardImplementation: private virtual slsReceiverDefs, public UDPBase
|
||||
*/
|
||||
int setDataStreamEnable(const bool enable);
|
||||
|
||||
/**
|
||||
* Set Acquisition Period
|
||||
* @param i acquisition period
|
||||
* @return OK or FAIL
|
||||
*/
|
||||
int setAcquisitionPeriod(const uint64_t i);
|
||||
|
||||
/**
|
||||
* Set Acquisition Time
|
||||
* @param i acquisition time
|
||||
* @return OK or FAIL
|
||||
*/
|
||||
int setAcquisitionTime(const uint64_t i);
|
||||
|
||||
/**
|
||||
* Set Number of Frames expected by receiver from detector
|
||||
* The data receiver status will change from running to idle when it gets this number of frames
|
||||
* @param i number of frames expected
|
||||
* @return OK or FAIL
|
||||
*/
|
||||
int setNumberOfFrames(const uint64_t i);
|
||||
|
||||
/**
|
||||
* Set Dynamic Range or Number of Bits Per Pixel
|
||||
* @param i dynamic range that is 4, 8, 16 or 32
|
||||
|
Reference in New Issue
Block a user