Downsample class public functions
Additional functions inherited from
Filter.
- DownSample(int aPeriod);
- Sets the new sample update to aPeriod. The next sample tick
will update the upstream connections, and they will remain
constant until a multiple of the sample period is reached.
- ~DownSample();
- Does nothing.
- void action(void);
- updates all upstream signals if periodCounter % period == 0.
- int getPeriod(void);
- Returns the period of the DownSampler.
- sampleType output(int index);
- Returns the value of the signal connected to the specified
input channel.
- void setPeriod(int aPeriod, int counter = -1);
- Sets the period of the Downsampler. If counter >= 0, then
the counter will be set to counter. If counter = 0,
then upstream signals will be updated at the next tick. If
counter = -1, then the current value of the counter will be
unaffected.
- void tick(int newTickNumber);
- Overrides the tick() function of the Filter class. Prevents
updating the upstream signals unless the period counter is
a multiple of the period of the downsampler.
- void trigger(int counter = 0);
- Resets the downsamper counter and if counter = 0, then the
next tick or action will update the upstream signals.