On Dec 20, 2006, at 12:23 AM, preeti k wrote:

Hello,

I have compiled the Blink application but an unable to run it.
After 'from tinyos.tossim import *' , when i say 't=tossim([])', i get an errot saying 'NameError: tossim not defined' In the tossim lesson i came across some python commands to get the variables. But here again i get error as follows:
******************
$ python
Python 2.3.4 (#1, Jun 13 2004, 11:21:03)
[GCC 3.3.1 (cygming special)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from tinyos.tossim.TossimApp import *
>>> n=NescApp()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
File "/opt/tinyos-2.x/support/sdk/python/tinyos/tossim/ TossimApp.py", line 494
, in __init__
    raise Exception("""\nERROR: cannot find file \"%s\".
Exception:
ERROR: cannot find file "app.xml".
Your nesC app cannot be imported. Be sure that you compiled with the "nescDecls
" option.
>>>

******************

Can someone please help me out with respect to running tossim?

Typing 'make micaz sim' will generate app.xml. Please read the section "Compiling TOSSIM" of the tutorial. You should see this in our compilation output:

          mkdir -p build/micaz
            placing object files in build/micaz
            writing XML schema to app.xml
            compiling BlinkAppC to object file sim.o

Note the third line: "writing XML schema to app.xml."

You need to be in the directory with app.xml, so the Python code can read it in to figure out what variables your application has.

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

Reply via email to