A task does not take any parameters and also does not return any value.
There is no reason for having parameter in the task when it could not be
public. That is, you cannot define a task in TinyOS interface.
Hence if task is alway private to a module then you should simply define
parameters in the modules you are using.
Hence do following.
module {
...
} implementation {
bool recib, int tipo_mensaje;
...
task void sendSerialMsg() {
}
}
Faisal
Jordi Pérez wrote:
> Dear All,
>
> I would like to declare a task with parameters. Something like this '
> task void sendSerialMsg(bool recib, int tipo_mensaje) ', but in my
> case it doesn't work.
> Is it possible to declare parameters in a task? I think yes, but I am
> not sure.
>
> When I compile the code, I have an error :
> ' WsnAplicationP.nc:357: `sendSerialMsg' declared as a task with
> parameters '
>
> Could anyone help me, please?
>
> Thanks a lot
>
> Best wishes!
>
> Jordi
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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