I don't know from TOSSIM, but on real motes the low-level code starts
around UARTM.nc. I don't know if there is an equivalent for the simulator
as it looks like your packet_sim.c file plugs in at a higher level.

But I'm a bit unclear on the purpose. Do you want to write a mote
program that implements a lower level 'protocol' like just sending
some bytes, or are you trying to make a host-side program to talk
to the motes?

MS

Chan kenniel wrote:
Dear all,
Currently, I have successfully use the nesC program Oscilloscope to send TOS_Msg to TOSSIM, and this is done by calling the UARTSend.send function in interface BareSendMsg. However, what I am trying to do is creating my own send function that is written in C program, that means I have to find the root of the BareSendMsg to see the C source code. And I found that the root is actually a PCradio.h file located in tos/platform/pc, and they actually call the TOSH_uart_send function to send the message, but in the TOSH_uart_send function, it calls other functions
located in packet_sim.c, and they are a bit complicated.
Actually what I trying to ask is if I want to write an own C program that send TOS_Msg to serial port, how far should I go? Can I just use the TOSH_uart_send function that provided in PCradio.h file? or should I have to go deep to packet_sim.c and analyze the whole logic and relations about functions? Can anyone give me any help please? Thanks in advanced.

--
Best wishes,
Kenneth Chan

------------------------
Wish you have a good day!


------------------------------------------------------------------------

_______________________________________________
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

Reply via email to