EEROS  0.4.1.0
API for the EEROS Real-Time Robotics Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ComediDac.hpp
Go to the documentation of this file.
1 #ifndef ORG_EEROS_HAL_COMEDIDAC_HPP_
2 #define ORG_EEROS_HAL_COMEDIDAC_HPP_
3 
4 #include <string>
5 #include <comedilib.h>
8 
9 namespace eeros {
10  namespace hal {
11 
12  class ComediDac : public ScalablePeripheralOutput<double> {
13  public:
14  ComediDac(std::string id, ComediDevice* device, uint32_t subDeviceNumber, uint32_t channel, double scale = 1, double offset = 0);
15  virtual double get();
16  virtual void set(double value);
17 
18  void setVoltageRange(double minVoltage, double maxVoltage);
19  void setDacResolution(uint8_t bits);
20 
21  private:
22  comedi_t* deviceHandle;
23  uint32_t subDeviceNumber;
24  uint32_t channel;
25 
26  double maxVoltage;
27  double minVoltage;
28 
29  uint32_t maxValue;
30  };
31 
32  };
33 };
34 
35 #endif /* ORG_EEROS_HAL_COMEDIDAC_HPP_ */
Definition: ScalablePeripheralOutput.hpp:11
double offset
Definition: ScalablePeripheralOutput.hpp:23
ComediDac(std::string id, ComediDevice *device, uint32_t subDeviceNumber, uint32_t channel, double scale=1, double offset=0)
Definition: ComediDac.cpp:5
void setDacResolution(uint8_t bits)
Definition: ComediDac.cpp:38
void setVoltageRange(double minVoltage, double maxVoltage)
Definition: ComediDac.cpp:32
double scale
Definition: ScalablePeripheralOutput.hpp:22
virtual void set(double value)
Definition: ComediDac.cpp:25
Definition: ComediDevice.hpp:10
Definition: ComediDac.hpp:12