On Jun 17, 2010, at 2:11 AM, LIU Yu wrote: > TOSSIM programs can invoke C functions, which means they can do > anything and everything like reading data files or interacting with a > synthetic data generator. In this regard, to create a simulation-only > module implementing the Read interface is *possible* at all. > > Here is the outlined recipe: > 1. create a C module (i.e. sim_sensor.c) that provides routines for > accessing data sources (i.e. a C functions like > "read_data_file(moteid, timeslot)"); > 2. create a nesC module (i.e. SimSensor) that implements the Read > interface, which calls the C module; > 3. compile / link the C module into your TOSSIM program (by hacking > the app's local Makefile);
Yeah, this is the right way to do it. For step 3, you can just tweak your tos/lib/tossim/tos.h to add another #include. Phil _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
