QDigitalController_v2 Class Reference

Inheritance diagram for QDigitalController_v2:

QBaseDigitalController

List of all members.


Detailed Description

implementation of pulser digital lines communication protocol

Author:
sergio.didomzio@ge.infn.it This class inherits from QBaseDigitalController and implements the pure virtual methods that are defined there. In this implementation 16 bits are used to send pulser id and pulser amplitude in a single shot. Pulser id is encapsulated in a 4-bit value which, within a given pulse_set, has a 1 to 1 correspondence with the pulse_id in the database. This implementation allows arbitrary values for the pulse_id in the database but limits the maximum number of pulser channels to 16. Pulser amplitude is a 12 bits value, whose meaning is explained in the QPulserConfig documentation

Public Member Functions

 QDigitalController_v2 ()
 ctor
virtual ~QDigitalController_v2 ()
 dtor
virtual bool Prepare (const unsigned int &pulseId, const QPulserConfig *cfg)
 convert pulser configuration to digital word
virtual bool Fire ()
 fire word on the digital line
virtual bool SendSynchSignal ()
virtual void ResetPorts ()

Private Member Functions

bool Conf2Bits (unsigned int mem0, unsigned int mem1, unsigned int mem2, unsigned int mem3, unsigned int id, std::vector< unsigned char > &bytes)
 convert a pulser configuration to a sequence of bytes

Private Attributes

QNiDigitalController fNiController
std::vector< unsigned char > fBytes
 bytes to be written to digital board
unsigned int fSignalTimeMs
 digital signal duration in ms
std::map< unsigned int,
unsigned int > 
fPulseIdMap

Member Function Documentation

bool QDigitalController_v2::Conf2Bits ( unsigned int  mem0,
unsigned int  mem1,
unsigned int  mem2,
unsigned int  mem3,
unsigned int  id,
std::vector< unsigned char > &  bytes 
) [private]

convert a pulser configuration to a sequence of bytes

Parameters:
mem0 see QPulserConfig documentation
mem1 see QPulserConfig documentation
mem2 see QPulserConfig documentation
mem3 see QPulserConfig documentation
bytes vector of formatted bytes ready to be sent via digital lines
Returns:
true unless id is greater than 15

References fPulseIdMap.

Referenced by Prepare().


Member Data Documentation

std::map<unsigned int, unsigned int> QDigitalController_v2::fPulseIdMap [private]

One to one mapping between the pulse_id in the database and the value that is sent along the digital line. The key is the pulse_id in the db, the value is what is actually sent on the digital line.

Referenced by Conf2Bits(), and QDigitalController_v2().


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

Generated on Tue Nov 16 10:50:05 2010 for CUORE Software by  doxygen 1.5.6