Generic hardware access library
/home/cschwick/hal/generic/src/common/ReadCommand.cc
Go to the documentation of this file.
00001 #include "hal/ReadCommand.hh"
00002 
00003 
00004 HAL::ReadCommand::ReadCommand( std::string item, 
00005                                HAL::CommandSequence& sequence )
00006   : sequence(sequence),
00007     item( item ) {
00008   offsetPtr = &offset;
00009   offset = 0;
00010 }
00011 
00012 void HAL::ReadCommand::excecute( const HAL::HardwareDeviceInterface& device ) const 
00013 throw( HAL::IllegalOperationException,
00014        HAL::BusAdapterException,
00015        HAL::MaskBoundaryException ) {
00016   device.read( item, resultPtr, *offsetPtr );
00017 }
00018 
00019 void HAL::ReadCommand::setOffset( uint32_t offset ) {
00020   this->offset = offset;
00021 }
00022 
00023 void HAL::ReadCommand::setOffsetPointer( uint32_t* offsetPtr ) {
00024   this->offsetPtr = offsetPtr;
00025 }
00026 
00027 void HAL::ReadCommand::setResultPointer( uint32_t* resultPtr ) {
00028   this->resultPtr = resultPtr;
00029 }