ME 405 Romi
Loading...
Searching...
No Matches
basic_tasks Namespace Reference

Functions

 task1_fun (shares)
 Task which puts things into a share and a queue.
 task2_fun (shares)
 Task which takes things out of a queue and share and displays them.

Variables

 share0 = task_share.Share('h', thread_protect=False, name="Share 0")
 q0
 task1
 task2

Function Documentation

◆ task1_fun()

basic_tasks.task1_fun ( shares)

Task which puts things into a share and a queue.

Parameters
sharesA list holding the share and queue used by this task

Definition at line 19 of file basic_tasks.py.

◆ task2_fun()

basic_tasks.task2_fun ( shares)

Task which takes things out of a queue and share and displays them.

Parameters
sharesA tuple of a share and queue from which this task gets data

Definition at line 36 of file basic_tasks.py.

Variable Documentation

◆ q0

basic_tasks.q0
Initial value:
1= task_share.Queue('L', 16, thread_protect=False, overwrite=False,
2 name="Queue 0")
A queue which is used to transfer data from one task to another.
Definition task_share.py:90

Definition at line 63 of file basic_tasks.py.

◆ share0

basic_tasks.share0 = task_share.Share('h', thread_protect=False, name="Share 0")

Definition at line 62 of file basic_tasks.py.

◆ task1

basic_tasks.task1
Initial value:
1= cotask.Task(task1_fun, name="Task_1", priority=1, period=400,
2 profile=True, trace=False, shares=(share0, q0))
Implements multitasking with scheduling and some performance logging.
Definition cotask.py:66

Definition at line 70 of file basic_tasks.py.

◆ task2

basic_tasks.task2
Initial value:
1= cotask.Task(task2_fun, name="Task_2", priority=2, period=1500,
2 profile=True, trace=False, shares=(share0, q0))

Definition at line 72 of file basic_tasks.py.