trying to get in changes for activate in receiver

This commit is contained in:
Dhanya Maliakal
2016-10-05 08:24:35 +02:00
parent f6b7fd7aa3
commit 489b623afd
8 changed files with 212 additions and 28 deletions

View File

@ -200,6 +200,13 @@ 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;
@ -432,6 +439,12 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
*/
void closeFile(int ithread = 0);
/**
* 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***
/**
@ -500,6 +513,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 */

View File

@ -258,6 +258,13 @@ 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;
@ -489,6 +496,13 @@ class UDPInterface {
virtual void closeFile(int ithread = 0) = 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***
/**
* Call back for start acquisition

View File

@ -663,6 +663,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;
@ -756,6 +757,10 @@ private:
//***deactivated parameters***
uint64_t deactivatedFrameNumber[MAX_NUMBER_OF_LISTENING_THREADS];
int deactivatedFrameIncrement;
//***filter parameters***

View File

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

View File

@ -51,6 +51,7 @@ enum {
F_ENABLE_RECEIVER_TEN_GIGA, /**< enable 10Gbe in receiver */
F_SET_RECEIVER_FIFO_DEPTH, /**< set receiver fifo depth */
F_ACTIVATE, /** < activate/deactivate readout */
F_STREAM_DATA_FROM_RECEIVER /**< stream data from receiver to client */
/* Always append functions hereafter!!! */