Generic hardware access library
|
00001 #ifndef __PollItemCommand 00002 #define __PollItemCommand 00003 00004 #include <string> 00005 00006 #include "hal/SequencerCommand.hh" 00007 #include "hal/CommandSequence.hh" 00008 #include "hal/HardwareDeviceInterface.hh" 00009 #include "hal/BusAdapterException.hh" 00010 00011 namespace HAL { 00012 00052 class PollItemCommand : public SequencerCommand { 00053 public: 00059 PollItemCommand( std::string item, 00060 CommandSequence& sequence ); 00061 00062 virtual ~PollItemCommand() {}; 00063 00064 void excecute( const HardwareDeviceInterface& device ) const 00065 throw( IllegalOperationException, 00066 BusAdapterException, 00067 MaskBoundaryException, 00068 TimeoutException ); 00069 00073 void setOffsetPointer( uint32_t* offsetPtr ); 00074 00078 void setReferenceValuePointer( uint32_t* dataPtr ); 00079 00083 void setTimeoutPointer( uint32_t* timeoutPtr ); 00084 00088 void setResultPointer( uint32_t* resultPtr ); 00089 00093 void setReferenceValue( uint32_t offset ); 00094 00098 void setOffset( uint32_t offset ); 00099 00103 void setTimeout( uint32_t timeout ); 00104 00108 void setPollMethod( HalPollMethod pollMethod ); 00109 00110 private: 00111 CommandSequence& sequence; 00112 std::string item; 00113 uint32_t* referenceValuePtr; 00114 uint32_t referenceValue; 00115 uint32_t* timeoutPtr; 00116 uint32_t timeout; 00117 uint32_t* offsetPtr; 00118 uint32_t offset; 00119 uint32_t* resultPtr; 00120 HalPollMethod pollMethod; 00121 }; 00122 00123 } /* namespace HAL */ 00124 00125 #endif /* __PollItemCommand */ 00126