Hi,

Firstly, There is no need of parameters for task.
Reason:
Task are local to a module. You cannot define a task in an interface and 
call from another module. Hence if task are local then there is really 
no need for parameter or return type.
You can use a module local variable in the task as parameters.

Secondly, Having parameters will make task scheduling memory inefficient.
Reason:
Let say that now we somehow have parameters for task. Then storing task 
for later execution by the TinyOS scheduler will be much less memory 
efficient. I guess that having no parameters make it much more memory 
efficient.

regards,

-- 
Faisal Aslam

University of Freiburg
http://cone.informatik.uni-freiburg.de/people/aslam/


Vikram vik76 wrote:
> Hello,
>
> I would like to understand why we don't have provision in tinyos for
> declaring tasks with input parameters.
> eg:
> task void taskname(uint8_t input1, uint8_t input2) { ... }
> where input1 and input2 are the two input parameters.
>
> Thanks
> Vikram
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
>   


_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to