Dear Michael,

Actually what I need to is sending some bytes to the simulator, not on the
mote, coz we are trying to do some testing job
on some nesC programs. More specifically, we first try to instrument some
faults to some nesC programs, then we want to run it
in the simulator coz we want online data that can be sent to PC, like say
the original nesC code is
                             if a<3 then do B;...
but after instrument, the predicate in faulted version might become
                             if a>3 then do B;
                             //new added
                             send_to_PC(a)...;

then after sending a from the simulator to the PC side, we will have other
programs that to justify the faults, and there are many such
send_to_PC(x) calls will be made, therefore, if we keep running programs in
the mote, it would be time costly. So we prefer to use simulator.

And my problems is I have successfully changed the oscilloscope program to
another nesC program that can send data to PC, but the program for
instrument is written in C, and the program has to called my function
send_to_PC which is written in nesC, I know nesC can call external C
function,
but I have never heard C can call nesC functions.

Therefore, I have to write a program in C to send byte data to the simulator
which I am not getting stuck on this part, one month has been passed, and I
got no progress. I really hope any of you guys can help me out with this,
because I believe once we successfully make this, it would make a more
easier
way for testers to test nesC programs.

I would be very appreciated if you guys help me out with this, I have post
questions for many times, but I always got no reply, that may be my
expression
in questions is not good, but hopefully this time you guys can understand
what I wanna do. If not, please feel free to ask me, I will try to explain
it in a more
detailed way.

Thanks in advanced, PLEASE DO help me >.<




On 10/18/07, Michael Schippling <[EMAIL PROTECTED]> wrote:
>
> 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
>



-- 
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

Reply via email to