User Tools

Site Tools


eeros_architecture:control_system:available_blocks:peripheralinput

Peripheral Input

This block allows to read a signal from some hardware source. This could be a simple digital input or an analog input. Such a block will always read from an input defined in the Hardware Abstraction Layer. The constructor of this block looks like

PeripheralInput(std::string id, bool exclusive = true);

As a parameter you must indicate the designator of the corresponding input in the Hardware Abstraction Layer. Please make sure that the name is identical to the name in the Hardware Abstraction Layer. If not the constructor will throw a fault. A second optional parameter indicates if the input has exclusive rights on the signal defined in the HAL. Create a new input with

PeripheralInput<> position("anIn0"); // anIn0 must be defined in hardware configuration file
PeripheralInput<bool> switch("dIn2"); // dIn2 must be defined in hardware configuration file
eeros_architecture/control_system/available_blocks/peripheralinput.txt · Last modified: 2021/05/28 13:40 by ursgraf