[Tinyos-help] Interfaces

antonio gonga ask25019fe at hotmail.com
Tue Jan 2 10:05:49 PST 2007


Hey all,
I'm having a little problems with my project.. please does anyone know how I 
can overcome this problem? view code please.
Can I use an Interface that I implement in the same program that I'm 
implementing it??
ex:
CONFIGURATION>>>
configuration Example{
   provides interface SendB;
}
implementation{
  Components Main, ExampleM;

   Main.StdControl-> ExampleM.StdControl;
   SendB = ExampleM.SendB;

}
----------------------------------------------
MODULE>>>>
includes xpto;
module{
   provides{
        interfaces StdControl;
        interface SendB;
   }
  uses{
       interface SendB;
  }
}

implementation{

     STDControl //

     //I'm providing an interface to send some data(buffer) then I send 
buf[0], and buf[MAX]
     command result_t SendB.send(void *start, void* end){
         //code of interface
    }

     SOMEWHERE ELSE In COde

     call SendB.send(abc, cde);

   Is it Possible to Implement an interface and use it in the same code of 
program??

}

_________________________________________________________________
MSN Busca: fácil, rápido, direto ao ponto.  http://search.msn.com.br



More information about the Tinyos-help mailing list