Link-chain Framework
This framework is developed (as an example) so that it becomes easier for the individual modules to integrate themselves
with others, create a chain of different modules and test them together for a particular use case. It is based on few
assumptions and may not be suitable for all possible use cases.
A link is a stand-alone independent task which is created on top of a specific module (like capture, scalar, noise
filter etc) and is meant to perform a predefined operation. For e.g. the display link will only take care of the display
related functionalities, a noise-filter link will only look towards noise filtering etc.
A chain is a set of links joined together to perform a complete sequence of operations desired for the specific use
case. For e.g. capture and display links can be joined to form a chain which will capture frames from the input source
and display them on the connected output.
During initialization, each link registers itself with this framework and then creates its own individual task. This
task listens to the incoming messages and takes the appropriate actions.
Each link accepts messages from the previous link(s) (the only exception is capture link) and sends output to the
connected link(s) (an exception is display). The link is informed by its predecessor link once the data is available for
its use. The link can then start processing the data and once it is done, it informs the next link. The next connected
link in the chain will then start processing the data and the process continues.
1)System_linkCreate() API. Links MUST be created in the order of source link to sink link.
2)Next the chain is started by calling System_linkStart() for each link in the chain.The links are started in the order of sink link to source link. This is not a hard requirement but is usually desired in the application, since this allows all links to get ready to receive input before the source link itself is started.
3)After the user is done with a chain he can stop it by calling System_linkStop() API for each link of the chain.A chains MUST be stopped in the order of source to sink.