Processing StrategiesΒΆ

Processing Strategies are the concept in CCA to ease the organization of the dynamic aspects of the processing graph. They allow to trigger processing of components based on fixed timing or incoming inputs.

CCA comes with a set of pre-defined processing strategies:

  1. Timed

    A component configured with Timed will listen to a beat provided by the framework and compute on every x-th beat. Configure by component->setProcessingStrategy(Timed::samplerate(2) for example to execute the component on very second beat.

  2. PortTriggered

    A component configured with PortTriggered will be triggered every time a new item arrives on the specified input port. Configure by component->setProcessingStrategy(PortTriggered::port("name") for example to execute the component if a new item arrives at port “name”.

  3. Moderate

    A component configured with Moderate will be triggered every time a new item had arrived on all input ports. Optionally you can define a timeout, after how many beats the component will be executed anyway. Configure by component->setProcessingStrategy(Moderate::timeout(10) for example to execute the component if new items arrived on all input ports, but execute anyway if this condition is not full-filled after 10 beats.

  4. Inactive

    A component configured with Inactive will be inactive and never be processed as long as it is configured this way. Not on incoming events and not timing-based.

  5. Restless

    A component configured with Restless will be triggered every time any new item had arrived on any input ports and on every incoming time signal. Note: The component may be processed very often and should not be used for computationally expensive components.

Table of Contents

Related Documentation

This Page