My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
gcp::receiver::DioClient Class Reference
Inheritance diagram for gcp::receiver::DioClient:
gcp::receiver::DioBoloClient gcp::receiver::DioSquidClient

Public Member Functions

 DioClient (std::string dioHost, unsigned short dioPort, std::string hwHost, unsigned short hwPort, unsigned int nSamplesPerSecond, bool batch=false)
 
virtual ~DioClient ()
 
void initialize ()
 
bool connect ()
 
bool isConnected ()
 
bool dataAreReady ()
 
bool bufferNextSample ()
 
virtual
gcp::util::RegMapDataFrameManager
grabReadFrame ()
 
virtual void releaseReadFrame ()
 
virtual
gcp::util::BoardDataFrameManager
getFrame ()
 
void setSampling (unsigned sampling)
 
virtual void archiveSubSampling (unsigned sampling)
 
void setFilter (gcp::util::Frequency freq, unsigned ntaps)
 
void setFilterFrequency (gcp::util::Frequency freq)
 
void setFilterNtap (unsigned ntaps)
 
void setFilter (unsigned mask, double freqHz, unsigned ntaps)
 
virtual void setUpFilter ()
 
virtual void archiveFilterValues (gcp::util::Frequency &freq, unsigned ntaps)
 
virtual void copyPersistentRegs (gcp::util::ArrayMapDataFrameManager *frame)
 

Public Attributes

std::vector< std::string > channels_
 
std::vector< MuxReadout::DIODatum > data_
 

Static Public Attributes

static const gcp::util::Frequency defaultSincFilterCutoffFreq_
 
static const unsigned defaultNTaps_ = 129
 

Protected Member Functions

void addBatchChannel (std::string channelSpec)
 
void addChannel (std::string channelSpec)
 
bool addColumn (MuxReadout::DIOColumnToken column)
 
virtual void initializeChannels ()
 
bool start (int sampleCount=-1)
 
virtual void bufferData (vector< MuxReadout::DIODatum > &data)
 
virtual void addSampleToBuffer (gcp::util::RegDate &date, std::vector< MuxReadout::DIODatum > &data, bool isValid)
 

Protected Attributes

gcp::util::Frequency sincCutoffFreq_
 
unsigned nTaps_
 
std::string hwHost_
 
unsigned short hwPort_
 
std::string dioHost_
 
unsigned short dioPort_
 
unsigned sampleCount_
 
unsigned nSamplesPerSecond_
 
unsigned nRecord_
 
bool firstSample_
 
bool needFirstValidSample_
 
gcp::util::RegMapDataFrameManagerframeManager_
 
bool batch_
 
bool first_
 

Constructor & Destructor Documentation

DioClient::DioClient ( std::string  dioHost,
unsigned short  dioPort,
std::string  hwHost,
unsigned short  hwPort,
unsigned int  nSamplesPerSecond,
bool  batch = false 
)

....................................................................... Constructor.

DioClient::~DioClient ( )
virtual

....................................................................... Destructor.

Member Function Documentation

void DioClient::addChannel ( std::string  channelSpec)
protected

....................................................................... Add a channel to the list of channels we want to monitor

bool DioClient::addColumn ( MuxReadout::DIOColumnToken  column)
protected

................................................................................. Overload of the base-class so that we can increment the size of our data vector whenever we add a new column

void DioClient::bufferData ( vector< MuxReadout::DIODatum > &  data)
protectedvirtual

....................................................................... Read the next sample from the server and buffer it

bool DioClient::bufferNextSample ( )

....................................................................... Read the next sample from the server and buffer it

bool DioClient::connect ( )

....................................................................... Connect

bool DioClient::dataAreReady ( )

....................................................................... Check if buffered data are ready to be read out

RegMapDataFrameManager * DioClient::grabReadFrame ( )
virtual

....................................................................... Return the readable frame

Reimplemented in gcp::receiver::DioBoloClient.

bool DioClient::isConnected ( )

....................................................................... Return true if we are connected

void DioClient::releaseReadFrame ( )
virtual

....................................................................... Release the readable frame

Reimplemented in gcp::receiver::DioBoloClient.

void DioClient::setFilter ( gcp::util::Frequency  freq,
unsigned  ntaps 
)

....................................................................... Most general way of setting up the filter

void DioClient::setFilter ( unsigned  mask,
double  freqHz,
unsigned  ntaps 
)

....................................................................... Set one or both of the filter frequency/ntap

bool DioClient::start ( int  sampleCount = -1)
protected

....................................................................... Overload the base-class method to start. This is so that we can add a single batch-filtered data column just before we tell the server to start. This will cause the configuration to be updated and sent to the server.

Member Data Documentation

const Frequency DioClient::defaultSincFilterCutoffFreq_
static
Initial value:
=
Frequency(Frequency::Hertz(), 37.0)

The documentation for this class was generated from the following files: