EEROS  0.4.1.0
API for the EEROS Real-Time Robotics Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SysFsDigIn.hpp
Go to the documentation of this file.
1 #ifndef ORG_EEROS_HAL_SYSFSDIGIN_HPP_
2 #define ORG_EEROS_HAL_SYSFSDIGIN_HPP_
3 
5 #include <fstream>
6 #include <string>
7 
8 namespace eeros {
9  namespace hal {
10  class SysFsDigIn : public PeripheralInput<bool> {
11  public:
12  SysFsDigIn(std::string id, 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_ */
Definition: PeripheralInput.hpp:15
~SysFsDigIn()
Definition: SysFsDigIn.cpp:33
Definition: SysFsDigIn.hpp:10
SysFsDigIn(std::string id, unsigned int gpio, bool inverted=false)
Definition: SysFsDigIn.cpp:6