Have you tried with the latest version from CVS?

On Thu, Jun 19, 2008 at 9:51 PM, Elvar Ólafsson <[EMAIL PROTECTED]> wrote:

> Hi.
>
> The output in our first message is the stacktace from gdb. Our simulation
> runs for quite some time before segfaulting. We have no idea why it fails in
> that sim_noise.c file. We are running TinyOS 2.0.2 if that is any help.
>
> Hope you can help us with this.
>
> With regards,
> Elvar and Henrik
>
>
> On Fri, Jun 20, 2008 at 3:32 AM, Philip Levis <[EMAIL PROTECTED]> wrote:
>
>>
>> On Jun 18, 2008, at 1:36 AM, Elvar Ólafsson wrote:
>>
>>  Thank you for your response.
>>>
>>> We think we are adding more than 100 noise readings. We are using the
>>> meyer-heavy.txt that comes with the TOS distribution to add noise
>>> readings.
>>>
>>> Our driver cpp program can be seen below. Any ideas or obvious flaws in
>>> that
>>> respect?
>>>
>>> Again, any help is appreciated.
>>>
>>>
>>> #include <tossim.h>
>>> #include <stdlib.h>
>>> #include <iostream>
>>> #include <fstream>
>>> #include <sstream>
>>>
>>> using namespace std;
>>>
>>> int main(int argc, char *argv[])
>>> {
>>>
>>>  Tossim* t = new Tossim(NULL);
>>>  Radio* r = t->radio();
>>>
>>>  FILE* pFile;
>>>  pFile = fopen("topo.txt", "r");
>>>
>>>  int source = 0;
>>>  int dest = 0;
>>>  float gain = 0.0;
>>>
>>>
>>>  while((fscanf(pFile, "%u %u %f", &source, &dest, &gain)) != EOF)
>>>  {
>>>    r->add(source, dest, gain);
>>>  }
>>>
>>>  FILE* pFile1;
>>>  pFile1 = fopen("meyer-heavy.txt", "r");
>>>  int noise = 0;
>>>
>>>  while((fscanf(pFile1, "%d", &noise)) != EOF)
>>>  {
>>>    for(int i = 0; i < 6; i++)
>>>    {
>>>      t->getNode(i)->addNoiseTraceReading(noise);
>>>    }
>>>  }
>>>
>>>  for(int i = 0; i < 6; i++)
>>>  {
>>>    t->getNode(i)->createNoiseModel();
>>>  }
>>>
>>>  int startTime = 1000;
>>>  for(int i = 0; i < 6 ; i++)
>>>  {
>>>    t->getNode(i)->bootAtTime(startTime);
>>>    startTime += 100;
>>>  }
>>>
>>>  while(true)
>>>  {
>>>    t->runNextEvent();
>>>  }
>>>
>>>  return 0;
>>> }
>>>
>>>
>>>
>>> On Tue, Jun 17, 2008 at 6:12 PM, Paul Stickney <[EMAIL PROTECTED]>
>>> wrote:
>>> Ensure that you are adding 100 noise trace readings before trying to
>>> build a model.
>>>
>>>
>> Can you run it in gdb and figure out what's wrong?
>>
>> Phil
>
>
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Morten Hansen, http://mortent.dk
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to