| | 1 | = Task and Control Graph = |
| | 2 | |
| | 3 | As the main data flow should go through MwMr, interconnecting the tasks should make a graph. |
| | 4 | |
| | 5 | A Tcg is the overview of your application. It defines what are the instanciated tasks, and how they interact. |
| | 6 | |
| | 7 | {{{ |
| | 8 | task_instance1 = Task("instance_name1", task_model1, { .. }) |
| | 9 | task_instance2 = Task("instance_name2", task_model2, { .. }) |
| | 10 | task_instance3 = Task("instance_name3", task_model3, { .. }) |
| | 11 | |
| | 12 | tcg = Tcg(task_instance_1, |
| | 13 | task_instance_2, |
| | 14 | task_instance_3) |
| | 15 | }}} |
| | 16 | |
| | 17 | It will probably be easier to do instanciation directly: |
| | 18 | |
| | 19 | {{{ |
| | 20 | tcg = Tcg( Task("instance_name1", task_model1, { .. }), |
| | 21 | Task("instance_name2", task_model2, { .. }), |
| | 22 | Task("instance_name3", task_model3, { .. }) ) |
| | 23 | }}} |
| | 24 | |
| | 25 | == Accessing data == |
| | 26 | |
| | 27 | If you need reference to a resource or a task instance later (for example for [wiki:DsxMapping mapping]), you may refer to them by name: |
| | 28 | |
| | 29 | {{{ |
| | 30 | task_obj = tcg["instance_name1"] |
| | 31 | mwmr_obj = tcg["fifo1"] |
| | 32 | }}} |