EEROS  1.0.0.0
API for the EEROS Real-Time Robotics Framework
SysFsDigIn.hpp
Go to the documentation of this file.
1 #ifndef ORG_EEROS_HAL_SYSFSDIGIN_HPP_
2 #define ORG_EEROS_HAL_SYSFSDIGIN_HPP_
3 
4 #include <eeros/hal/Input.hpp>
5 #include <fstream>
6 #include <string>
7 
8 namespace eeros {
9  namespace hal {
10  class SysFsDigIn : public Input<bool> {
11  public:
12  SysFsDigIn(std::string id, void* libHandle, unsigned int gpio, bool inverted = false);
13  ~SysFsDigIn();
14  virtual bool get();
15 
16  private:
17  bool inverted;
18  std::string basePath;
19  std::fstream valueFile;
20  };
21 
22  };
23 };
24 
25 #endif /* ORG_EEROS_HAL_SYSFSDIGIN_HPP_ */
~SysFsDigIn()
Definition: SysFsDigIn.cpp:33
Definition: Input.hpp:17
Definition: Config.hpp:14
Definition: SysFsDigIn.hpp:10
SysFsDigIn(std::string id, void *libHandle, unsigned int gpio, bool inverted=false)
Definition: SysFsDigIn.cpp:6