Generic hardware access library
|
Browses the contents of a crate and delivers the VME-Modules contained in the crate. More...
#include <VMEConfigurationSpaceHandler.hh>
Public Member Functions | |
VMEConfigurationSpaceHandler (VMEBusAdapterInterface &busAdapter) | |
virtual | ~VMEConfigurationSpaceHandler () |
void | configWrite (std::string item, uint32_t slotId, uint32_t data, HalVerifyOption verifyFlag=HAL_NO_VERIFY, uint32_t offset=0) const throw ( NoSuchItemException, IllegalOperationException, BusAdapterException ) |
void | configRead (std::string item, uint32_t slotId, uint32_t *resultPtr, uint32_t offset=0) const throw ( NoSuchItemException, IllegalOperationException, BusAdapterException ) |
bool | containsVME64xModule (uint32_t slotId) const throw ( IllegalValueException ) |
bool | functionIsImplemented (uint32_t slotId, uint32_t functionId) const |
std::string | readSerialNumber (uint32_t slotId) const throw ( IllegalOperationException ) |
void | enableVME64xModule (uint32_t slotId) const throw ( IllegalOperationException ) |
void | disableVME64xModule (uint32_t slotId) const throw ( IllegalOperationException ) |
bool | enabled (uint32_t slotId) const throw ( IllegalOperationException ) |
uint32_t | getUserROMInterval (uint32_t slotId) const |
void | readROMBlock (uint32_t slotId, uint32_t startAdr, uint32_t endAdr, std::vector< unsigned char > *data) const |
Takes into account the UserROMInterval (which bytes are valid). | |
bool | checksumOk (uint32_t slotId) const throw ( IllegalOperationException ) |
VMEBusAdapterInterface & | getBusAdapter () const |
Private Member Functions | |
void | checkVME64xConfigSpace (uint32_t slot) const throw ( IllegalOperationException ) |
uint32_t | calculateOffset (uint32_t slotId) const |
void | saveRead (std::string item, uint32_t slot, uint32_t *result, uint32_t offset=0) const |
A helper function which calls configRead but does not throw exceptions. | |
void | saveWrite (std::string item, uint32_t slot, uint32_t data, HalVerifyOption verifyFlag=HAL_NO_VERIFY, uint32_t offset=0) const |
A helper function which calls configWrite but does not throw exceptions. | |
Private Attributes | |
VMEBusAdapterInterface & | busAdapter_ |
VMEConfigurationSpaceDevice * | vmeDevicePtr_ |
VMEAddressTable * | configurationAddressTablePtr_ |
Browses the contents of a crate and delivers the VME-Modules contained in the crate.
This class should provide all services which are needed to configure a VME64x crate with the plug and play mechanism. The result of the configuration is a list of VMEModules which can be retrieved by the user.
Definition at line 36 of file VMEConfigurationSpaceHandler.hh.
HAL::VMEConfigurationSpaceHandler::VMEConfigurationSpaceHandler | ( | HAL::VMEBusAdapterInterface & | busAdapter | ) |
Definition at line 6 of file VMEConfigurationSpaceHandler.cc.
Definition at line 16 of file VMEConfigurationSpaceHandler.cc.
uint32_t HAL::VMEConfigurationSpaceHandler::calculateOffset | ( | uint32_t | slotId | ) | const [inline, private] |
Definition at line 21 of file VMEConfigurationSpaceHandler.cc.
bool HAL::VMEConfigurationSpaceHandler::checksumOk | ( | uint32_t | slotId | ) | const throw ( IllegalOperationException ) |
Definition at line 187 of file VMEConfigurationSpaceHandler.cc.
void HAL::VMEConfigurationSpaceHandler::checkVME64xConfigSpace | ( | uint32_t | slot | ) | const throw ( IllegalOperationException ) [private] |
Definition at line 137 of file VMEConfigurationSpaceHandler.cc.
void HAL::VMEConfigurationSpaceHandler::configRead | ( | std::string | item, |
uint32_t | slotId, | ||
uint32_t * | resultPtr, | ||
uint32_t | offset = 0 |
||
) | const throw ( NoSuchItemException, IllegalOperationException, BusAdapterException ) |
Definition at line 56 of file VMEConfigurationSpaceHandler.cc.
void HAL::VMEConfigurationSpaceHandler::configWrite | ( | std::string | item, |
uint32_t | slotId, | ||
uint32_t | data, | ||
HalVerifyOption | verifyFlag = HAL_NO_VERIFY , |
||
uint32_t | offset = 0 |
||
) | const throw ( NoSuchItemException, IllegalOperationException, BusAdapterException ) |
Definition at line 25 of file VMEConfigurationSpaceHandler.cc.
bool HAL::VMEConfigurationSpaceHandler::containsVME64xModule | ( | uint32_t | slotId | ) | const throw ( IllegalValueException ) |
Definition at line 86 of file VMEConfigurationSpaceHandler.cc.
void HAL::VMEConfigurationSpaceHandler::disableVME64xModule | ( | uint32_t | slotId | ) | const throw ( IllegalOperationException ) |
Definition at line 239 of file VMEConfigurationSpaceHandler.cc.
bool HAL::VMEConfigurationSpaceHandler::enabled | ( | uint32_t | slotId | ) | const throw ( IllegalOperationException ) |
Definition at line 245 of file VMEConfigurationSpaceHandler.cc.
void HAL::VMEConfigurationSpaceHandler::enableVME64xModule | ( | uint32_t | slotId | ) | const throw ( IllegalOperationException ) |
Definition at line 233 of file VMEConfigurationSpaceHandler.cc.
bool HAL::VMEConfigurationSpaceHandler::functionIsImplemented | ( | uint32_t | slotId, |
uint32_t | functionId | ||
) | const |
Definition at line 110 of file VMEConfigurationSpaceHandler.cc.
Definition at line 253 of file VMEConfigurationSpaceHandler.cc.
uint32_t HAL::VMEConfigurationSpaceHandler::getUserROMInterval | ( | uint32_t | slotId | ) | const |
Definition at line 148 of file VMEConfigurationSpaceHandler.cc.
void HAL::VMEConfigurationSpaceHandler::readROMBlock | ( | uint32_t | slotId, |
uint32_t | startAdr, | ||
uint32_t | endAdr, | ||
std::vector< unsigned char > * | data | ||
) | const |
Takes into account the UserROMInterval (which bytes are valid).
Definition at line 161 of file VMEConfigurationSpaceHandler.cc.
std::string HAL::VMEConfigurationSpaceHandler::readSerialNumber | ( | uint32_t | slotId | ) | const throw ( IllegalOperationException ) |
Definition at line 212 of file VMEConfigurationSpaceHandler.cc.
void HAL::VMEConfigurationSpaceHandler::saveRead | ( | std::string | item, |
uint32_t | slot, | ||
uint32_t * | result, | ||
uint32_t | offset = 0 |
||
) | const [private] |
A helper function which calls configRead but does not throw exceptions.
If in this routine an exception is encountered the program is stopped since then a hardware failure or an internal software bug has been encountered. The routine simplifies the throw-clauses of calling methods.
Definition at line 67 of file VMEConfigurationSpaceHandler.cc.
void HAL::VMEConfigurationSpaceHandler::saveWrite | ( | std::string | item, |
uint32_t | slot, | ||
uint32_t | data, | ||
HalVerifyOption | verifyFlag = HAL_NO_VERIFY , |
||
uint32_t | offset = 0 |
||
) | const [private] |
A helper function which calls configWrite but does not throw exceptions.
If in this routine an exception is encountered the program is stopped since then a hardware failure or an internal software bug has been encountered. The routine simplifies the throw-clauses of calling methods.
Definition at line 37 of file VMEConfigurationSpaceHandler.cc.
Definition at line 122 of file VMEConfigurationSpaceHandler.hh.
Definition at line 124 of file VMEConfigurationSpaceHandler.hh.
Definition at line 123 of file VMEConfigurationSpaceHandler.hh.