works for deactivated server and receiver

This commit is contained in:
Dhanya Maliakal
2016-10-04 07:36:00 +02:00
parent 572047b72d
commit 2a4bd8022e
8 changed files with 195 additions and 20 deletions

View File

@ -193,6 +193,14 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
*/
runStatus getStatus() const;
/**
* Get activate
* If deactivated, receiver will write dummy packets 0xFF
* (as it will receive nothing from detector)
* @return 0 for deactivated, 1 for activated
*/
int getActivate() const;
@ -417,6 +425,13 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
*/
void closeFile(int i = -1);
/**
* Activate / Deactivate Receiver
* If deactivated, receiver will write dummy packets 0xFF
* (as it will receive nothing from detector)
*/
int setActivate(int enable = -1);
//***callback functions***
/**
@ -485,6 +500,8 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
const static int MAX_NUMBER_OF_LISTENING_THREADS = 2;
/** Receiver Status */
runStatus status;
/** Activated/Deactivated */
int activated;
//***connection parameters***
/** Ethernet Interface */
@ -528,6 +545,7 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
//***callback parameters***
/**
* function being called back for start acquisition

View File

@ -252,6 +252,14 @@ class UDPInterface {
*/
virtual slsReceiverDefs::runStatus getStatus() const = 0;
/**
* Get activate
* If deactivated, receiver will write dummy packets 0xFF
* (as it will receive nothing from detector)
* @return 0 for deactivated, 1 for activated
*/
virtual int getActivate() const = 0;
@ -474,6 +482,13 @@ class UDPInterface {
*/
virtual void closeFile(int i = -1) = 0;
/**
* Activate / Deactivate Receiver
* If deactivated, receiver will write dummy packets 0xFF
* (as it will receive nothing from detector)
*/
virtual int setActivate(int enable = -1) = 0;
//***callback functions***
/**

View File

@ -597,6 +597,7 @@ private:
/** Missing Packet identifier value */
const static uint16_t missingPacketValue = 0xFFFF;
const static uint16_t deactivatedPacketValue = 0xFEFE;
/** Dummy Packet identifier value */
const static uint32_t dummyPacketValue = 0xFFFFFFFF;
@ -675,6 +676,9 @@ private:
bool killAllWritingThreads;
//***deactivated parameters***
uint64_t deactivated_framenumber[MAX_NUMBER_OF_LISTENING_THREADS];
uint32_t deactivated_packetnumber[MAX_NUMBER_OF_LISTENING_THREADS];

View File

@ -207,6 +207,10 @@ private:
/** set fifo depth */
int set_fifo_depth();
/** activate/ deactivate */
int set_activate();
//General Functions
/** Locks Receiver */
int lock_receiver();

View File

@ -49,7 +49,9 @@ enum {
F_ENABLE_RECEIVER_OVERWRITE, /**< set overwrite flag in receiver */
F_ENABLE_RECEIVER_TEN_GIGA, /**< enable 10Gbe in receiver */
F_SET_RECEIVER_FIFO_DEPTH /**< set receiver fifo depth */
F_SET_RECEIVER_FIFO_DEPTH, /**< set receiver fifo depth */
F_ACTIVATE /** < activate/deactivate readout */
/* Always append functions hereafter!!! */
};