EEROS  0.4.1.0
API for the EEROS Real-Time Robotics Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
HAL.hpp
Go to the documentation of this file.
1 #ifndef ORG_EEROS_HAL_HAL_HPP_
2 #define ORG_EEROS_HAL_HAL_HPP_
3 
4 #include <string>
5 #include <map>
6 #include <unordered_set>
9 
10 namespace eeros {
11  namespace hal {
12 
13  class HAL {
14  public:
15  PeripheralOutputInterface* getPeripheralOutput(std::string name, bool exclusive = false);
16  PeripheralOutput<bool>* getLogicPeripheralOutput(std::string name, bool exclusive = false);
17  PeripheralOutput<double>* getRealPeripheralOutput(std::string name, bool exclusive = false);
18  PeripheralInputInterface* getPeripheralInput(std::string name, bool exclusive = false);
19  PeripheralInput<bool>* getLogicPeripheralInput(std::string name, bool exclusive = false);
20  PeripheralInput<double>* getRealPeripheralInput(std::string name, bool exclusive = false);
21 
24 
25  bool readConfigFromFile(std::string file);
26 
27  static HAL& instance();
28 
29  private:
30  HAL();
31  HAL(const HAL&);
32  HAL& operator=(const HAL&);
33 
34  bool loadModule(std::string moduleName);
35 
36  std::unordered_set<PeripheralOutputInterface*> exclusiveReservedOutputs;
37  std::unordered_set<PeripheralInputInterface*> exclusiveReservedInputs;
38 
39  std::map<std::string, PeripheralInputInterface*> inputs;
40  std::map<std::string, PeripheralOutputInterface*> outputs;
41  };
42 
43  };
44 };
45 
46 #endif /* ORG_EEROS_HAL_HAL_HPP_ */
PeripheralOutput< bool > * getLogicPeripheralOutput(std::string name, bool exclusive=false)
Definition: HAL.cpp:45
PeripheralInputInterface * getPeripheralInput(std::string name, bool exclusive=false)
Definition: HAL.cpp:63
Definition: HAL.hpp:13
bool addPeripheralInput(PeripheralInputInterface *systemInput)
Definition: HAL.cpp:26
PeripheralInput< bool > * getLogicPeripheralInput(std::string name, bool exclusive=false)
Definition: HAL.cpp:67
Definition: PeripheralOutput.hpp:10
PeripheralOutputInterface * getPeripheralOutput(std::string name, bool exclusive=false)
Definition: HAL.cpp:41
std::ifstream file
Definition: MatrixOperations.cpp:29
PeripheralInput< double > * getRealPeripheralInput(std::string name, bool exclusive=false)
Definition: HAL.cpp:76
static HAL & instance()
Definition: HAL.cpp:11
bool addPeripheralOutput(PeripheralOutputInterface *systemOutput)
Definition: HAL.cpp:33
bool readConfigFromFile(std::string file)
Definition: HAL.cpp:16
Definition: PeripheralInput.hpp:8
PeripheralOutput< double > * getRealPeripheralOutput(std::string name, bool exclusive=false)
Definition: HAL.cpp:54