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

A register for executing commands. More...

#include <packetprocessor/V5CMDRegister.hpp>

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

List of all members.

Public Member Functions

 V5CMDRegister (V5CRCRegister &crcReg)
 Constructs a V5CMDRegister instance.
virtual void write (const boost::uint32_t *words, size_t wordCount)
 When writing a word, it will be set as current command code and executed immediately (by calling commandCode() and execute()).
virtual void read (boost::uint32_t *words, size_t wordCount) const
 When reading a word, the current command code will be returned.
void commandCode (V5CommandCode::command_t code)
 Sets command code.
V5CommandCode::command_t commandCode () const
 Gets current command code.
void execute () const
 Executes current command code.
V5CRCRegistercrcRegister () const
 Gets linked V5CRCRegister register 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 executing commands.

The command register is an one word write- and readable register. Writes will set a command code and execute it. Reads will return the current command code.

Definition at line 26 of file V5CMDRegister.hpp.


Constructor & Destructor Documentation

V5CMDRegister::V5CMDRegister ( V5CRCRegister crcReg)
explicit

Constructs a V5CMDRegister instance.

Parameters:
crcRegV5CRCRegister instance reference that should be linked to this register (e.g. for being controlled).

Definition at line 14 of file V5CMDRegister.cpp.


Member Function Documentation

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

When writing a word, it will be set as current command code and executed immediately (by calling commandCode() and execute()).

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

Reimplemented from bil::Register.

Definition at line 23 of file V5CMDRegister.cpp.

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

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

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

Reimplemented from bil::Register.

Definition at line 35 of file V5CMDRegister.cpp.

void V5CMDRegister::commandCode ( V5CommandCode::command_t  code)

Sets command code.

Parameters:
codeThe new command code.
Exceptions:
.

Definition at line 46 of file V5CMDRegister.cpp.

V5CommandCode::command_t V5CMDRegister::commandCode ( ) const

Gets current command code.

Returns:
The command code.

Definition at line 72 of file V5CMDRegister.cpp.

void V5CMDRegister::execute ( ) const

Executes current command code.

Definition at line 78 of file V5CMDRegister.cpp.

V5CRCRegister & V5CMDRegister::crcRegister ( ) const

Gets linked V5CRCRegister register instance.

Returns:
Reference to the V5CRCRegister instance.

Definition at line 85 of file V5CMDRegister.cpp.


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