getting_started:tutorials:hal0
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
getting_started:tutorials:hal0 [2019/09/19 12:05] – graf | getting_started:tutorials:hal0 [2024/12/01 12:01] (current) – [Accessing Output Signals Directly] ursgraf | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Using the HAL with the Simulator ====== | ====== Using the HAL with the Simulator ====== | ||
- | In the EEROS library you will find a directory with examples. Open a shell in the build directory of your EEROS library and run '' | + | The [[eeros_architecture: |
+ | |||
+ | In the EEROS library you will find a directory with examples. | ||
+ | |||
+ | Open a shell in the build directory of your EEROS library and run | ||
< | < | ||
$ ./halTest1 -c HalTest1Config.json | $ ./halTest1 -c HalTest1Config.json | ||
Line 12: | Line 16: | ||
===== Accessing Output Signals Directly ===== | ===== Accessing Output Signals Directly ===== | ||
- | A peripheral output block delivers a signal to external hardware. Its signal value can be accessed with a get method, see line 46 in the example code in '' | + | A peripheral output block delivers a signal to external hardware. Its signal value can be accessed with a get method, see line 41 in the comment |
+ | Alternatively the signal in the HAL could be accessed by getting an reference to the corresponding output block with | ||
+ | <code cpp> | ||
+ | auto digOut = hal.getLogicOutput(" | ||
+ | </ | ||
+ | The signal value can then be logged with | ||
+ | block with | ||
+ | <code cpp> | ||
+ | log.info() << digOut-> | ||
+ | </ | ||
+ | You have to make sure to access the output with non-exclusive rights, because the control system already has a handle to it, see line 25 in '' |
getting_started/tutorials/hal0.1568887516.txt.gz · Last modified: 2019/09/19 12:05 by graf