Title: Message
SerialForwarder is setup to receive packets of length 29.   The key is to edit the net.tinyos.message.BaseTOSMsg class, or create a new one using mig.  I would recommend creating a new class - but you should be careful doing this because you can really mess things up.  Just make sure you have a backup of BaseTOSMsg.java and BaseTOSMsg.class before continuing incase something goes wrong.
 
in your tos/platforms/Micaz/ directory, use the following command:
 
mig java -java-classname=net.tinyos.message.BaseTOSMsg AM.h TOS_Msg -o BaseTOSMsg.java
 
That will create a new BaseTOSMsg.java file in your /tos/platforms/MicaZ directory.  Next, you'll need to remove the 'static' keyword from the following methods inside the .java file:
 
totalSize_data()
totalSizeBits_data()
numElements_data()
numElements_data(int dimension)
offset_crc()
offsetBits_crc()
 
Save the file.  You can compile it here or in the /tools/java/net/tinyos/message directory -  just type the command:
 
javac BaseTOSMsg.java
 
This will make BaseTOSMsg.class.  Copy the BaseTOSMsg.class file into the /tools/java/net/tinyos/message directory.  If you get compile errors, fix them the best you can.  Like I said, the only things you should have to change in that file are the static keywords on those methods I mentioned.
 
Now you have a BaseTOSMsg class that is setup to receive the TOS message type defined in the TOS_msg structure in your micaz/am.h file.
 
Goodluck,
-david
 
 
 -----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lima GANSE Kenneth
Sent: Wednesday, February 15, 2006 5:09 AM
To: [email protected]
Subject: [Tinyos-help] Increasing the length of data packets

Hi all,

I am currently trying to increase the length of my TOS data packet from the standard 29 to 59. I have changed the TOSH_DATA_LENGTH in tos/platforms/Micaz/AM.h accordingly, but the serial forwarder still cannot receive it. Any quick help on this will be greatly appreciated.

Regards

Kenneth

_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to