User Tools

Site Tools


eeros_architecture:control_system:available_blocks:peripheralinput

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
eeros_architecture:control_system:available_blocks:peripheralinput [2021/05/16 14:28] ursgrafeeros_architecture:control_system:available_blocks:peripheralinput [2021/05/28 13:40] (current) ursgraf
Line 1: Line 1:
 ====== Peripheral Input ====== ====== Peripheral Input ======
-This block allows to read a signal from some hardware source. This could be a simple digital input or a multidimensional vector of real values. Such a block will always read from an input defined in the [[eeros_architecture:hal:start|]].+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 [[eeros_architecture:hal:start|]].
 The constructor of this block looks like  The constructor of this block looks like 
 <code cpp> <code cpp>
-PeripheralInput(std::string id);+PeripheralInput(std::string id, bool exclusive = true); 
 +</code> 
 +As a parameter you must indicate the designator of the corresponding input in the [[eeros_architecture:hal:start|]]. Please make sure that the name is identical to the name in the [[eeros_architecture:hal:start|]]. 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  
 +<code cpp> 
 +PeripheralInput<> position("anIn0"); // anIn0 must be defined in hardware configuration file 
 +PeripheralInput<bool> switch("dIn2"); // dIn2 must be defined in hardware configuration file
 </code> </code>
-As a parameter you must indicate the designator of the corresponding input in the [[eeros_architecture:hal:start|]]. Please make sure that the name is identical to the name in the [[eeros_architecture:hal:start|]]. If not the constructor will throw a fault. 
eeros_architecture/control_system/available_blocks/peripheralinput.1621168093.txt.gz · Last modified: 2021/05/16 14:28 by ursgraf