Generic hardware access library
|
00001 #include "hal/PollItemCommand.hh" 00002 00003 00004 HAL::PollItemCommand::PollItemCommand( std::string item, 00005 HAL::CommandSequence& sequence ) 00006 : sequence(sequence), 00007 item( item ) { 00008 offsetPtr = &offset; 00009 referenceValuePtr = &referenceValue; 00010 timeoutPtr = &timeout; 00011 offset = 0; 00012 } 00013 00014 void HAL::PollItemCommand::excecute( const HAL::HardwareDeviceInterface& device ) const 00015 throw( HAL::IllegalOperationException, 00016 HAL::BusAdapterException, 00017 HAL::MaskBoundaryException, 00018 HAL::TimeoutException ) { 00019 device.pollItem( item, *referenceValuePtr, *timeoutPtr, 00020 resultPtr, pollMethod, *offsetPtr ); 00021 } 00022 00023 void HAL::PollItemCommand::setOffset( uint32_t offset ) { 00024 this->offset = offset; 00025 } 00026 00027 void HAL::PollItemCommand::setTimeout( uint32_t timeout ) { 00028 this->timeout = timeout; 00029 } 00030 00031 void HAL::PollItemCommand::setReferenceValue( uint32_t referenceValue ) { 00032 this->referenceValue = referenceValue; 00033 } 00034 00035 void HAL::PollItemCommand::setOffsetPointer( uint32_t* offsetPtr ) { 00036 this->offsetPtr = offsetPtr; 00037 } 00038 00039 void HAL::PollItemCommand::setPollMethod( HalPollMethod pollMethod ) { 00040 this->pollMethod = pollMethod; 00041 } 00042 00043 void HAL::PollItemCommand::setReferenceValuePointer( uint32_t* referenceValuePtr ) { 00044 this->referenceValuePtr = referenceValuePtr; 00045 } 00046 00047 void HAL::PollItemCommand::setResultPointer( uint32_t* resultPtr ) { 00048 this->resultPtr = resultPtr; 00049 } 00050 00051 void HAL::PollItemCommand::setTimeoutPointer( uint32_t* timeoutPtr ) { 00052 this->timeoutPtr = timeoutPtr; 00053 }