I am a little confused but I think you want to make a host side program to format and send messages to re-Motes. That program should be able to deal with a large number of different messages, or functions as you call them. I'm not sure if your program needs to be able to handle different platforms and system header types simultaneously, which could be a very difficult situation as there is nothing in the TOS messages that identifies those different header configurations (strangely enough I've just been wrassling with that question myself...). You probably need to decide what header set you are using ahead of time -- easier at compile time, a little harder at runtime. The program also seems to need to be able to deal with multi-part messages that are to big to fit in one TOS_Msg.
I also don't know what you mean by "Routing Stream" and "Data Stream". Are those different base station ports, or what? But your basic outline seems fairly straight-forward until you get to Packetizer. If that is the TOS Packetizer, it expects to get a message already formatted with the proper header for your system, I think either the mica2/serial AM.h or the micaz/telosb AM.h. Some of its behavior is controlled by the MOTECOM environment variable which may limit you to only one sort of header set per running program instance. In general you have to make up a buffer with the header and your user message before calling Packetizer. This means splitting large messages into smaller units before hand. So any message queuing needs to be done at a "user" level, although I would make a common queue module to handle it for everyone. Does any of this help? MS Amrit Kumar wrote: > > > Hi All, > > > > This is Amrit here. I need to design a module in Java namely – “Outgoing > unit” , the aim of which should be as listed below > > > > The purpose : WSN is deployed in the physical environment and I want to > control the behavior of nodes using a GUI from a central computer. I > understand that the following goes into the making of this system > > > > 1. The motes must be programmed to handle such message type from > beforehand (this can be done at nesc level) > > 2. What all functions should be addressed by the messages that are > sent to the from the computer… Ok I understand that this will be very > specific to the applications developed. > > > > So , can I just consider in general : let there be x OS – x header for > each x – y routing and for each x and y say f no of functions : for > each function I should know what stream of bytes I must send to the network > > > > Ok , so we have here > > > > 1. Choose platform – Tiny OS , or any x,y,z – the headers and the > sync bytes and packet formats must be decided here > > 2. Choose routing stream > > 3. Choose message type > > 4. Choose mote id > > 5. Choose Data Stream > > > > The routing stream and data stream will be application dependent or > better say function dependent > > > > Hence choose > > > > 1. Routing scheme – options ; a) Use existing Routing Scheme(rs) > b)Add new Routing scheme - Store and display the routing scheme byte stream > > 2. Data Stream – options ; a) use existing function stream b) Add > new function stream – Store and display the function stream byte > stream(here have to keep @ for already selected field in above 1-5.) > > 3. After choosing the function stream, routing stream , these > selected stream bytes must be sent to packetizer function > > 4. Role of Packetizer class > > 1. This comprises of functions to define the packet over different > platforms > > a. Tiny OS – calculate CRC etc > > b. Add platform Header > > c. Divide packets if the data is too long and add seq nos > > d. Return the complete packet array to the calling function > > 5. Once the Packet is generated it is sent to the base station > which relays the message to the motes in the network. > > This can be done in two ways – > > 1 . User takes care of the sync and conflicts and ensure that the > outgoing unit port is free > > 2. Dump data unit configured in such a way that it can queue outgoing > messages and send data to the base station > > > > > > > > Please give your opinion about the same and also how do I go about to do > the aforesaid aim. Even if it’s an entirely new perspective, please > enlighten me ,or if it’s some already done piece of work/tool , kindly > make me aware of it. > > > > Moreover, if you feel , I am terribly wrong somewhere , please comment. > > > > Thanks and Regards, > > Amrit Kumar > > > > > > > > > > **************** CAUTION - Disclaimer ***************** > This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely > for the use of the addressee(s). If you are not the intended recipient, > please > notify the sender by e-mail and delete the original message. Further, you are > not > to copy, disclose, or distribute this e-mail or its contents to any other > person and > any such actions are unlawful. This e-mail may contain viruses. Infosys has > taken > every reasonable precaution to minimize this risk, but is not liable for any > damage > you may sustain as a result of any virus in this e-mail. You should carry out > your > own virus checks before opening the e-mail or attachment. Infosys reserves > the > right to monitor and review the content of all messages sent to or from this > e-mail > address. Messages sent to or from this e-mail address may be stored on the > Infosys e-mail system. > ***INFOSYS******** End of Disclaimer ********INFOSYS*** > > > ------------------------------------------------------------------------ > > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
