[Tinyos-help] Wiring parameterised interfaces
Brian Mulanda
bmulanda.tinyos at gmail.com
Wed Aug 1 19:55:41 PDT 2007
This could solidify your understanding on how to work with parameterized
interfaces:
http://nescc.sourceforge.net/papers/nesc-ref.pdf
-Brian
On 7/31/07, Yong, Chee Yeew <Chee-Yeew.Yong at thalesgroup.com> wrote:
>
> Hello all,
>
> I am having a bit of a problem wiring parameterised interfaces. The
> program
> is as below.
>
> I keep getting the error:
> "MyTimers.start() not connected".
>
> I am not sure why it is complaining when I clearly have MyTimers wired in
> the Configuration file.
> My environment is Cygwin with TinyOS 1.1.10.
>
> Thanks for any help/advice.
>
> Regards,
> Chee
>
> =========================================
> Configuration file (TestC.nc):
> configuration TestC {
> }
> implementation {
> components Main, TestM, TimerC;
> Main.StdControl -> TestM;
> TestM.MyTimers[0] -> TimerC.Timer[unique("Timer")];
> TestM.TimerControl -> TimerC;
> }
>
> ==========================================
> Module file (TestM.nc):
> module TestM {
> provides interface StdControl;
> uses {
> interface Timer as MyTimers[uint8_t tid];
> interface StdControl as TimerControl;
> }
> }
> implementation {
> event result_t MyTimers.fired[uint8_t tid]() {
> return SUCCESS;
> }
>
> command result_t StdControl.init() {
> return call TimerControl.init();
> }
>
> command result_t StdControl.start() {
> call TimerControl.start();
> call MyTimers.start[0](TIMER_ONE_SHOT, 1000);
> return SUCCESS;
> }
>
> command result_t StdControl.stop() {
> return SUCCESS;
> }
> }
>
>
> *******************************************************************************
> Please consider the environment before printing this email.
>
> *******************************************************************************
> This email and any files transmitted with it are intended solely for the
> use of
> the individual or entity to whom they are addressed and may not be
> divulged to
> any third party without the express permission of the originator. Any
> views
> expressed in this message are those of the individual sender, except where
> the
> sender specifically states them to be the views of Thales Research &
> Technology
> (UK) Limited.
>
> *******************************************************************************
>
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20070801/1d85f6ab/attachment.htm
More information about the Tinyos-help
mailing list