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