Bitstream Interpretation Library (BIL)
0.1
|
A register for setting/checking the target device type. More...
#include <packetprocessor/V5IDCODERegister.hpp>
Public Member Functions | |
V5IDCODERegister (V5FDRIRegister &fdriReg, const V5AddressLayoutRegistry ®istry) | |
Constructs a V5IDCODERegister instance. | |
virtual void | write (const boost::uint32_t *words, size_t wordCount) |
When writing a word, it will be set as current ID code by calling deviceID(). | |
virtual void | read (boost::uint32_t *words, size_t wordCount) const |
When reading a word, the current ID code will be returned. | |
void | idCode (DeviceID::ID_t id) |
Sets device ID code, looks up the corresponding address layout in the address layout registry, and copies it to FDRI register. | |
DeviceID::ID_t | idCode () const |
Gets current device ID code. | |
V5FDRIRegister & | fdriRegister () const |
Gets linked V5FDRIRegister instance. | |
const V5AddressLayoutRegistry & | layoutRegistry () const |
Gets linked V5AddressLayoutRegistry instance. | |
Public Member Functions inherited from bil::Register | |
Register (RegisterAddress::address_t address, const std::string &name, bool writable=true, bool readable=true) | |
Constructs a Register instance. | |
virtual | ~Register ()=0 |
Destructs a Register instance. | |
RegisterAddress::address_t | address () const |
Gets register address. | |
const std::string & | name () const |
Gets register name. | |
bool | writable () const |
Tells if register is writable. | |
bool | readable () const |
Tells if register is readable. |
A register for setting/checking the target device type.
The IDCODE register is an one word write- and readable register. It contains the device ID code of the device to be configured. Writes will set this ID code (and prepare the FDRI register for that device); reads will return the current ID code.
Definition at line 28 of file V5IDCODERegister.hpp.
V5IDCODERegister::V5IDCODERegister | ( | V5FDRIRegister & | fdriReg, |
const V5AddressLayoutRegistry & | registry | ||
) |
Constructs a V5IDCODERegister instance.
fdriReg | Reference to a V5FDRIRegister instance that should be linked to this register (e.g. for doing target device related setup of FDRI). |
registry | Reference to a V5AddressLayoutRegistry instance that should be linked to this register (e.g. for looking up address layouts based on the device ID). |
Definition at line 15 of file V5IDCODERegister.cpp.
|
virtual |
When writing a word, it will be set as current ID code by calling deviceID().
words | Pointer to data words to write. |
wordCount | Number of data words to write. |
. |
Reimplemented from bil::Register.
Definition at line 25 of file V5IDCODERegister.cpp.
|
virtual |
When reading a word, the current ID code will be returned.
words | Pointer to data buffer. |
wordCount | Number of data words to read. |
. |
Reimplemented from bil::Register.
Definition at line 36 of file V5IDCODERegister.cpp.
void V5IDCODERegister::idCode | ( | DeviceID::ID_t | id | ) |
Sets device ID code, looks up the corresponding address layout in the address layout registry, and copies it to FDRI register.
id | The new ID code. |
. |
Definition at line 47 of file V5IDCODERegister.cpp.
DeviceID::ID_t V5IDCODERegister::idCode | ( | ) | const |
Gets current device ID code.
Definition at line 62 of file V5IDCODERegister.cpp.
V5FDRIRegister & V5IDCODERegister::fdriRegister | ( | ) | const |
Gets linked V5FDRIRegister instance.
Definition at line 68 of file V5IDCODERegister.cpp.
const V5AddressLayoutRegistry & V5IDCODERegister::layoutRegistry | ( | ) | const |
Gets linked V5AddressLayoutRegistry instance.
Definition at line 74 of file V5IDCODERegister.cpp.