beansdoc

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
beansdoc [2011/01/05 11:28]
hourdin More basic beans
beansdoc [2011/01/05 11:48]
hourdin Counter 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 ====
  • beansdoc.txt
  • Last modified: 2011/06/21 18:08
  • by hourdin