[Tinyos-help] Multiple instantiations of same component?

2006-02-23 Thread Nat Pryce
Is there any way to instantiate a component more than once?

I wrote a program that instantiated a TimerC component and connected
application components to it's Timer interfaces.  The program also
used the networking stack.  The app didn't work because the networking
stack used the same Timer interfaces as my application.  It took me
quite a while to work out that NesC doesn't behave like
component-based languages I'm used to.

Is it possible to create components that can be instantiated more than
once?  Or, is there a compile option that will fail the build (or at
least give a warning) if a component is instantiated multiple times?

--Nat.

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Multiple instantiations of same component?

2006-02-23 Thread Harri Siirtola


That's where you use parameterized interfaces i.e.

components TimerC;

implementation {
   MyApp.FirstTimer - TimerC.Timer[unique(Timer)];
   MyApp.SecondTimer - TimerC.Timer[unique(Timer)];
}

Note that all interfaces aren't parameterized, and you can't choose any 
string for unique. In Timer's case, Timer is the only string allowed.


HTH,

Harri

At 02:29 PM 2/23/2006 +, Nat Pryce wrote:

Is there any way to instantiate a component more than once?

I wrote a program that instantiated a TimerC component and connected
application components to it's Timer interfaces.  The program also
used the networking stack.  The app didn't work because the networking
stack used the same Timer interfaces as my application.  It took me
quite a while to work out that NesC doesn't behave like
component-based languages I'm used to.

Is it possible to create components that can be instantiated more than
once?  Or, is there a compile option that will fail the build (or at
least give a warning) if a component is instantiated multiple times?

--Nat.

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Problems building TinyDB app

2006-02-23 Thread Zhengsu Gao
Hi, I am also working on first step of tinydb. Just try to download the tinyos-1.1.11 packet. That works for me at least. Although I can compile with make mica2, it finally cannot get value from sensor. I guess we can share some information about this. We have to add new platform to tinydb.Anyone who can share the information is greatly appreciated.Zhengsu___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Need help for tinydb

2006-02-23 Thread Zhengsu Gao
hi, everybody:  I want to set up a fake data in sever mica2 motes and then query these mote from base to receive these data. But now I don't know how to program tinydb to set up the fake data in flash of the motes? Can anyone give me some suggestion? Thanks a lot. Best sazure ___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Why Surge can not do multi-hop?

2006-02-23 Thread Liangping Ma
Chalermphol,

You are right. With your help, I can now get a
multi-hop network running, and it also solves the
problems with Surge View and Mote View that I had
before.

Thanks a lot for your help.

- Liangping

--- Chalermphol Thammapalerd [EMAIL PROTECTED]
wrote:

 Hi Liangping,
 
 You need Surge_Reliable as id#0 for you baseStation
 not the TOSBase.
 also different id for other nodes.
 
 Good Luck,
 Chalermphol
 
 
 On 2/23/06, Liangping Ma [EMAIL PROTECTED] wrote:
 
  Hi everyone,
 
  I tried building a multi-hop network but could
 only
  build a 1-hop LAN. The network setup is as
 follows:
 
  PC--baseStationnode1node2
 
  The 3 nodes are almost on a straight line. The
  distances between the nodes are comparable. The
  baseStation is configured under /TOSBase, and the
  other two nodes are configured under
 /Surge_Reliable.
 
  When I move node2 a little bit farther, the link
  between the baseStation and node2 is broken. If I
 move
  node2 a little bit closer to the baseStation, then
  node2 gets directly connected to the baseStation.
 I
  just could not find a location for node2 so that
 node2
  uses node1 as a relay to talk to the baseStation.
 
  Using xlisten I find that node1 finds node2 as a
  neighbor.
 
  I got the following statistics from the Surge View
 GUI
  (double click a node, and then click on Link
  Information):
 
  Source Node ID:1
  Node ID: Quality Hop Count
  255  0.0%0
  210.196078...%   255
  00.0%0
  00.0%0
  00.0%0
 
  The Hop Count 255 looks fishy to me. Should it be
 0?
  Does anyone know where I am wrong?
 
  Thanks!
 
  - Liangping
 
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
 protection around
  http://mail.yahoo.com
  ___
  Tinyos-help mailing list
  Tinyos-help@Millennium.Berkeley.EDU
 

https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
 
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] TOSSIM-packet Segmentation fault

2006-02-23 Thread Philip Levis
On Thu, 2006-02-23 at 13:53 +, Helios Aliaga wrote:
 Hello
 
 When simulating Surge application with TOSSIM-packet I get
 
 Segmentation fault (core dumped)
 
 after the simulation runs for a few seconds.
 
 When using bit-level TOSSIM all work fine. Does anybody know what can
 be the problem when using TOSSIM-packet? Maybe, is it impossible to
 use TOSSIM-packet with this application?

Where does it segfault? It's been used pretty heavily for a couple of
years. That being said, I think that segfaults have been seen deep
within Cygwin that are not TOSSIM's fault when there's a problematic
installation.

Phil

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] TOSSIM-packet Segmentation fault

2006-02-23 Thread Dasarath Weeratunge
Quoting Philip Levis [EMAIL PROTECTED]:

I used TOSSIM packet and found out to my surprise that even after sendDone 
method is called, if I modify the contents of the packet (e.g. to reuse it) 
these changes are visible to the receiving node! May be I'm using an outdated 
implementation.

dasarath

 On Thu, 2006-02-23 at 13:53 +, Helios Aliaga wrote:
  Hello
  
  When simulating Surge application with TOSSIM-packet I get
  
  Segmentation fault (core dumped)
  
  after the simulation runs for a few seconds.
  
  When using bit-level TOSSIM all work fine. Does anybody know what can
  be the problem when using TOSSIM-packet? Maybe, is it impossible to
  use TOSSIM-packet with this application?
 
 Where does it segfault? It's been used pretty heavily for a couple of
 years. That being said, I think that segfaults have been seen deep
 within Cygwin that are not TOSSIM's fault when there's a problematic
 installation.
 
 Phil
 
 ___
 Tinyos-help mailing list
 Tinyos-help@Millennium.Berkeley.EDU
 https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
 



___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] TOSSIM-packet Segmentation fault

2006-02-23 Thread Helios Aliaga
Thanks for your reply and sorry about the blank email before.

The segfault doesn't seem to happen in any place in concrete.
I've run other applications without problems. I've also run Surge in
different computers with different TinyOS versions, and the segfault
is still there.
Do you think that the problem is on Cygwin then? Should using a Linux
computer work?

Has anyone managed to simulate Surge with TOSSIM-packet using Cygwin?

Helios Aliaga


2006/2/23, Philip Levis [EMAIL PROTECTED]:
 On Thu, 2006-02-23 at 13:53 +, Helios Aliaga wrote:
  Hello
 
  When simulating Surge application with TOSSIM-packet I get
 
  Segmentation fault (core dumped)
 
  after the simulation runs for a few seconds.
 
  When using bit-level TOSSIM all work fine. Does anybody know what can
  be the problem when using TOSSIM-packet? Maybe, is it impossible to
  use TOSSIM-packet with this application?

 Where does it segfault? It's been used pretty heavily for a couple of
 years. That being said, I think that segfaults have been seen deep
 within Cygwin that are not TOSSIM's fault when there's a problematic
 installation.

 Phil



___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Multiple instantiations of same component?

2006-02-23 Thread David Gay
On 2/23/06, Dasarath Weeratunge [EMAIL PROTECTED] wrote:
 Quoting Nat Pryce [EMAIL PROTECTED]:

 Check out parameterized interfaces.

and nesC 1.2 (well, 1.2.4 now), which has instantiatable components
(they are more template-like, FWIW).

David Gay

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] TOSSIM-packet Segmentation fault

2006-02-23 Thread Philip Levis
On Thu, 2006-02-23 at 22:04 +, Helios Aliaga wrote:
 Thanks for your reply and sorry about the blank email before.
 
 The segfault doesn't seem to happen in any place in concrete.
 I've run other applications without problems. 

By definition, a particular CPU instruction has to cause the segfault.
This means that it's within a particular function. What function is it
in?

Phil

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Re: Using multiple Timers

2006-02-23 Thread shubham mankhand
Hi,1. In the module file write  module xM  {   ...   uses{ interface Timer as Timer1; interface Timer as Timer2;   interface Timer as TimerN;   //and so on   }  }  implementation  {   //for each timer u use write its associated event handler event result_t TimeN.fired()   {   // Event Handler for Timer 1 through N;   }  }Now u can start and stop these timers by calling their respect start() and stop()  commands from the implementation codefor example  implementation  {  !
 
 command StdControl.start()   { call Timer1.start(TIMER_REPEAT, 1000);   .. call TimerN.start(TIMER_REPEAT, 5000);   }}Now comes the wiring part;Here we have to use parametrized interfaces [see TinyOS tutorial]In the top level configuration filewritexM.Timer1 - TimerC.Timer[unique("Timer")];   //Make sure to include TimerC in components.xM.TimerN - TimerC.Timer[unique("Timer")]; Information about unique( ) is in TinyOS tutorial.  Shubham
	
		 Yahoo! Mail 
Use Photomail to share photos without annoying attachments.___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help