#include <OpticBoard.h>
Public Types | |
enum | operErr { kOperSuccess = 0, kOperAddrErr = 2, kOperValueErr = 3, kOperStateErr = 4, kOperNetworkErr = 6, kHostError = 8, kOperVerifyErr = 20, kOperBusErr = 21 } |
Return codes for get, put and oper calls. More... | |
enum | addrErr { kAddrError = 0xffffffff } |
Public Member Functions | |
virtual int | getTransportKind () const |
getTransportKind | |
uint32_t | getRocFpgaType () |
Returns the FPGA type the firmeware was syntesized for. | |
uint32_t | getRocSvnRev () |
Returns subversion revision number of the ROC firmware source code. | |
uint32_t | getRocBuildTime () |
Returns the time the firmware was synthesized. | |
uint32_t | getRocHardwareVersion () |
Returns hardware version of ROC (FPGA firmware version). | |
uint32_t | getRocHardwareType () |
Returns hardware type (frontend/backend) of ROC (FPGA firmware kind). | |
uint32_t | getRocFrontendKind () |
Return frontend kinds - kind_nXYTER (1), kind_oldFEET (2) or kind_FEET (3). | |
uint32_t | getRocBackendKind () |
Return backend kinds - kind_Optic (1), kind_FX20 (2), kind_FX40 (3) or kind_FX60 (4). | |
virtual uint32_t | getRocBackendVersion () |
Returns backend (Optic or UDP) version. | |
uint32_t | rocNumber () const |
Returns locally stored ROC number. | |
uint32_t | getRocNumber () |
Returns number from ROC directly, store fRocNumber variable. | |
void | setRocNumber (uint32_t num) |
int | uploadCommandsList (unsigned num, const base::OperList &lst, double tmout=0.) |
Add an commands list entry . | |
int | downloadCommandsList (unsigned num, base::OperList &lst, double tmout=0.) |
Download commands list from the ROC. | |
int | invokeCommandsList (unsigned num, double tmout=0.) |
Invoke command list. | |
int | uploadStartDaqCmdList (bool reset_frontend=false, bool reset_fifo=true) |
Produce and upload start daq commands list. | |
int | uploadStopDaqCmdList () |
Produce and upload stop daq commands list. | |
virtual int | invokeDLM (unsigned num, double tmout=0.) |
invokeDLM - method generate DLM, which sends to every endnode | |
void | clearRocFifo () |
Clears the FIFO in ROC (discard all old data). | |
void | restartRoc () |
Full ROC restart (FPGA and PPC, if used). | |
virtual bool | restartBoard () |
resetBoard - method should restart board. Return true if implemented. One should immediately close connection to board | |
int | getRocThrottleState (uint32_t &val) |
Returns the status of the throttle system. | |
virtual unsigned | GetBoardId () const |
virtual int | setToDefault () |
Activate DAQ. | |
virtual bool | enableCalibration (double period=10., double calibr=0.1, int cnt=-1) |
enableCalibration | |
virtual bool | disableCalibration () |
void | setDefaultTimeout (double tmout=2.) |
Set default get/put/oper timeout. | |
double | getDefaultTimeout () const |
void | setVerbosity (int lvl=0) |
int | getVerbosity () const |
Returns debug output verbosity level. | |
ClientRole | getRole () const |
Returns client role. | |
void | Debug (int lvl, const char *fmt,...) |
Print a formatted debug message. | |
void | setOperTrace (int lvl=1) |
Set get/put/operGen trace level. | |
int | getOperTrace () const |
Returns debug output verbosity level. | |
virtual int | operGen (OperList &lst, double tmout=0.)=0 |
General operate, arbitrary list of get/put accesses to ROC control space. | |
virtual int | operGen (bool *isput, uint32_t *addr, uint32_t *value, int num, double tmout=0.) |
int | put (uint32_t addr, uint32_t value, double tmout=0.) |
int | get (uint32_t addr, uint32_t &value, double tmout=0.) |
int | operPP (uint32_t addr0, uint32_t val0p, uint32_t addr1, uint32_t val1p, double tmout=0.) |
Put-Put accesses sequence to ROC control space. | |
int | operPG (uint32_t addr0, uint32_t val0p, uint32_t addr1, uint32_t &val1g, double tmout=0.) |
Put-Get accesses sequence to ROC control space. | |
int | operPPP (uint32_t addr0, uint32_t val0p, uint32_t addr1, uint32_t val1p, uint32_t addr2, uint32_t val2p, double tmout=0.) |
Put-Put-Put accesses sequence to ROC control space. | |
int | operGGG (uint32_t addr0, uint32_t &val0p, uint32_t addr1, uint32_t &val1p, uint32_t addr2, uint32_t &val2p, double tmout=0.) |
Get-Get-Get accesses sequence to ROC control space. | |
int | operPPPP (uint32_t addr0, uint32_t val0p, uint32_t addr1, uint32_t val1p, uint32_t addr2, uint32_t val2p, uint32_t addr3, uint32_t val3p, double tmout=0.) |
Put-Put-Put-Put accesses sequence to ROC control space. | |
uint32_t | findRegAddressByName (const char *name) |
Retrieve a ROC control space address by its symbolic name. | |
const char * | findRegNameByAddress (uint32_t addr) |
Retrieve symbolic name of a ROC control space address. | |
void | printRegAddressMap (std::ostream &os, bool byname=false) |
void | addRegAddrMapping (const char *name, uint32_t addr) |
Add an entry to the ROC control space address mapping table. | |
void | fillRegAddrNames (std::list< std::string > &lst) |
bool | isFile () const |
isFile | |
bool | isOptic () const |
isOptic - returns true when optic use for connection | |
bool | isUSB () const |
isUSB - returns true when optic use for connection | |
virtual bool | is_SPI_I2C () const |
is_SPI_I2C - return true if SPI interface should be used to access I2C bus | |
virtual uint32_t | getHardwareType () |
Returns hardware type (frontend/backend) of ROC (FPGA firmware kind). | |
virtual uint32_t | getHardwareVersion () |
Returns hardware version of ROC (FPGA firmware version). | |
virtual uint32_t | getFrontendKind () |
Return frontend kinds - kind_nXYTER (1), kind_oldFEET (2) or kind_FEET (3). | |
virtual uint32_t | getBackendKind () |
Return backend kinds - kind_Optic (1), kind_FX20 (2), kind_FX40 (3) or kind_FX60 (4). | |
uint32_t | boardNumber () const |
Returns locally stored board number. | |
uint32_t | getBoardNumber () |
Request number from board. | |
void | setBoardNumber (uint32_t num) |
Change board number in device. | |
virtual bool | startDaq ()=0 |
Activate DAQ. | |
virtual bool | suspendDaq ()=0 |
suspendDaq | |
virtual bool | stopDaq ()=0 |
stopDaq | |
virtual bool | getNextBuffer (void *&buf, unsigned &len, double tmout=1.)=0 |
getNextBuffer | |
virtual int | getMsgFormat () const =0 |
getMsgFormat | |
virtual void | setFlushTimeout (double tmout) |
Sets flush timeout of data transport. | |
Static Public Member Functions | |
static uint32_t | getRoclibVersion () |
Returns software version of client software. | |
static bool | IsUdpAddress (const char *name) |
Check if specified address is address of the board, connected via UDP. | |
static bool | IsOpticAddress (const char *name) |
Check if specified address is address of board, connected via optic. | |
static bool | IsLmdFileAddress (const char *name) |
Check if specified address is lmd filename. | |
static Board * | Connect (const char *name, ClientRole role=roleDAQ) |
static Board * | Connect (const char *url, ClientRole role=roleNone) |
static bool | Close (Board *brd) |
static bool | Close (Board *brd) |
static int | operErrCode (int rc) |
Retrieve error code from get/put/oper return code. | |
static int | operErrIndex (int rc) |
Retrieve index from get/put/oper return code. | |
static int | operErrBuild (int code, int index) |
Build get/put/oper return code from error code and index value. | |
static int | operErrBuildInc (int rc, int inc) |
Add to index value of get/put/oper return code. | |
static std::string | operErrToString (int rc) |
Returns a string with a human readable form of a get/put/oper return code. | |
static const char * | operErrCodeName (int rc) |
Returns descriptive text for a get/put/oper error code. | |
static const char * | versionToString (uint32_t ver) |
Returns a string representation of a version number. | |
Protected Types | |
typedef std::map< std::string, uint32_t > | mapn2a_t |
typedef std::map< uint32_t, std::string > | mapa2n_t |
Protected Member Functions | |
OpticBoard () | |
virtual | ~OpticBoard () |
void | traceOper (OperList &lst, int rc) |
Generate output for get/put/operGen traces. | |
void | setRole (ClientRole role) |
uint32_t | initBoard (const char *name, uint32_t minversion) |
Checks and print board kind, version and id. | |
Protected Attributes | |
mapn2a_t | fMapName2Addr |
mapa2n_t | fMapAddr2Name |
BoardFactory * | fBrdFactory |
factory used to create board instance | |
double | fDefaultTimeout |
default timeout | |
int | fVerbosity |
Debug verbosity level. | |
int | fOperTrace |
Oper trace level. | |
ClientRole | fRole |
client role (access rights) | |
uint32_t | fBrdNumber |
number of connected ROC |
Definition at line 10 of file OpticBoard.h.
typedef std::map<uint32_t,std::string> base::Board::mapa2n_t [protected, inherited] |
typedef std::map<std::string,uint32_t> base::Board::mapn2a_t [protected, inherited] |
enum base::Board::addrErr [inherited] |
enum base::Board::operErr [inherited] |
Return codes for get, put and oper calls.
For a detailed documentation of get/put/oper return code see roc::Board get/put/oper return codes.
roc::OpticBoard::OpticBoard | ( | ) | [protected] |
Definition at line 3 of file OpticBoard.cxx.
roc::OpticBoard::~OpticBoard | ( | ) | [protected, virtual] |
Definition at line 8 of file OpticBoard.cxx.
void base::Board::addRegAddrMapping | ( | const char * | name, | |
uint32_t | addr | |||
) | [inherited] |
Add an entry to the ROC control space address mapping table.
This method is protected and used in the contructors to initialize the table.
Definition at line 399 of file Board.cxx.
References base::Board::fMapAddr2Name, and base::Board::fMapName2Addr.
Referenced by roc::I2cDevice::addAddrMap(), nxyter::RocNx::addAddrMap(), nxyter::MainAdc::addAddrMap(), feet::RocFeet::addAddrMap(), base::Gpio::addAddrMap(), sp605::Board::Board(), roc::Board::Board(), and roc::UdpBoard::UdpBoard().
uint32_t base::Board::boardNumber | ( | ) | const [inline, inherited] |
Returns locally stored board number.
Definition at line 329 of file Board.h.
References base::Board::fBrdNumber.
Referenced by roc::AbbBoard::initAbbBoard(), roc::UdpDevice::initUdp(), roc::Iterator::Iterator(), roc::Iterator::nextBuffer(), and roc::Board::rocNumber().
void roc::Board::clearRocFifo | ( | ) | [inherited] |
Clears the FIFO in ROC (discard all old data).
Definition at line 391 of file Board.cxx.
References base::Board::operPP(), and ROC_NX_FIFO_RESET.
Referenced by cmd_printdatadbg().
bool base::Board::Close | ( | Board * | brd | ) | [static, inherited] |
Definition at line 493 of file Board.cxx.
References base::BoardFactory::DestroyBoard().
Referenced by main(), and roc::Iterator::~Iterator().
bool roc::Board::Close | ( | Board * | brd | ) | [static, inherited] |
Definition at line 346 of file Board.cxx.
Referenced by roc::Board::Connect(), and main().
base::Board * base::Board::Connect | ( | const char * | url, | |
ClientRole | role = roleNone | |||
) | [static, inherited] |
Definition at line 488 of file Board.cxx.
References base::BoardFactory::CreateBoard().
Referenced by cmd_board(), and main().
roc::Board * roc::Board::Connect | ( | const char * | name, | |
roc::ClientRole | role = roleDAQ | |||
) | [static, inherited] |
Definition at line 325 of file Board.cxx.
References roc::Board::Close().
Referenced by roc::Iterator::Iterator(), main(), and TRocSource::Open().
void base::Board::Debug | ( | int | lvl, | |
const char * | fmt, | |||
... | ||||
) | [inherited] |
Print a formatted debug message.
Show debug information, using functionality of factory
If the debug level lvl is less or equal to the verbosity level setup with setVerbosity() a message will be printed with ShowDebug(). The message text is defined by the printf
style format fmt and variable length argument list.
lvl | debug level | |
fmt | format a la printf |
Debug(-1, "Error reading Register %d on bus %d", reg, num);
Definition at line 64 of file Board.cxx.
References base::Board::fBrdFactory, base::Board::getVerbosity(), and base::BoardFactory::ShowDebug().
Referenced by roc::UdpBoard::calcBinXOR(), roc::Board::downloadCommandsList(), base::Board::initBoard(), roc::UdpBoard::loadConfig(), roc::UdpBoard::parseBitfileHeader(), roc::UdpBoard::saveConfig(), nxyter::MainAdc::setClockDelay(), nxyter::NxChip::setNxNumber(), roc::UdpBoard::setRocLowHighWater(), nxyter::QuickDaq::startRun(), base::Board::traceOper(), roc::UdpBoard::uploadBitfile(), roc::Board::uploadCommandsList(), roc::UdpBoard::uploadDataToRoc(), and roc::UdpBoard::uploadSDfile().
virtual bool roc::Board::disableCalibration | ( | ) | [inline, virtual, inherited] |
Definition at line 199 of file Board.h.
References roc::Board::enableCalibration().
Referenced by roc::UdpDevice::CloseAsBoard().
int roc::Board::downloadCommandsList | ( | unsigned | num, | |
base::OperList & | lst, | |||
double | tmout = 0. | |||
) | [inherited] |
Download commands list from the ROC.
Method reads specified commands list from the board.
Definition at line 190 of file Board.cxx.
References base::OperList::addGet(), base::OperList::addPut(), base::OperList::clear(), base::Board::Debug(), base::OperList::number(), base::OperList::oper(), base::Board::operGen(), ROC_CMD_LST_ACTIVE, ROC_CMD_LST_MEM, ROC_CMD_LST_NUMBER, ROC_CMD_LST_PUT, and ROC_CMD_LST_SIZE.
Referenced by RocMainWidget::getCmdList().
virtual bool roc::Board::enableCalibration | ( | double | period = 10. , |
|
double | calibr = 0.1 , |
|||
int | cnt = -1 | |||
) | [inline, virtual, inherited] |
enableCalibration
Preliminary functionality for nXYTER calibration Reconfigures nXYTER in test-trigger mode and fires several test pulses
period | can has following values: 0 - make calibration once >0 - perform calibration periodically <0 - disable calibration |
Reimplemented in roc::UdpDevice.
Definition at line 197 of file Board.h.
Referenced by roc::Board::disableCalibration().
void base::Board::fillRegAddrNames | ( | std::list< std::string > & | lst | ) | [inherited] |
Definition at line 465 of file Board.cxx.
References base::Board::fMapName2Addr.
Referenced by BoardWidget::BoardWidget().
uint32_t base::Board::findRegAddressByName | ( | const char * | name | ) | [inherited] |
Retrieve a ROC control space address by its symbolic name.
Methods about map of registers addresses and their symbolic names
Locates in the ROC control space address mapping table the entry for the name name and returns the associated address in addr.
name | name to be looked up | |
addr | address to be returned |
Definition at line 417 of file Board.cxx.
References base::Board::fMapName2Addr, and base::Board::kAddrError.
Referenced by cmd_getroc(), cmd_putroc(), BoardWidget::getRegister(), and BoardWidget::putRegister().
const char * base::Board::findRegNameByAddress | ( | uint32_t | addr | ) | [inherited] |
Retrieve symbolic name of a ROC control space address.
Locates in the Board control space address mapping table the entry for the address addr and returns the associated symbolic name in name.
addr | address to be looked up |
Definition at line 436 of file Board.cxx.
References base::Board::fMapAddr2Name, and base::Board::kAddrError.
Referenced by cmd_printroc(), RocMainWidget::getCmdList(), and base::Board::traceOper().
int base::Board::get | ( | uint32_t | addr, | |
uint32_t & | value, | |||
double | tmout = 0. | |||
) | [inherited] |
Definition at line 161 of file Board.cxx.
References base::Board::operGen().
Referenced by cmd_board(), cmd_getroc(), cmd_printid(), cmd_printroc(), nxyter::MainAdc::getAdcDirect(), nxyter::NxChip::getChannelDelay(), nxyter::MainAdc::getChannelLatency(), nxyter::MainAdc::getClockDelayBufg(), nxyter::MainAdc::getClockDelaySrInit(), base::Gpio::getConfig(), nxyter::RocNx::getFifoEmpty(), nxyter::RocNx::getFifoFull(), nxyter::RocNx::getNxActive(), BoardWidget::getRegister(), RocMainWidget::getSubConfig(), and base::Gpio::getSyncScale().
virtual uint32_t base::Board::getBackendKind | ( | ) | [inline, virtual, inherited] |
Return backend kinds - kind_Optic (1), kind_FX20 (2), kind_FX40 (3) or kind_FX60 (4).
Definition at line 325 of file Board.h.
References base::Board::getHardwareType().
virtual unsigned roc::Board::GetBoardId | ( | ) | const [inline, virtual, inherited] |
Method returns board id
Reimplemented from base::Board.
Definition at line 119 of file Board.h.
References roc::Board::rocNumber().
uint32_t base::Board::getBoardNumber | ( | ) | [inherited] |
Request number from board.
Returns board number as stored in ROC.
Definition at line 568 of file Board.cxx.
References base::addr_BoardId, and base::Board::fBrdNumber.
Referenced by roc::Board::getRocNumber().
double base::Board::getDefaultTimeout | ( | ) | const [inline, inherited] |
Returns default get/put/oper timeout.
Definition at line 120 of file Board.h.
References base::Board::fDefaultTimeout.
Referenced by sp605::OpticBoard::invokeDLM(), roc::AbbBoard::invokeDLM(), roc::UdpDevice::operGen(), sp605::OpticBoard::operGen(), roc::AbbBoard::operGen(), and roc::UdpDevice::rawPut().
virtual uint32_t base::Board::getFrontendKind | ( | ) | [inline, virtual, inherited] |
Return frontend kinds - kind_nXYTER (1), kind_oldFEET (2) or kind_FEET (3).
Definition at line 322 of file Board.h.
References base::Board::getHardwareType().
Referenced by cmd_board(), sp605::OpticBoard::initAbbBoard(), and main().
uint32_t base::Board::getHardwareType | ( | ) | [virtual, inherited] |
Returns hardware type (frontend/backend) of ROC (FPGA firmware kind).
Returns kind of fornend (higher 16 bit) and backend (lower 16 bit)
Definition at line 512 of file Board.cxx.
Referenced by base::Board::getBackendKind(), and base::Board::getFrontendKind().
uint32_t base::Board::getHardwareVersion | ( | ) | [virtual, inherited] |
virtual int base::Board::getMsgFormat | ( | ) | const [pure virtual, inherited] |
getMsgFormat
Returns message format like roc::formatEth2, roc::formatOptic2 and so on Base on message format appropriate iterator must be used to access messages from raw buffers
Implemented in roc::AbbBoard, sp605::OpticBoard, roc::FileInput, and roc::UdpDevice.
Referenced by roc::ReadoutApplication::CreateRocCombiner(), roc::Iterator::Iterator(), sp605::Iterator::nextBuffer(), roc::Iterator::nextBuffer(), and TRocSource::Open().
virtual bool base::Board::getNextBuffer | ( | void *& | buf, | |
unsigned & | len, | |||
double | tmout = 1. | |||
) | [pure virtual, inherited] |
getNextBuffer
Returns pointer on the buffer which contains received messages.
len | returns length of buffer in bytes. Buffer is allocated by board itself, buffer content remains valid until next call of getNextBuffer() or when daq is stopped. Format of messages can be defined by getMsgFormat() To extract single messages from the buffer, roc::Iterator class should be used |
Implemented in roc::AbbBoard, sp605::OpticBoard, roc::FileInput, and roc::UdpDevice.
Referenced by TRocSource::BuildEvent(), sp605::Iterator::nextBuffer(), and roc::Iterator::nextBuffer().
int base::Board::getOperTrace | ( | ) | const [inline, inherited] |
Returns debug output verbosity level.
Definition at line 169 of file Board.h.
References base::Board::fOperTrace.
uint32_t roc::Board::getRocBackendKind | ( | ) | [inline, inherited] |
Return backend kinds - kind_Optic (1), kind_FX20 (2), kind_FX40 (3) or kind_FX60 (4).
Definition at line 86 of file Board.h.
References roc::Board::getRocHardwareType().
Referenced by RocMainWidget::getSubConfig().
virtual uint32_t roc::Board::getRocBackendVersion | ( | ) | [inline, virtual, inherited] |
Returns backend (Optic or UDP) version.
Reimplemented in roc::AbbBoard, and roc::UdpBoard.
Definition at line 89 of file Board.h.
Referenced by RocMainWidget::getSubConfig().
uint32_t roc::Board::getRocBuildTime | ( | ) | [inherited] |
Returns the time the firmware was synthesized.
The time is given in numbers of seconds since 1970-01-01 0:00 .
Definition at line 124 of file Board.cxx.
Referenced by RocMainWidget::getSubConfig().
uint32_t roc::Board::getRocFpgaType | ( | ) | [inherited] |
Returns the FPGA type the firmeware was syntesized for.
Definition at line 101 of file Board.cxx.
Referenced by RocMainWidget::getSubConfig().
uint32_t roc::Board::getRocFrontendKind | ( | ) | [inline, inherited] |
Return frontend kinds - kind_nXYTER (1), kind_oldFEET (2) or kind_FEET (3).
Definition at line 83 of file Board.h.
References roc::Board::getRocHardwareType().
Referenced by cmd_printroc(), RocMainWidget::getSubConfig(), and roc::Board::uploadStartDaqCmdList().
uint32_t roc::Board::getRocHardwareType | ( | ) | [inherited] |
Returns hardware type (frontend/backend) of ROC (FPGA firmware kind).
Frontend: 1 - NX 2 - FEET Backend: 1 - Optics 2 - Ethernet FX20 3 - Ethernet FX40
Definition at line 381 of file Board.cxx.
Referenced by roc::Board::getRocBackendKind(), and roc::Board::getRocFrontendKind().
uint32_t roc::Board::getRocHardwareVersion | ( | ) | [inherited] |
Returns hardware version of ROC (FPGA firmware version).
Definition at line 362 of file Board.cxx.
Referenced by RocMainWidget::getSubConfig().
uint32_t roc::Board::getRoclibVersion | ( | ) | [static, inherited] |
Returns software version of client software.
Definition at line 354 of file Board.cxx.
Referenced by RocMainWidget::getSubConfig().
uint32_t roc::Board::getRocNumber | ( | ) | [inline, inherited] |
Returns number from ROC directly, store fRocNumber variable.
Definition at line 96 of file Board.h.
References base::Board::getBoardNumber().
Referenced by RocMainWidget::getSubConfig().
uint32_t roc::Board::getRocSvnRev | ( | ) | [inherited] |
Returns subversion revision number of the ROC firmware source code.
Definition at line 111 of file Board.cxx.
Referenced by RocMainWidget::getSubConfig().
int roc::Board::getRocThrottleState | ( | uint32_t & | val | ) | [inherited] |
Returns the status of the throttle system.
val | bit mask with throttle system state
|
ClientRole base::Board::getRole | ( | ) | const [inline, inherited] |
Returns client role.
Definition at line 128 of file Board.h.
References base::Board::fRole.
Referenced by cmd_board(), cmd_feb(), roc::UdpDevice::ExecuteCommand(), roc::UdpDevice::InitAsBoard(), roc::UdpDevice::initUdp(), and roc::UdpDevice::~UdpDevice().
virtual int roc::OpticBoard::getTransportKind | ( | ) | const [inline, virtual] |
getTransportKind
Returns kind of transport - base::kind_UDP, base::kind_ABB or base::kind_File
Implements base::Board.
Definition at line 19 of file OpticBoard.h.
int base::Board::getVerbosity | ( | ) | const [inline, inherited] |
Returns debug output verbosity level.
Definition at line 125 of file Board.h.
References base::Board::fVerbosity.
Referenced by base::Board::Debug().
uint32_t base::Board::initBoard | ( | const char * | name, | |
uint32_t | minversion | |||
) | [protected, inherited] |
Checks and print board kind, version and id.
Definition at line 523 of file Board.cxx.
References base::OperList::addGet(), base::addr_BoardId, base::addr_HardwareType, base::addr_HardwareVersion, base::Board::Debug(), base::Board::fBrdNumber, base::kind_FEET, base::kind_FX20, base::kind_FX40, base::kind_FX60, base::kind_newNX, base::kind_newOptic, base::kind_nXYTER, base::kind_oldFEET, base::kind_Optic, base::kind_SPADIC, base::OperList::oper(), base::Board::operGen(), base::Oper::value, and base::Board::versionToString().
Referenced by sp605::OpticBoard::initAbbBoard(), roc::AbbBoard::initAbbBoard(), and roc::UdpDevice::initUdp().
int roc::Board::invokeCommandsList | ( | unsigned | num, | |
double | tmout = 0. | |||
) | [inherited] |
Invoke command list.
Invokes specified commands list and returns immediately. Means, commands list may still be executed when new operation is submitted
Definition at line 318 of file Board.cxx.
References base::Board::put(), and ROC_CMD_LST_NR.
virtual int roc::Board::invokeDLM | ( | unsigned | num, | |
double | tmout = 0. | |||
) | [inline, virtual, inherited] |
invokeDLM - method generate DLM, which sends to every endnode
Reimplemented from base::Board.
Reimplemented in roc::AbbBoard, and roc::UdpBoard.
Definition at line 109 of file Board.h.
Referenced by cmd_dlm(), and OpticWidget::setSendDLM_A2R().
virtual bool base::Board::is_SPI_I2C | ( | ) | const [inline, virtual, inherited] |
is_SPI_I2C - return true if SPI interface should be used to access I2C bus
Reimplemented in sp605::Board.
Definition at line 308 of file Board.h.
Referenced by roc::I2cDevice::addAddrMap(), nxyter::MainAdc::addAddrMap(), roc::I2cDevice::I2cDevice(), and nxyter::MainAdc::MainAdc().
bool base::Board::isFile | ( | ) | const [inline, inherited] |
isFile
Returns true if board is just envelope around file reading - most operation like put/get are nit working and should not be tried
Definition at line 296 of file Board.h.
References base::Board::getTransportKind().
Referenced by cmd_board(), cmd_printdata(), roc::Iterator::isFile(), nxyter::QuickDaq::startRun(), and nxyter::QuickDaq::testRun().
bool roc::Board::IsLmdFileAddress | ( | const char * | name | ) | [static, inherited] |
Check if specified address is lmd filename.
First checks that it has protocol file:// or has .lmd extension
Definition at line 476 of file Board.cxx.
References base::Url::GetFullName(), base::Url::GetProtocol(), and base::Url::IsValid().
Referenced by roc::Factory::DoConnect(), and roc::Factory::IsFactoryFor().
bool base::Board::isOptic | ( | ) | const [inline, inherited] |
isOptic - returns true when optic use for connection
Definition at line 299 of file Board.h.
References base::Board::getTransportKind().
bool roc::Board::IsOpticAddress | ( | const char * | name | ) | [static, inherited] |
Check if specified address is address of board, connected via optic.
First checks that it has prefix optic://, second that name starts from abb
Definition at line 460 of file Board.cxx.
References base::Url::GetHostName(), and base::Url::GetProtocol().
Referenced by roc::ReadoutApplication::CreateAppModules(), roc::ReadoutApplication::CreateRocCombiner(), roc::AbbFactory::DoConnect(), roc::AbbFactory::IsFactoryFor(), roc::ReadoutApplication::NumOpticRocs(), and roc::ReadoutApplication::NumUdpRocs().
bool roc::Board::IsUdpAddress | ( | const char * | name | ) | [static, inherited] |
Check if specified address is address of the board, connected via UDP.
First checks that it has udp protocol If not, than check if it is not starts with abb File should be checked before
Definition at line 441 of file Board.cxx.
References base::Url::GetHostName(), base::Url::GetProtocol(), and base::Url::IsValid().
Referenced by roc::Factory::DoConnect(), and roc::Factory::IsFactoryFor().
bool base::Board::isUSB | ( | ) | const [inline, inherited] |
isUSB - returns true when optic use for connection
Definition at line 302 of file Board.h.
References base::Board::getTransportKind().
static int base::Board::operErrBuild | ( | int | code, | |
int | index | |||
) | [inline, static, inherited] |
Build get/put/oper return code from error code and index value.
Build a return code for a board access method from an error code code, in general one of the values specified in the board::operErr enum, and an index value index.
code | error code. Only the lower 8 bits are used, to one can use a full return code, the index part will be discarded. | |
index | index or stage number at the point of failure |
Definition at line 258 of file Board.h.
Referenced by roc::UdpControlSocket::completeLoop(), roc::AbbDevice::ExecuteCommand(), nxyter::RocNx::fireTestPulse(), roc::I2cDevice::getMailboxRegister(), roc::I2cDevice::getRegister(), nxyter::MainAdc::getRegister(), roc::I2cDevice::getRegisterArray(), nxyter::NxI2c::getRegTrim(), base::Board::operErrBuildInc(), nxyter::NxI2c::probe(), nxyter::MainAdc::probe(), nxyter::MainAdc::setClockDelay(), nxyter::NxI2c::setContext(), roc::I2cDevice::setMailboxRegister(), nxyter::FebBase::setNxRegisterAll(), nxyter::FebBase::setNxTestModes(), roc::I2cDevice::setRegister(), nxyter::MainAdc::setRegister(), roc::I2cDevice::setRegisterArray(), roc::I2cDevice::setRegisterVerify(), nxyter::NxI2c::setRegTrim(), nxyter::MainAdc::setTestMode(), nxyter::NxI2c::setTestModes(), nxyter::RocNx::setToDefault(), nxyter::MainAdc::setToDefault(), nxyter::FebBase::setToDefault(), and nxyter::MainAdc::setUserPattern().
static int base::Board::operErrBuildInc | ( | int | rc, | |
int | inc | |||
) | [inline, static, inherited] |
Add to index value of get/put/oper return code.
rc | return code from board access method | |
inc | value to be added to the index field |
Definition at line 269 of file Board.h.
References base::Board::operErrBuild(), and base::Board::operErrIndex().
Referenced by nxyter::NxChip::activate(), nxyter::NxChip::deactivate(), nxyter::NxI2c::getContext(), nxyter::NxI2c::getRegCore(), nxyter::FebBase::initRoc(), base::Gpio::setConfig(), nxyter::NxI2c::setContext(), nxyter::QuickDaq::setNxRegisterAll(), nxyter::QuickDaq::setNxTestModes(), nxyter::NxI2c::setRegCore(), and nxyter::NxI2c::setRegTrim().
static int base::Board::operErrCode | ( | int | rc | ) | [inline, static, inherited] |
Retrieve error code from get/put/oper return code.
Extracts the error code, in general one of the values specified in the board::operErr enum, from a return code rc of a board access method.
Definition at line 234 of file Board.h.
Referenced by base::Board::operErrCodeName(), base::Board::operErrToString(), and nxyter::FebUtil::probe().
const char * base::Board::operErrCodeName | ( | int | rc | ) | [static, inherited] |
Returns descriptive text for a get/put/oper error code.
rc | return code, the index part will be ignored |
Definition at line 343 of file Board.cxx.
References base::Board::kOperAddrErr, base::Board::kOperBusErr, base::Board::kOperNetworkErr, base::Board::kOperStateErr, base::Board::kOperSuccess, base::Board::kOperValueErr, base::Board::kOperVerifyErr, and base::Board::operErrCode().
Referenced by base::Board::operErrToString(), and nxyter::FebUtil::probe().
static int base::Board::operErrIndex | ( | int | rc | ) | [inline, static, inherited] |
Retrieve index from get/put/oper return code.
Extracts the index value from a return code rc of a board access. method. The index allows to reconstruct at which point of an access sequence the error occurred.
Definition at line 244 of file Board.h.
Referenced by base::Board::operErrBuildInc(), base::Board::operErrToString(), and nxyter::FebUtil::probe().
std::string base::Board::operErrToString | ( | int | rc | ) | [static, inherited] |
Returns a string with a human readable form of a get/put/oper return code.
Return codes of many roc or device handling methods return either a negative number to indicate an illegal argument combination or state or a positive number to indicate a control space access errors (see roc::Board get/put/oper return codes). This method converts the return code into a human readable form. For negative values it simply returns "rc = nnn", while for positive values it extracts the index and error code part of the return code rc and returns a string of the form
rc = 7,20 -> readback verify error | | | | | string representation of error code | error code index part
Definition at line 376 of file Board.cxx.
References base::Board::operErrCode(), base::Board::operErrCodeName(), and base::Board::operErrIndex().
Referenced by cmd_geti2c(), cmd_printroc(), cmd_printstatus(), cmd_puti2c(), cmd_seti2c(), print_opererr(), nxyter::NxI2c::printRegisters(), nxyter::FebUtil::testFebControlPathCombo(), nxyter::FebUtil::testMainAdcControlPath(), nxyter::FebUtil::testMainAdcDataPath(), nxyter::FebUtil::testNxControlPath(), nxyter::FebUtil::testNxRegisters(), and base::Board::traceOper().
int base::Board::operGen | ( | bool * | isput, | |
uint32_t * | addr, | |||
uint32_t * | value, | |||
int | num, | |||
double | tmout = 0. | |||
) | [virtual, inherited] |
Method need to be virtual to satisfy compiler rules
Definition at line 137 of file Board.cxx.
References base::OperList::oper(), base::Board::operGen(), and base::Oper::value.
virtual int base::Board::operGen | ( | OperList & | lst, | |
double | tmout = 0. | |||
) | [pure virtual, inherited] |
General operate, arbitrary list of get/put accesses to ROC control space.
This function allow to execute a list of gets and puts from and to the ROC control address space. It is guaranteed that the execution is an atomic action, no control space access from other sources will be handled concurrently.
isput | array of flags, if true a put is done, otherwise a get. | |
addr | array of ROC control space addresses | |
value | array of data values. If the corresponding entry in isput is true the array element is read and written into the ROC address, otherwise the array element is written by data retrieved from the ROC address. | |
num | number of operates to do, size of arrays isput, addr, and value | |
tmout | maximal network response time |
Implemented in roc::AbbBoard, sp605::OpticBoard, roc::FileInput, and roc::UdpDevice.
Referenced by roc::Board::downloadCommandsList(), base::Board::get(), DataWidget::getData(), nxyter::RocNx::getDataDebug(), OpticWidget::getDLMHistory(), roc::I2cDevice::getRegister(), nxyter::MainAdc::getRegister(), roc::I2cDevice::getRegister16(), RocNxWidget::getSubConfig(), RocFeetWidget::getSubConfig(), OpticWidget::getSubConfig(), base::Board::initBoard(), base::Board::operGen(), base::Board::operGGG(), base::Board::operPG(), base::Board::operPP(), base::Board::operPPP(), base::Board::operPPPP(), base::Board::put(), nxyter::RocNx::resetRocNxTs(), roc::I2cDevice::setRegister(), nxyter::MainAdc::setRegister(), roc::I2cDevice::setRegisterVerify(), RocNxWidget::setSubConfig(), RocFeetWidget::setSubConfig(), roc::NxCalibrModule::switchCalibration(), and roc::Board::uploadCommandsList().
int base::Board::operGGG | ( | uint32_t | addr0, | |
uint32_t & | val0p, | |||
uint32_t | addr1, | |||
uint32_t & | val1p, | |||
uint32_t | addr2, | |||
uint32_t & | val2p, | |||
double | tmout = 0. | |||
) | [inherited] |
Get-Get-Get accesses sequence to ROC control space.
This is a specialization of operGen(), check the documentation of this method for details.
addr0 | address for 1st get | |
val0p | value to write in 1st get | |
addr1 | address for 2nd get | |
val1p | value to write in 2nd get | |
addr2 | address for 3rd get | |
val2p | value to write in 3rd get | |
tmout | maximal network response time |
Definition at line 277 of file Board.cxx.
References base::Board::operGen().
Referenced by base::Gpio::getSyncBaud().
int base::Board::operPG | ( | uint32_t | addr0, | |
uint32_t | val0p, | |||
uint32_t | addr1, | |||
uint32_t & | val1g, | |||
double | tmout = 0. | |||
) | [inherited] |
Put-Get accesses sequence to ROC control space.
This is a specialization of operGen(), check the documentation of this method for details.
addr0 | address for 1st put | |
val0p | value to write in 1st put | |
addr1 | address for 1st get | |
val1g | value returned in 1st get | |
tmout | maximal network response time |
Definition at line 212 of file Board.cxx.
References base::Board::operGen().
Referenced by nxyter::MainAdc::getRegister().
int base::Board::operPP | ( | uint32_t | addr0, | |
uint32_t | val0p, | |||
uint32_t | addr1, | |||
uint32_t | val1p, | |||
double | tmout = 0. | |||
) | [inherited] |
Put-Put accesses sequence to ROC control space.
This is a specialization of operGen(), check the documentation of this method for details.
addr0 | address for 1st put | |
val0p | value to write in 1st put | |
addr1 | address for 2nd put | |
val1p | value to write in 2nd put | |
tmout | maximal network response time |
Definition at line 183 of file Board.cxx.
References base::Board::operGen().
Referenced by roc::Board::clearRocFifo(), and RocFeetWidget::resetFifo().
int base::Board::operPPP | ( | uint32_t | addr0, | |
uint32_t | val0p, | |||
uint32_t | addr1, | |||
uint32_t | val1p, | |||
uint32_t | addr2, | |||
uint32_t | val2p, | |||
double | tmout = 0. | |||
) | [inherited] |
Put-Put-Put accesses sequence to ROC control space.
This is a specialization of operGen(), check the documentation of this method for details.
addr0 | address for 1st put | |
val0p | value to write in 1st put | |
addr1 | address for 2nd put | |
val1p | value to write in 2nd put | |
addr2 | address for 3rd put | |
val2p | value to write in 3rd put | |
tmout | maximal network response time |
Definition at line 244 of file Board.cxx.
References base::Board::operGen().
Referenced by autoped_issue_system_message(), nxyter::FebBase::resetNxI2cBus(), nxyter::FebBase::resetNxI2cRegister(), and base::Gpio::setSyncBaud().
int base::Board::operPPPP | ( | uint32_t | addr0, | |
uint32_t | val0p, | |||
uint32_t | addr1, | |||
uint32_t | val1p, | |||
uint32_t | addr2, | |||
uint32_t | val2p, | |||
uint32_t | addr3, | |||
uint32_t | val3p, | |||
double | tmout = 0. | |||
) | [inherited] |
Put-Put-Put-Put accesses sequence to ROC control space.
This is a specialization of operGen(), check the documentation of this method for details.
addr0 | address for 1st put | |
val0p | value to write in 1st put | |
addr1 | address for 2nd put | |
val1p | value to write in 2nd put | |
addr2 | address for 3rd put | |
val2p | value to write in 3rd put | |
addr3 | address for 4th put | |
val3p | value to write in 4th put | |
tmout | maximal network response time |
Definition at line 317 of file Board.cxx.
References base::Board::operGen().
Referenced by nxyter::RocNx::fireTestPulse().
void base::Board::printRegAddressMap | ( | std::ostream & | os, | |
bool | byname = false | |||
) | [inherited] |
Definition at line 447 of file Board.cxx.
References base::Board::fMapAddr2Name, and base::Board::fMapName2Addr.
Referenced by cmd_printrocmap().
int base::Board::put | ( | uint32_t | addr, | |
uint32_t | value, | |||
double | tmout = 0. | |||
) | [inherited] |
Definition at line 154 of file Board.cxx.
References base::Board::operGen().
Referenced by roc::BoardsVector::autoped_issue_system_message(), roc::UdpBoard::BURST(), cmd_putroc(), RocNxWidget::delayChanged(), RocFeetWidget::enableDatagen(), RocFeetWidget::initFeet(), nxyter::FebBase::initRoc(), roc::UdpDevice::initUdp(), roc::Board::invokeCommandsList(), roc::UdpBoard::invokeDLM(), RocNxWidget::latencyChanged(), RocNxWidget::parityChanged(), BoardWidget::putRegister(), RocFeetWidget::resetFrontend(), roc::Board::restartRoc(), RocFeetWidget::sendCmdToFeet(), base::Board::setBoardNumber(), nxyter::NxChip::setChannelDelay(), nxyter::MainAdc::setChannelLatency(), nxyter::MainAdc::setChannelMux(), nxyter::MainAdc::setClockDelayBufg(), nxyter::MainAdc::setClockDelaySrInit(), base::Gpio::setConfig(), roc::UdpBoard::setConsoleOutput(), OpticWidget::setDataGen(), nxyter::RocNx::setDebugMode(), RocFeetWidget::setEpoch250En(), nxyter::RocNx::setLTSDelay(), nxyter::RocNx::setNxActive(), nxyter::RocNx::setParityCheck(), roc::UdpBoard::setRocBufferFlushTimer(), roc::UdpBoard::setRocLowHighWater(), OpticWidget::setSendDLM_R2A(), OpticWidget::setStartDAQ(), OpticWidget::setStopDAQ(), base::Gpio::setSyncScale(), nxyter::RocNx::setToDefault(), roc::UdpBoard::switchToConsole(), and roc::UdpBoard::uploadDataToRoc().
virtual bool roc::Board::restartBoard | ( | ) | [inline, virtual, inherited] |
resetBoard - method should restart board. Return true if implemented. One should immediately close connection to board
Reimplemented from base::Board.
Definition at line 114 of file Board.h.
References roc::Board::restartRoc().
void roc::Board::restartRoc | ( | ) | [inherited] |
Full ROC restart (FPGA and PPC, if used).
This methods sends a message to the ROC which causes a full reset of the ROC board, the FPGA is reconfigured, and if used, the PPC is rebooted. Due to this hard reset the connection between the Board object and the ROC will abort, the Board object will essentially be a zombie after restartRoc() is called.
This method can come in handy when the ROC is in an inaccessible place and partially hung.
Definition at line 412 of file Board.cxx.
References base::Board::put(), and ROC_SYSTEM_RESET.
Referenced by main(), and roc::Board::restartBoard().
uint32_t roc::Board::rocNumber | ( | ) | const [inline, inherited] |
Returns locally stored ROC number.
Definition at line 93 of file Board.h.
References base::Board::boardNumber().
Referenced by roc::UdpDataSocket::AddDataPacket(), roc::ReadoutApplication::CreateRocCombiner(), roc::Board::GetBoardId(), roc::UdpDataSocket::GetParameter(), roc::Iterator::Iterator(), and TRocSource::Open().
void base::Board::setBoardNumber | ( | uint32_t | num | ) | [inherited] |
Change board number in device.
Updates board number in device memory.
Definition at line 580 of file Board.cxx.
References base::addr_BoardId, and base::Board::put().
Referenced by roc::Board::setRocNumber().
void base::Board::setDefaultTimeout | ( | double | tmout = 2. |
) | [inline, inherited] |
Set default get/put/oper timeout.
The value set with this method is used whenever no explicit timeout is specified in a get(), put() or openGen() call.
tmout | network communication timeout in sec. |
Definition at line 117 of file Board.h.
References base::Board::fDefaultTimeout.
virtual void base::Board::setFlushTimeout | ( | double | tmout | ) | [inline, virtual, inherited] |
Sets flush timeout of data transport.
Local transport accumulates data in buffer and until buffer is not filled, data is not delivered further. Flush timeout defines time interval, when any amount of data will be flushed.
tmout | timeout value in sec. |
Reimplemented in roc::AbbBoard, sp605::OpticBoard, roc::FileInput, and roc::UdpDevice.
Definition at line 400 of file Board.h.
Referenced by TRocSource::Open(), and nxyter::QuickDaq::startRun().
void base::Board::setOperTrace | ( | int | lvl = 1 |
) | [inline, inherited] |
Set get/put/operGen trace level.
Controls whether the full context of get(), put() and operGen() requests is printed to stdout. The lvl determines whether all, none or only failed requests are traced:
The output format is like (-> indicates get, <- indicates put):
get (3,0x00000580 ROC_GPIO_CONFIG ) -> 0x00000000 0 ok put (3,0x00000580 ROC_GPIO_CONFIG ) <- 0x00000100 256 ok op[00](3,0x00000514 ROC_SYNC2_BAUD_START ) <- 0x00000002 2 op[01](3,0x00000518 ROC_SYNC2_BAUD1 ) <- 0x00000004 4 op[02](3,0x0000051c ROC_SYNC2_BAUD2 ) <- 0x00000004 4 ok put (3,0x00000500 ROC_SYNC1_M_SCALEDOWN ) <- 0x00000004 4 ok op[00](3,0x00000504 ROC_SYNC1_BAUD_START ) <- 0x00000002 2 op[01](3,0x00000508 ROC_SYNC1_BAUD1 ) <- 0x00000004 4 op[02](3,0x0000050c ROC_SYNC1_BAUD2 ) <- 0x00000004 4 ok op[00](3,0x00000054 ROC_TESTPULSE_LENGTH ) <- 0x0000c34f 49999 op[01](3,0x00000058 ROC_TESTPULSE_NUMBER ) <- 0x00000000 0 op[02](3,0x0000005c ROC_TESTPULSE_START ) <- 0x00000001 1 ok op[00](3,0x00010100 ROC_I2C1_SWITCH ) <- 0x00000000 0 op[01](3,0x0001000c ROC_I2C1_SLAVEADDR ) <- 0x00000008 8 op[02](3,0x00010010 ROC_I2C1_REGISTER ) <- 0x00000015 21 op[03](3,0x00010000 ROC_I2C1_DATA ) -> 0x0000000f 15 op[04](3,0x00010020 ROC_I2C1_ERROR ) -> 0x00000000 0 ok
Definition at line 166 of file Board.h.
References base::Board::fOperTrace.
Referenced by cmd_settrace().
void roc::Board::setRocNumber | ( | uint32_t | num | ) | [inline, inherited] |
Definition at line 97 of file Board.h.
References base::Board::setBoardNumber().
void base::Board::setRole | ( | ClientRole | role | ) | [inline, protected, inherited] |
Definition at line 84 of file Board.h.
References base::Board::fRole.
Referenced by roc::AbbBoard::AbbBoard(), roc::FileInput::FileInput(), sp605::OpticBoard::OpticBoard(), and roc::UdpDevice::UdpDevice().
int roc::Board::setToDefault | ( | ) | [virtual, inherited] |
Activate DAQ.
Sets to default values common ROC registers.
This method will initialize the data transport chain which brings message data from the ROC. The details depend in the underlying transport. By the daq starting commands list 0 is always executed. This commands list can be initialized by
Sends to ROC ROC_SUSPEND_DAQ command. ROC will produce stop message and will deliver it sometime to host PC. User can continue to take data until this message. Normally no more messages will be delivered after stop daq message. stopDaq
Complimentary function for startDaq. Disables any new data requests, all coming data will be discarded getNextBuffer
Returns pointer on the buffer which contains received messages.
len | returns length of buffer in bytes. Buffer is allocated by board itself, buffer content remains valid until next call of getNextBuffer() or when daq is stopped. Format of messages can be defined by getMsgFormat() To extract single messages from the buffer, roc::Iterator class should be used |
Returns message format like formatEth2, formatOptic2 and so on Sets flush timeout of data transport
Local transport accumulates data in buffer and until buffer is not filled, data is not delivered further. Flush timeout defines time interval, when any amount of data will be flushed.
tmout | timeout value in sec. Sets to default values common ROC registers |
For a moment, initializes start/stop commands lists
For a moment, initializes start/stop commands lists
Reimplemented from base::Board.
Definition at line 303 of file Board.cxx.
References roc::Board::uploadStartDaqCmdList(), and roc::Board::uploadStopDaqCmdList().
Referenced by RocMainWidget::setSubToDefault().
void base::Board::setVerbosity | ( | int | lvl = 0 |
) | [inline, inherited] |
Set debug output verbosity level.
Definition at line 123 of file Board.h.
References base::Board::fVerbosity.
Referenced by cmd_setdebug().
virtual bool base::Board::startDaq | ( | ) | [pure virtual, inherited] |
Activate DAQ.
This method will initialize the data transport chain which brings message data from the ROC. The details depend in the underlying transport. By the daq starting commands list 0 is always executed. This commands list can be initialized by
Implemented in roc::AbbBoard, sp605::OpticBoard, roc::FileInput, and roc::UdpDevice.
Referenced by roc::Iterator::Iterator(), TRocSource::Open(), and nxyter::QuickDaq::startRun().
virtual bool base::Board::stopDaq | ( | ) | [pure virtual, inherited] |
stopDaq
Complimentary function for startDaq. Disables any new data requests, all coming data will be discarded
Implemented in roc::AbbBoard, sp605::OpticBoard, roc::FileInput, and roc::UdpDevice.
Referenced by TRocSource::Close(), and nxyter::QuickDaq::startRun().
virtual bool base::Board::suspendDaq | ( | ) | [pure virtual, inherited] |
suspendDaq
Sends to ROC ROC_SUSPEND_DAQ command. ROC will produce stop message and will deliver it sometime to host PC. User can continue to take data until this message. Normally no more messages will be delivered after stop daq message.
Implemented in roc::AbbBoard, sp605::OpticBoard, roc::FileInput, and roc::UdpDevice.
Referenced by nxyter::QuickDaq::stopRun().
void base::Board::traceOper | ( | OperList & | lst, | |
int | rc | |||
) | [protected, inherited] |
Generate output for get/put/operGen traces.
isput | 'isput' array | |
addr | 'addr' array (or pointer to address in case of get/put) | |
value | 'value' array (or pointer to value in case of get/put) | |
num | request list length | |
rc | return code |
Definition at line 103 of file Board.cxx.
References base::Oper::addr, base::Board::Debug(), base::Board::findRegNameByAddress(), base::Board::fOperTrace, base::Board::GetBoardId(), base::Oper::isput, base::Board::kOperNetworkErr, base::OperList::number(), base::OperList::oper(), base::Board::operErrToString(), and base::Oper::value.
Referenced by roc::UdpDevice::operGen(), sp605::OpticBoard::operGen(), and roc::AbbBoard::operGen().
int roc::Board::uploadCommandsList | ( | unsigned | num, | |
const base::OperList & | lst, | |||
double | tmout = 0. | |||
) | [inherited] |
Add an commands list entry .
This method sets commands list, which can be executed by command activateCommandsList() or by issuing of DLM
Definition at line 138 of file Board.cxx.
References base::OperList::addPut(), base::Board::Debug(), base::OperList::isput(), base::OperList::number(), base::OperList::oper(), base::Board::operGen(), ROC_CMD_LST_ACTIVE, ROC_CMD_LST_MEM, ROC_CMD_LST_NUMBER, ROC_CMD_LST_PUT, and ROC_CMD_LST_SIZE.
Referenced by roc::Board::uploadStartDaqCmdList(), and roc::Board::uploadStopDaqCmdList().
int roc::Board::uploadStartDaqCmdList | ( | bool | reset_frontend = false , |
|
bool | reset_fifo = true | |||
) | [inherited] |
Produce and upload start daq commands list.
This method produces commands list, which is executed on the board when startDaq method is called. Actually, it is list number 0
reset_frontend | defines if front-end specific reset commands will be put into commands list. For nXYTER frontend, ROC_NX_TS_RESET will be done | |
reset_fifo | defines if message FIFO will be cleared |
Definition at line 242 of file Board.cxx.
References base::OperList::addPut(), roc::Board::getRocFrontendKind(), base::Board::getTransportKind(), roc::kind_FEET, roc::kind_nXYTER, roc::kind_oldFEET, roc::kind_UDP, ROC_ETH_START_DAQ, ROC_FEET_CMD_TO_FEET, ROC_FEET_FIFO_RESET, ROC_FEET_RESET, ROC_NX_FIFO_RESET, ROC_NX_TS_RESET, ROC_OPTICS_START_DAQ, and roc::Board::uploadCommandsList().
Referenced by roc::Board::setToDefault(), and nxyter::QuickDaq::startRun().
int roc::Board::uploadStopDaqCmdList | ( | ) | [inherited] |
Produce and upload stop daq commands list.
For a moment, list contains only stopdaq command
Definition at line 285 of file Board.cxx.
References base::OperList::addPut(), base::Board::getTransportKind(), roc::kind_UDP, ROC_ETH_STOP_DAQ, ROC_OPTICS_STOP_DAQ, and roc::Board::uploadCommandsList().
Referenced by roc::Board::setToDefault().
const char * base::Board::versionToString | ( | uint32_t | ver | ) | [static, inherited] |
Returns a string representation of a version number.
Definition at line 476 of file Board.cxx.
Referenced by cmd_printid(), RocNxWidget::getSubConfig(), RocMainWidget::getSubConfig(), RocFeetWidget::getSubConfig(), OpticWidget::getSubConfig(), roc::AbbBoard::initAbbBoard(), base::Board::initBoard(), and roc::UdpDevice::initUdp().
BoardFactory* base::Board::fBrdFactory [protected, inherited] |
factory used to create board instance
Definition at line 70 of file Board.h.
Referenced by base::BoardFactory::CreateBoard(), base::Board::Debug(), and base::BoardFactory::DestroyBoard().
uint32_t base::Board::fBrdNumber [protected, inherited] |
number of connected ROC
Definition at line 75 of file Board.h.
Referenced by base::Board::boardNumber(), base::Board::getBoardNumber(), roc::FileInput::getNextBuffer(), and base::Board::initBoard().
double base::Board::fDefaultTimeout [protected, inherited] |
default timeout
Definition at line 71 of file Board.h.
Referenced by base::Board::getDefaultTimeout(), and base::Board::setDefaultTimeout().
mapa2n_t base::Board::fMapAddr2Name [protected, inherited] |
Definition at line 68 of file Board.h.
Referenced by base::Board::addRegAddrMapping(), base::Board::findRegNameByAddress(), and base::Board::printRegAddressMap().
mapn2a_t base::Board::fMapName2Addr [protected, inherited] |
Definition at line 67 of file Board.h.
Referenced by base::Board::addRegAddrMapping(), base::Board::fillRegAddrNames(), base::Board::findRegAddressByName(), and base::Board::printRegAddressMap().
int base::Board::fOperTrace [protected, inherited] |
Oper trace level.
Definition at line 73 of file Board.h.
Referenced by base::Board::getOperTrace(), base::Board::setOperTrace(), and base::Board::traceOper().
ClientRole base::Board::fRole [protected, inherited] |
client role (access rights)
Definition at line 74 of file Board.h.
Referenced by base::Board::getRole(), and base::Board::setRole().
int base::Board::fVerbosity [protected, inherited] |
Debug verbosity level.
Definition at line 72 of file Board.h.
Referenced by base::Board::getVerbosity(), and base::Board::setVerbosity().