Generic hardware access library
/home/cschwick/hal/generic/include/hal/CommandSequencer.hh
Go to the documentation of this file.
00001 #ifndef __CommandSequencer
00002 #define __CommandSequencer
00003 
00004 #include <string>
00005 #include <vector>
00006 #include <map>
00007 
00008 #include "hal/CommandSequence.hh"
00009 #include "hal/HardwareDeviceInterface.hh"
00010 #include "hal/IllegalValueException.hh"
00011 #include "hal/SequencerSyntaxError.hh"
00012 #include "hal/BusAdapterException.hh"
00013 #include "hal/TimeoutException.hh"
00014 
00015 namespace HAL {
00016 
00017 class CommandSequencer {
00035 public:
00036 
00037   virtual ~CommandSequencer() {}
00038 
00051   virtual void registerSequence( CommandSequence& sequence );
00052 
00059   void run(std::string sequenceName, 
00060            const HardwareDeviceInterface& device) const 
00061     throw (IllegalValueException, 
00062            SequencerSyntaxError,
00063            IllegalOperationException,
00064            BusAdapterException,
00065            MaskBoundaryException,
00066            TimeoutException );
00067 
00071   std::vector<std::string> getNameVector() const;
00072 
00078   virtual void deleteSequence( std::string sequenceName )
00079     throw( IllegalValueException );
00080 
00086   virtual void deleteSequences() ;
00087 
00091   void rescan( std::string sequenceName )
00092     throw (IllegalValueException,
00093            NoSuchItemException,
00094            SequencerSyntaxError);
00095 
00101   CommandSequence& getSequence( std::string sequenceName )
00102     throw( IllegalValueException );
00103 
00104 private:
00105   std::map<std::string, CommandSequence*> sequenceMap;
00106 };
00107 
00108 } /* namespace HAL */
00109 
00110 #endif /* __CommandSequencer */