Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
beansdoc [2011/01/05 11:28] hourdin More basic beans |
beansdoc [2011/01/05 12:02] hourdin Threshold doc |
||
---|---|---|---|
Line 39: | Line 39: | ||
==== Counter ==== | ==== Counter ==== | ||
+ | |||
+ | This integer counter increments its internal value when the **Increment()** input method is called. It sends a //void// event indicating that its value has changed, and provides an //integer// property (Value) and thus the **get_Value()** property getter method to retrieve the value of the internal counter. | ||
+ | |||
+ | Moreover, it has the ability to apply a modulo to the incrementing internal counter. This can be useful to make binary counters (modulo = 2) for example. In this case, when the counter comes back to 0, the Carry event is raised, allowing to cascade the counters when a modulo is used, and create a multi-bit counter for example. The value of the modulo is parametrized by the **Modulo** property. | ||
+ | |||
+ | * **Increment()**: input method, incrementing the internal counter value. | ||
+ | * **^ValueChanged**: //void// notification of incrementation. Use the **get_Value()** property getter as callback value to complete integer method calls. | ||
+ | * **^Carry**: //void// notification of reset of the counter value because of modulo value reaching. | ||
+ | * **Reset()**: resets the counter, setting 0 for the internal value and sending the ValueChanged event //(introduced in version 870)//. | ||
==== EventFilter ==== | ==== EventFilter ==== | ||
Line 58: | Line 67: | ||
==== Threshold ==== | ==== Threshold ==== | ||
+ | |||
+ | This bean allows to filter a //string// event flow containing decimal numbers according to a minimal or maximal value of the decimal number. For example, it can allow events to be relayed only when the value in the string is higher than "17.2". | ||
+ | * **set_Value(**//string//**)**: input method of the bean, receiving the string containing the decimal number. | ||
+ | * **^CeilledValue**: the //string//: event emitted when the input value (of set_Value()) was higher than the threshold, or lower if the bean is inverted (Inverted property set to //true//). | ||
+ | * **^ThresholdReachedBool**: a //boolean// event sent when the input values cross the threshold level, up or down. The value of the event is //true// when the value is above and //false// when value is below the threshold. This behavior is inverted when the bean is inverted (Inverted property set to //true//). | ||
+ | * The **ThresholdValue** property parametrizes the value of the threshold that evaluates incoming events. | ||
==== ValueFormatter ==== | ==== ValueFormatter ==== |