Bitstream Interpretation Library (BIL)  0.1
Public Member Functions
bil::V5IDCODERegister Class Reference

A register for setting/checking the target device type. More...

#include <packetprocessor/V5IDCODERegister.hpp>

Inheritance diagram for bil::V5IDCODERegister:
Inheritance graph
[legend]
Collaboration diagram for bil::V5IDCODERegister:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 V5IDCODERegister (V5FDRIRegister &fdriReg, const V5AddressLayoutRegistry &registry)
 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.
V5FDRIRegisterfdriRegister () const
 Gets linked V5FDRIRegister instance.
const V5AddressLayoutRegistrylayoutRegistry () 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.

Detailed Description

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.


Constructor & Destructor Documentation

V5IDCODERegister::V5IDCODERegister ( V5FDRIRegister fdriReg,
const V5AddressLayoutRegistry registry 
)

Constructs a V5IDCODERegister instance.

Parameters:
fdriRegReference to a V5FDRIRegister instance that should be linked to this register (e.g. for doing target device related setup of FDRI).
registryReference 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.


Member Function Documentation

void V5IDCODERegister::write ( const boost::uint32_t *  words,
size_t  wordCount 
)
virtual

When writing a word, it will be set as current ID code by calling deviceID().

Parameters:
wordsPointer to data words to write.
wordCountNumber of data words to write.
Exceptions:
.

Reimplemented from bil::Register.

Definition at line 25 of file V5IDCODERegister.cpp.

void V5IDCODERegister::read ( boost::uint32_t *  words,
size_t  wordCount 
) const
virtual

When reading a word, the current ID code will be returned.

Parameters:
wordsPointer to data buffer.
wordCountNumber of data words to read.
Exceptions:
.

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.

Parameters:
idThe new ID code.
Exceptions:
.

Definition at line 47 of file V5IDCODERegister.cpp.

DeviceID::ID_t V5IDCODERegister::idCode ( ) const

Gets current device ID code.

Returns:
The ID code.

Definition at line 62 of file V5IDCODERegister.cpp.

V5FDRIRegister & V5IDCODERegister::fdriRegister ( ) const

Gets linked V5FDRIRegister instance.

Returns:
Reference to the V5FDRIRegister instance.

Definition at line 68 of file V5IDCODERegister.cpp.

const V5AddressLayoutRegistry & V5IDCODERegister::layoutRegistry ( ) const

Gets linked V5AddressLayoutRegistry instance.

Returns:
Reference to the V5AddressLayoutRegistry instance.

Definition at line 74 of file V5IDCODERegister.cpp.


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