mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-21 17:18:00 +02:00
moving towards c++ api
This commit is contained in:
@ -58,6 +58,11 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
|
||||
|
||||
|
||||
//***file parameters***
|
||||
/**
|
||||
* Get File Format
|
||||
* @return file format
|
||||
*/
|
||||
fileFormat getFileFormat() const;
|
||||
/**
|
||||
* Get File Name Prefix (without frame index, file index and extension (_d0_f000000000000_8.raw))
|
||||
* @return NULL or file name prefix (max of 1000 characters)
|
||||
@ -248,6 +253,11 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
|
||||
|
||||
|
||||
//***file parameters***
|
||||
/**
|
||||
* Set File Format
|
||||
*/
|
||||
void setFileFormat(slsReceiverDefs::fileFormat f);
|
||||
|
||||
/**
|
||||
* Set File Name Prefix (without frame index, file index and extension (_d0_f000000000000_8.raw))
|
||||
* Does not check for file existence since it is created only at startReceiver
|
||||
@ -556,6 +566,8 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
|
||||
uint32_t udpPortNum[MAX_NUMBER_OF_LISTENING_THREADS];
|
||||
|
||||
//***file parameters***
|
||||
/** File format */
|
||||
fileFormat fileFormatType;
|
||||
/** File Name without frame index, file index and extension (_d0_f000000000000_8.raw)*/
|
||||
char fileName[MAX_STR_LENGTH];
|
||||
/** File Path */
|
||||
|
@ -118,6 +118,12 @@ class UDPInterface {
|
||||
|
||||
|
||||
//***file parameters***
|
||||
/**
|
||||
* Get File Format
|
||||
* @return file format
|
||||
*/
|
||||
virtual slsReceiverDefs::fileFormat getFileFormat() const = 0;
|
||||
|
||||
/**
|
||||
* Get File Name Prefix (without frame index, file index and extension (_d0_f000000000000_8.raw))
|
||||
* @return NULL or pointer to file name prefix, must be released by calling function (max of 1000 characters)
|
||||
@ -306,6 +312,11 @@ class UDPInterface {
|
||||
|
||||
|
||||
//***file parameters***
|
||||
/**
|
||||
* Set File Format
|
||||
*/
|
||||
virtual void setFileFormat(slsReceiverDefs::fileFormat f) = 0;
|
||||
|
||||
/**
|
||||
* Set File Name Prefix (without frame index, file index and extension (_d0_f000000000000_8.raw))
|
||||
* Does not check for file existence since it is created only at startReceiver
|
||||
|
@ -25,6 +25,9 @@
|
||||
#include <stdio.h>
|
||||
#include <semaphore.h>
|
||||
|
||||
#ifdef HDF5C
|
||||
#include "hdf5.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @short does all the functions for a receiver, set/get parameters, start/stop etc.
|
||||
@ -635,8 +638,17 @@ private:
|
||||
|
||||
/** File Descriptor */
|
||||
FILE *sfilefd[MAX_NUMBER_OF_WRITER_THREADS];
|
||||
#ifdef HDF5C
|
||||
H5File *hdf5_fileId[MAX_NUMBER_OF_WRITER_THREADS];
|
||||
DataSpace *hdf5_dataspaceId[MAX_NUMBER_OF_WRITER_THREADS];
|
||||
DataSet *hdf5_datasetId[MAX_NUMBER_OF_WRITER_THREADS];
|
||||
hid_t hdf5_datatype;
|
||||
|
||||
|
||||
/*hid_t hdf5fileId[MAX_NUMBER_OF_WRITER_THREADS];
|
||||
hid_t hdf5DatasetId[MAX_NUMBER_OF_WRITER_THREADS];
|
||||
hid_t hdf5DataspaceId[MAX_NUMBER_OF_WRITER_THREADS];
|
||||
hid_t hdf5DataType;*/
|
||||
#endif
|
||||
//***acquisition indices/count parameters***
|
||||
/** Frame Number of First Frame of an entire Acquisition (including all scans) */
|
||||
uint64_t startAcquisitionIndex;
|
||||
@ -801,6 +813,11 @@ private:
|
||||
/** Set to self-terminate writer threads waiting for semaphores */
|
||||
bool killAllWritingThreads;
|
||||
|
||||
//***data shape ***
|
||||
/** Number of pixels in x axis */
|
||||
int NX;
|
||||
/** Number of pixels in y axis */
|
||||
int NY;
|
||||
|
||||
//***filter parameters***
|
||||
/** Common Mode Subtraction Enable FIXME: Always false, only moench uses, Ask Anna */
|
||||
|
@ -147,7 +147,7 @@ typedef struct {
|
||||
#define JFRAU_PACKET_INDEX_MASK 0x0//Not Applicable, use struct
|
||||
|
||||
#define JFRAU_PIXELS_IN_ONE_ROW (256*4)
|
||||
#define JFRAU_PIXELS_IN_ONE_COL (256*2)
|
||||
#define JFRAU_PIXELS_IN_ONE_COL (256)
|
||||
#define JFRAU_BYTES_IN_ONE_ROW (JFRAU_PIXELS_IN_ONE_ROW*2)
|
||||
|
||||
|
||||
|
@ -218,6 +218,10 @@ private:
|
||||
/** enable flipped data */
|
||||
int set_flipped_data();
|
||||
|
||||
/** set file format */
|
||||
int set_file_format();
|
||||
|
||||
|
||||
|
||||
//General Functions
|
||||
/** Locks Receiver */
|
||||
|
@ -116,6 +116,17 @@ public:
|
||||
STOPPED /**< acquisition stopped externally */
|
||||
};
|
||||
|
||||
/**
|
||||
format
|
||||
*/
|
||||
enum fileFormat {
|
||||
GET_FILE_FORMAT=-1,/**< the receiver will return its file format */
|
||||
BINARY, /**< binary format */
|
||||
ASCII, /**< ascii format */
|
||||
HDF5 /**< hdf5 format */
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
/** returns string from enabled/disabled
|
||||
\param b true or false
|
||||
|
@ -56,8 +56,9 @@ enum {
|
||||
|
||||
F_READ_RECEIVER_TIMER, /** < sets the timer between each data stream in receiver */
|
||||
|
||||
F_SET_FLIPPED_DATA_RECEIVER /** < sets the enable to flip data across x/y axis (bottom/top) */
|
||||
F_SET_FLIPPED_DATA_RECEIVER, /** < sets the enable to flip data across x/y axis (bottom/top) */
|
||||
|
||||
F_SET_RECEIVER_FILE_FORMAT /** < sets the receiver file format */
|
||||
/* Always append functions hereafter!!! */
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user