Hi,

I am using tossim/tinyviz to simulate a small network of nodes running my application. I want to extract some statistics about transmitted packets in the network. The Tython manual gives a simple example for doing this. It suggests that doing a "print packets[3]" on Tython console will print out all the packets sent by mote 3. However, it is not working. When I issue a "print packets[1]"  I get an error

>>> print packets[1]
Traceback (innermost last):
  File "<input>", line 1, in ?
AttributeError: __getitem__

I get the same error whichever mote number I try. If however I just say "print packets" I get a long print out of packets like

Message <BaseTOSMsg>
  [addr=0xffff]
  [type=0x3f]
  [group=0x7d]
  [length=0x8]
  [data="" 0x0 0xa 0x0 0x2 0x0 0x3 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 ]
  [crc=0x0]
  [strength=0x0]
  [ack=0x1]
  [time=0x4600]
, , 1: Logged Packet [mote 1] [time 177269]

Can anyone suggest what I am doing wrong?
_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to