Generic hardware access library
HAL::VMEAddressTable Class Reference

The Address Table for VME Devices. More...

#include <VMEAddressTable.hh>

Inheritance diagram for HAL::VMEAddressTable:
HAL::AddressTable HAL::AddressTableInterface

List of all members.

Public Member Functions

 VMEAddressTable (std::string name, AddressTableReader &tableReader)
 The constructure fills the internal data strucutures of the VMEAddressTable.
virtual ~VMEAddressTable ()
void getAddressBoundaries (std::vector< uint32_t > &minAddresses, std::vector< uint32_t > &maxAddresses) const
 Retrieves the highest address offset offset with respect to the baseaddress.
void checkAddressLimits (std::string item, uint32_t offset) const throw ( NoSuchItemException, AddressOutOfLimitsException )
 Implementation of the AddressTableInterface.
void checkAddressLimits (const GeneralHardwareAddress &hardwareAddress, uint32_t offset) const throw ( AddressOutOfLimitsException )
 Implementation of the AddressTableInterface.
void print (std::ostream &os=std::cout) const
 Prints the AddressTable.
void determineAddressBoundaries ()
 For each baseaddress determines the address boundaries This function is public since in the case of VME64x address tables this function must be called after the data width has been determined.

Private Attributes

std::vector< uint32_t > maxAddresses_
std::vector< uint32_t > minAddresses_

Detailed Description

The Address Table for VME Devices.

This class is the first non abstract class in the hierachy of AddressTables. It implements the print function. In the constructor it fills the internal data structures.

Addresses for the VMEAddressTable contain

  • VME-Address-Modifier
  • data width in bytes (2 or 4 is supported currently in HAL.
  • address offset with respect to the module-baseaddress.

The specific input to the VMEAddressTable is discussed in the relevant implementations of the AddressTableReader.

See also:
AddressTableReader
Author:
Christoph Schwick
Revision:
1.1
Date:
2007/03/05 18:02:10

Definition at line 44 of file VMEAddressTable.hh.


Constructor & Destructor Documentation

HAL::VMEAddressTable::VMEAddressTable ( std::string  name,
HAL::AddressTableReader tableReader 
)

The constructure fills the internal data strucutures of the VMEAddressTable.

Parameters:
nameis an arbitrary name for the table.
tableReaderis used to fill the data structures.

Definition at line 5 of file VMEAddressTable.cc.

Definition at line 15 of file VMEAddressTable.cc.


Member Function Documentation

void HAL::VMEAddressTable::checkAddressLimits ( std::string  item,
uint32_t  offset 
) const throw ( NoSuchItemException, AddressOutOfLimitsException ) [virtual]

Implementation of the AddressTableInterface.

Implements HAL::AddressTableInterface.

Definition at line 36 of file VMEAddressTable.cc.

void HAL::VMEAddressTable::checkAddressLimits ( const GeneralHardwareAddress hardwareAddress,
uint32_t  offset 
) const throw ( AddressOutOfLimitsException ) [virtual]

Implementation of the AddressTableInterface.

Implements HAL::AddressTableInterface.

Definition at line 68 of file VMEAddressTable.cc.

For each baseaddress determines the address boundaries This function is public since in the case of VME64x address tables this function must be called after the data width has been determined.

(Which in turn is done only after the crate has been mapped by the host computer).

Definition at line 99 of file VMEAddressTable.cc.

void HAL::VMEAddressTable::getAddressBoundaries ( std::vector< uint32_t > &  minAddresses,
std::vector< uint32_t > &  maxAddresses 
) const

Retrieves the highest address offset offset with respect to the baseaddress.

This function is useful for VMEBusAdapters which map the Addressspace of the hardware device into memory. This service allows the Adapter to determine the needed memory space needed to be mapped.

Returns:
the maximal address offset wrt the basaeaddress.

Definition at line 30 of file VMEAddressTable.cc.

void HAL::VMEAddressTable::print ( std::ostream &  os = std::cout) const [virtual]

Prints the AddressTable.

Implements HAL::AddressTableInterface.

Definition at line 17 of file VMEAddressTable.cc.


Member Data Documentation

std::vector< uint32_t > HAL::VMEAddressTable::maxAddresses_ [private]

Definition at line 96 of file VMEAddressTable.hh.

std::vector< uint32_t > HAL::VMEAddressTable::minAddresses_ [private]

Definition at line 97 of file VMEAddressTable.hh.


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