Public Member Functions | Protected Attributes

nxyter::NxChip Class Reference

Represents the full interface of an nXYTER. More...

#include <NxChip.h>

Inheritance diagram for nxyter::NxChip:
Inheritance graph
[legend]
Collaboration diagram for nxyter::NxChip:
Collaboration graph
[legend]

Public Member Functions

 NxChip (base::Board *board, int port, int addr, int nxnum)
 Constructor with full addressing path information.
virtual ~NxChip ()
void setNxNumber (int nxnum)
 Set the nXYTER number.
int getNxNumber ()
 Returns the nXYTER number.
int activate ()
 Activate data taking of nXYTER.
int deactivate ()
 Deactivate data taking of nXYTER.
bool isactive ()
 Return actual active state of nXYTER.
int setChannelDelay (uint32_t val)
 Set the delay compensation between nXYTER and ROC.
int getChannelDelay (uint32_t &val)
 Returns the delay compensation between nXYTER and ROC.
nxyter::NxI2ci2c ()
 Gives access to the NxI2c object.
base::Boardboard ()
 Return reference to roc::Board which hosts the Peripheral.
base::BoardgetBoard () const
 Returns pointer to the roc::Board which hosts the Peripheral.

Protected Attributes

nxyter::NxI2c fI2c
 I2C interface of Nx.
int fNxNumber
 the Nx number
base::BoardfBoard
 board pointer

Detailed Description

Represents the full interface of an nXYTER.

This class provides the access to the ROC and I2C interface parts of an nXYTER. It holds the full address information but no further context.

The I2C interface is accessible via a separate nxyter::NxI2c object which can be accessed via the i2c() method. The ROC part of the interface control the parameters specific to one nXYTER chip.

Definition at line 16 of file NxChip.h.


Constructor & Destructor Documentation

nxyter::NxChip::NxChip ( base::Board board,
int  port,
int  addr,
int  nxnum 
)

Constructor with full addressing path information.

Sets up NxChip object with full addressing information

Parameters:
board ROC board pointer
port the ROC port (equivalent to the I2C bus interface port)
addr the I2C device slave address
nxnum see nXYTER number

Definition at line 35 of file NxChip.cxx.

nxyter::NxChip::~NxChip (  )  [virtual]

Definition at line 45 of file NxChip.cxx.


Member Function Documentation

int nxyter::NxChip::activate (  ) 

Activate data taking of nXYTER.

This method enables the acceptance of data valid bits comming from the nXYTER.

Returns:
see roc::Board get/put/oper return codes.
See also:
deactivate()

Definition at line 76 of file NxChip.cxx.

References fNxNumber, base::Peripheral::getBoard(), nxyter::RocNx::getNxActive(), base::Board::operErrBuildInc(), and nxyter::RocNx::setNxActive().

Referenced by nxyter::FebBase::initRoc().

base::Board & base::Peripheral::board (  )  [inherited]
int nxyter::NxChip::deactivate (  ) 

Deactivate data taking of nXYTER.

This method enables the acceptance of data valid bits comming from the nXYTER, no further hit messages will be generated.

Returns:
see roc::Board get/put/oper return codes.
See also:
activate()

Definition at line 99 of file NxChip.cxx.

References fNxNumber, base::Peripheral::getBoard(), nxyter::RocNx::getNxActive(), base::Board::operErrBuildInc(), and nxyter::RocNx::setNxActive().

Referenced by nxyter::FebBase::initRoc().

base::Board* base::Peripheral::getBoard (  )  const [inline, inherited]

Returns pointer to the roc::Board which hosts the Peripheral.

Note: normally using board() is more convenient.

Definition at line 38 of file Peripheral.h.

References base::Peripheral::fBoard.

Referenced by nxyter::FebUtil::acquireTestTriggerData(), activate(), nxyter::FebBase::addNxChip(), deactivate(), isactive(), and nxyter::QuickDaq::QuickDaq().

int nxyter::NxChip::getChannelDelay ( uint32_t &  val  ) 

Returns the delay compensation between nXYTER and ROC.

Definition at line 138 of file NxChip.cxx.

References base::Peripheral::board(), fNxNumber, base::Board::get(), ROC_NX_DELAY_NX0, ROC_NX_DELAY_NX1, ROC_NX_DELAY_NX2, and ROC_NX_DELAY_NX3.

int nxyter::NxChip::getNxNumber (  )  [inline]
nxyter::NxI2c& nxyter::NxChip::i2c (  )  [inline]
bool nxyter::NxChip::isactive (  ) 

Return actual active state of nXYTER.

Definition at line 113 of file NxChip.cxx.

References fNxNumber, base::Peripheral::getBoard(), and nxyter::RocNx::getNxActive().

Referenced by nxyter::FebBase::getFebState().

int nxyter::NxChip::setChannelDelay ( uint32_t  val  ) 

Set the delay compensation between nXYTER and ROC.

Definition at line 125 of file NxChip.cxx.

References base::Peripheral::board(), fNxNumber, base::Board::put(), ROC_NX_DELAY_NX0, ROC_NX_DELAY_NX1, ROC_NX_DELAY_NX2, and ROC_NX_DELAY_NX3.

void nxyter::NxChip::setNxNumber ( int  nxnum  ) 

Set the nXYTER number.

Sets the nXYTER number, used to address nXYYER specific ROC resources.

Parameters:
nxnum see nXYTER number
See also:
getNxNumber()

Definition at line 58 of file NxChip.cxx.

References base::Peripheral::board(), base::Board::Debug(), and fNxNumber.


Field Documentation

base::Board* base::Peripheral::fBoard [protected, inherited]

board pointer

Definition at line 26 of file Peripheral.h.

Referenced by base::Peripheral::board(), base::Peripheral::getBoard(), and base::Peripheral::Peripheral().

I2C interface of Nx.

Definition at line 18 of file NxChip.h.

Referenced by i2c().

int nxyter::NxChip::fNxNumber [protected]

the Nx number

Definition at line 19 of file NxChip.h.

Referenced by activate(), deactivate(), getChannelDelay(), getNxNumber(), isactive(), setChannelDelay(), and setNxNumber().


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