added silent mode in receiver during real time acquisition, doesnt print packet loss regularly or file name created each time

This commit is contained in:
Dhanya Maliakal
2017-09-27 10:11:31 +02:00
parent 11d58beec2
commit 6a8aad4c2b
20 changed files with 214 additions and 26 deletions

View File

@ -34,11 +34,13 @@ class BinaryFile : private virtual slsReceiverDefs, public File, public BinaryFi
* @param nf pointer to number of images in acquisition
* @param dr pointer to dynamic range
* @param portno pointer to udp port number for logging
* @param smode pointer to silent mode
*/
BinaryFile(int ind, uint32_t maxf, const uint32_t* ppf,
int* nd, char* fname, char* fpath, uint64_t* findex,
bool* frindexenable, bool* owenable,
int* dindex, int* nunits, uint64_t* nf, uint32_t* dr, uint32_t* portno);
int* dindex, int* nunits, uint64_t* nf, uint32_t* dr, uint32_t* portno,
bool* smode);
/**
* Destructor

View File

@ -64,6 +64,12 @@ class DataProcessor : private virtual slsReceiverDefs, public ThreadObject {
*/
static void ResetRunningMask();
/**
* Set Silent Mode
* @param mode 1 sets 0 unsets
*/
static void SetSilentMode(bool mode);
//*** non static functions ***
//*** getters ***
/**
@ -285,6 +291,9 @@ class DataProcessor : private virtual slsReceiverDefs, public ThreadObject {
/** Fifo structure */
Fifo* fifo;
/** Silent Mode */
static bool SilentMode;
//individual members
/** File writer implemented as binary or hdf5 File */

View File

@ -51,6 +51,12 @@ class DataStreamer : private virtual slsReceiverDefs, public ThreadObject {
*/
static void ResetRunningMask();
/**
* Set Silent Mode
* @param mode 1 sets 0 unsets
*/
static void SetSilentMode(bool mode);
//*** non static functions ***
//*** getters ***
@ -178,6 +184,11 @@ class DataStreamer : private virtual slsReceiverDefs, public ThreadObject {
/** Fifo structure */
Fifo* fifo;
/** Silent Mode */
static bool SilentMode;
/** ZMQ Socket - Receiver to Client */
ZmqSocket* zmqSocket;

View File

@ -34,11 +34,13 @@ class File : private virtual slsReceiverDefs {
* @param nf pointer to number of images in acquisition
* @param dr pointer to dynamic range
* @param portno pointer to udp port number for logging
* @param smode pointer to silent mode
*/
File(int ind, uint32_t maxf, const uint32_t* ppf,
int* nd, char* fname, char* fpath, uint64_t* findex,
bool* frindexenable, bool* owenable,
int* dindex, int* nunits, uint64_t* nf, uint32_t* dr, uint32_t* portno);
int* dindex, int* nunits, uint64_t* nf, uint32_t* dr, uint32_t* portno,
bool* smode);
/**
* Destructor
@ -220,5 +222,8 @@ class File : private virtual slsReceiverDefs {
/** UDP Port Number for logging */
uint32_t* udpPortNumber;
/** Silent Mode */
bool silentMode;
};

View File

@ -42,12 +42,14 @@ class HDF5File : private virtual slsReceiverDefs, public File, public HDF5FileSt
* @param portno pointer to udp port number for logging
* @param nx number of pixels in x direction
* @param ny number of pixels in y direction
* @param smode pointer to silent mode
*/
HDF5File(int ind, uint32_t maxf, const uint32_t* ppf,
int* nd, char* fname, char* fpath, uint64_t* findex,
bool* frindexenable, bool* owenable,
int* dindex, int* nunits, uint64_t* nf, uint32_t* dr, uint32_t* portno,
uint32_t nx, uint32_t ny);
uint32_t nx, uint32_t ny,
bool* smode);
/**
* Destructor

View File

@ -57,6 +57,12 @@ class Listener : private virtual slsReceiverDefs, public ThreadObject {
*/
static void ResetRunningMask();
/**
* Set Silent Mode
* @param mode 1 sets 0 unsets
*/
static void SetSilentMode(bool mode);
//*** non static functions ***
//*** getters ***
@ -217,6 +223,9 @@ class Listener : private virtual slsReceiverDefs, public ThreadObject {
/** Fifo structure */
Fifo* fifo;
/** Silent Mode */
static bool SilentMode;
// individual members
/** Detector Type */
@ -258,7 +267,7 @@ class Listener : private virtual slsReceiverDefs, public ThreadObject {
uint64_t firstMeasurementIndex;
// for statistics
// for acquisition summary
/** Number of complete Packets caught for each real time acquisition (eg. for each scan (start& stop of receiver)) */
volatile uint64_t numPacketsCaught;
@ -287,8 +296,12 @@ class Listener : private virtual slsReceiverDefs, public ThreadObject {
/** if the udp socket is connected */
bool udpSocketAlive;
// for print progress during acqusition
/** number of packets for statistic */
uint32_t numPacketsStatistic;
/** number of images for statistic */
uint32_t numFramesStatistic;
};

View File

@ -239,6 +239,12 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
*/
runStatus getStatus() const;
/**
* Get Silent Mode
* @return silent mode
*/
uint32_t getSilentMode() const;
/**
* Get activate
* If deactivated, receiver will write dummy packets 0xFF
@ -438,6 +444,12 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
*/
int setFifoDepth(const uint32_t i);
//***receiver parameters***
/**
* Set Silent Mode
* @param i silent mode. 1 sets, 0 unsets
*/
void setSilentMode(const uint32_t i);
/*************************************************************************
* Behavioral functions***************************************************
@ -653,6 +665,9 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
/** streaming port */
uint32_t streamingPort;
//***receiver parameters***
uint32_t silentMode;
//***callback parameters***
/**

View File

@ -323,6 +323,12 @@ class UDPInterface {
*/
virtual slsReceiverDefs::runStatus getStatus() const = 0;
/**
* Get Silent Mode
* @return silent mode
*/
virtual uint32_t getSilentMode() const = 0;
/**
* Get activate
* If deactivated, receiver will write dummy packets 0xFF
@ -520,6 +526,14 @@ class UDPInterface {
virtual int setFifoDepth(const uint32_t i) = 0;
//***receiver parameters***
/**
* Set Silent Mode
* @param i silent mode. 1 sets, 0 unsets
*/
virtual void setSilentMode(const uint32_t i) = 0;
/*************************************************************************
* Behavioral functions***************************************************
* They may modify the status of the receiver ****************************

View File

@ -101,6 +101,12 @@ class UDPStandardImplementation: private virtual slsReceiverDefs, public UDPBase
*/
int setFifoDepth(const uint32_t i);
/**
* Set Silent Mode
* @param i silent mode. 1 sets, 0 unsets
*/
void setSilentMode(const uint32_t i);
/**
* Set receiver type (and corresponding detector variables in derived STANDARD class)
* It is the first function called by the client when connecting to receiver

View File

@ -264,6 +264,9 @@ class slsReceiverTCPIPInterface : private virtual slsReceiverDefs {
/** set streaming port */
int set_streaming_port();
/** set silent mode */
int set_silent_mode();
/** detector type */

View File

@ -61,6 +61,8 @@ enum recFuncs{
F_SEND_RECEIVER_DETPOSID, /** < sets the detector position id in the reveiver */
F_SEND_RECEIVER_MULTIDETSIZE, /** < sets the multi detector size to the receiver */
F_SET_RECEIVER_STREAMING_PORT, /** < sets the receiver streaming port */
F_SET_RECEIVER_SILENT_MODE, /** < sets the receiver silent mode */
/* Always append functions hereafter!!! */