In the Kata we're writing a Tool that's collecting data from a running Sound. The Tool and Sound communicate through !EventValues. The Sound will fire off a data capture event fairly sparsely. Maybe 20 events per second with events not usually closer than 20ms apart.
The !Write event would go high for a single Capytalk cycle (ie 1ms) and then we'd read off the values of 2 other !EventValues.
We tried to write the Tool in an event driven paradigm, with StepIntervalInMilliseconds set to 1000, and StepWhenChanged enabled for our key !EventValues.
At the moment we're doing very little in the Tool - putting the values into an OrderedCollection and displaying them once the Sound has finished it's process - and we're missing most of the events.
If the !Write event is 1ms long then we will often miss all of the events or just capture 1 or 2 out of about 40.
Using turnOnFor: we've extended the length of the !Write event. We've tried values around 20ms up to 200ms. We capture more events, to some extent, as we increase the gate time, but not reliably and the sampled values of the other !EventValues we save are never the same.
Have we forgotten to configure the Tool in some basic way? Is there a good pattern for writing event driven Tools?
The tool - work in progress.