EEROS  1.0.0.0
API for the EEROS Real-Time Robotics Framework
Output.hpp
Go to the documentation of this file.
1 #ifndef ORG_EEROS_HAL_OUTPUT_HPP_
2 #define ORG_EEROS_HAL_OUTPUT_HPP_
3 
4 #include <eeros/core/System.hpp>
5 #include <string>
6 
7 namespace eeros {
8  namespace hal {
9 
11  public:
12  virtual ~OutputInterface() { }
13  virtual std::string getId() const = 0;
14  virtual void* getLibHandle() = 0;
15  };
16 
17  template <typename T>
18  class Output : public OutputInterface {
19  public:
20  explicit Output(std::string id, void* libHandle) : id(id), libHandle(libHandle) { }
21  virtual ~Output() { }
22  virtual inline std::string getId() const { return id; }
23  virtual T get() = 0;
24  virtual void set(T value) = 0;
25  virtual void setTimestampSignalIn(uint64_t timestampNs) { return; }
26  virtual void *getLibHandle() { return libHandle; }
27  private:
28  std::string id;
29  void *libHandle;
30  };
31 
32  };
33 };
34 
35 #endif /* ORG_EEROS_HAL_OUTPUT_HPP_ */
virtual std::string getId() const
Definition: Output.hpp:22
virtual void * getLibHandle()
Definition: Output.hpp:26
Definition: Output.hpp:10
virtual ~Output()
Definition: Output.hpp:21
Output(std::string id, void *libHandle)
Definition: Output.hpp:20
Definition: Config.hpp:14
virtual void setTimestampSignalIn(uint64_t timestampNs)
Definition: Output.hpp:25
virtual ~OutputInterface()
Definition: Output.hpp:12
Definition: Output.hpp:18
virtual void * getLibHandle()=0
virtual std::string getId() const =0