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

A standard register containing a 32 bit word. More...

#include <packetprocessor/WordRegister.hpp>

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

List of all members.

Public Member Functions

 WordRegister (RegisterAddress::address_t address, const std::string &name, bool writable=true, bool readable=true)
 Constructs a WordRegister instance.
virtual void write (const boost::uint32_t *words, size_t wordCount)
 Writes a data word into the register.
virtual void read (boost::uint32_t *words, size_t wordCount) const
 Reads a data word from the register.
void value (boost::uint32_t val)
 Sets the register's current value.
boost::uint32_t value () const
 Gets the register's current value.
- 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 standard register containing a 32 bit word.

This class models a 32 bit word register. One word can be written or read at a time.

Definition at line 21 of file WordRegister.hpp.


Constructor & Destructor Documentation

WordRegister::WordRegister ( RegisterAddress::address_t  address,
const std::string &  name,
bool  writable = true,
bool  readable = true 
)

Constructs a WordRegister instance.

See Register().

Definition at line 12 of file WordRegister.cpp.


Member Function Documentation

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

Writes a data word into the register.

Parameters:
wordsPointer to data words to write.
wordCountMust be 1.
Exceptions:
.

Reimplemented from bil::Register.

Definition at line 20 of file WordRegister.cpp.

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

Reads a data word from the register.

Parameters:
wordsPointer to data buffer.
wordCountMust be 1.
Exceptions:
.

Reimplemented from bil::Register.

Definition at line 31 of file WordRegister.cpp.

void WordRegister::value ( boost::uint32_t  val)

Sets the register's current value.

Parameters:
valThe 32 bit word value.

Definition at line 42 of file WordRegister.cpp.

boost::uint32_t WordRegister::value ( ) const

Gets the register's current value.

Returns:
The 32 bit word value.

Definition at line 48 of file WordRegister.cpp.


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