eeros_architecture:hal:start
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
eeros_architecture:hal:start [2017/04/30 10:25] – [Using HAL Objects] graf | eeros_architecture:hal:start [2017/11/30 19:42] – [Hardware Abstraction Layer] graf | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Hardware Abstraction Layer ====== | ====== Hardware Abstraction Layer ====== | ||
The HAL provides an interface between the robot control system (consisting of control system, safety system, and sequencer) and the hardware of the robot. Any signal from a hardware input or output must pass through the HAL. | The HAL provides an interface between the robot control system (consisting of control system, safety system, and sequencer) and the hardware of the robot. Any signal from a hardware input or output must pass through the HAL. | ||
+ | * [[eeros_architecture: | ||
* [[eeros_architecture: | * [[eeros_architecture: | ||
+ | * [[eeros_architecture: | ||
+ | * [[eeros_architecture: | ||
+ | * [[eeros_architecture: | ||
* [[eeros_architecture: | * [[eeros_architecture: | ||
* [[eeros_architecture: | * [[eeros_architecture: | ||
+ | * [[eeros_architecture: | ||
+ | * [[eeros_architecture: | ||
===== Configuration of the HAL ===== | ===== Configuration of the HAL ===== | ||
The inputs and outputs of the system are given by a specific hardware setup. This can vary widely among different systems. To account for many possible hardware settings we use a configuration file. This file describes the current hardware together with the necessary library to access them, see [[Configuration File]]. | The inputs and outputs of the system are given by a specific hardware setup. This can vary widely among different systems. To account for many possible hardware settings we use a configuration file. This file describes the current hardware together with the necessary library to access them, see [[Configuration File]]. | ||
Line 20: | Line 25: | ||
Now, you can pass the configuration file with | Now, you can pass the configuration file with | ||
< | < | ||
- | $ ./ | + | $ ./ |
- | $ ./ | + | $ ./ |
- | $ ./ | + | $ ./ |
- | $ ./ | + | $ ./ |
</ | </ | ||
This call causes the following actions: | This call causes the following actions: | ||
Line 31: | Line 36: | ||
* these objects will be registered in the HAL manager | * these objects will be registered in the HAL manager | ||
===== Available HAL Objects ===== | ===== Available HAL Objects ===== | ||
- | Hal objects are all the input and output channels given in the configuration above. You can use these objects | + | All input objects |
- | + | The following functions are available: | |
- | ===== Using HAL Objects ===== | + | |
- | Hal objects are all the input and output | + | |
- | ==== Inputs and Outputs | + | |
- | The safety system can check for each of its safety levels whether the level of certain channels meet given criterias. Such channels are called critical | + | |
- | The safety system will get a handle to tha HAL object with: | + | |
<code cpp> | <code cpp> | ||
- | | + | |
+ | Output< | ||
+ | ScalableOutput< | ||
+ | InputInterface* getInput(std:: | ||
+ | | ||
+ | ScalableInput< | ||
</ | </ | ||
- | Here, you get a reference to an digital input representing the emergency button. Please make sure that the id (" | ||
- | ==== Inputs and Outputs of the Control System ==== | ||
- | The control system can read from or write to the hardware solely through its [[eeros_architecture: | ||
- | |||
- | <code cpp> | ||
- | eeros:: | ||
- | eeros:: | ||
- | </ | ||
- | Please make sure that the ids (" | ||
- | |||
- | ==== Exclusive Access ==== | ||
- | Whenever you request an input or output from the HAL manager you will get exclusive access to this channel. This could be the safety system or the control system but not both. There might be a case where an input is a critical input to the safety system and at the same time serves as an input to to control system. In this case you can request the input with | ||
- | <code cpp> | ||
- | eeros:: | ||
- | </ | ||
- | Please keep in mind that whenever the safety system or the control system read from this input, the actual hardware is read for any access, which might take some time. | ||
- | It is possible to change the access privilege by releasing a channel and requesting it again, e.g. | ||
- | <code cpp> | ||
- | eeros:: | ||
- | HAL& hal = HAL:: | ||
- | hal.releaseInput(" | ||
- | eeros:: | ||
- | </ | ||
- | The latter example is a very uncommon case and might be useful for testing purposes. |
eeros_architecture/hal/start.txt · Last modified: 2019/03/26 11:39 by gehrig