On Sun, Oct 28, 2012 at 12:02 PM, apscience <[email protected]> wrote:
> I greatly appreciate your offer for assistance. I found the issue, and > hopefully sharing my solution will help others in the future. > This issue has a very bizarre and seemingly arbitrary reason. If you could > shed light on why what happened happened I would be happy to try and > understand. > > The issue: > Type “socket” was defined like so: > typedef nx_int8_t socket; > nx_int8_t is defined to be typedef int8_t nx_int8_t __attribute__((nx_base_be(int8))); in /usr/lib/ncc/nesc_nx.h not sure what the __attribute__ does or how it hooks in. In the gdb debugger these things show up as byte arrays. a nx_int8_t shows up as a int8 b[1]. I suspect you ran into gcc doesn't like passing arrays so not sure why it used to work. > This definition was in an include file. > To fix all errors regarding events using this type, this line had to be > changed to the following: > typedef int8_t socket; > > As far as I can tell this change should have no effect on anything. > However, without this change I received a litany of compile errors pointing > at the interface file, and at the module file. > > Any explanations you could provide might help further my understanding of > nesC. > Also if you wish to investigate further I could still send you all related > files. > > Thank you, > Anthony > > *From:* Eric Decker <[email protected]> > *Sent:* Sunday, October 28, 2012 11:51 AM > *To:* apscience <[email protected]> > *Subject:* Re: [Tinyos-help] Signaling an event with paramaters in nesC > > devil is in the details and I would need the whole modules to decipher > what is going on. > > Just send it to me directly, not the whole list. > > On Sat, Oct 27, 2012 at 6:48 PM, apscience <[email protected]>wrote: > >> Whenever I add a line of code to one of my modules to signal an event >> I get an error pointing at the declaration of that signal saying it >> shouldn’t have parameters. Furthermore I get an error pointing at the line >> with the signal mentioning an implicit declaration. >> >> Here’s the line of code in the transportM module file: >> signal transport.closed(s,CLOSE_FAILEDTOCONNECT); >> >> The event declaration in an interface called “transport”: >> event void closed(socket closed, CloseReason reason); >> >> The relevant parts of the configuration file: >> configuration transportC{ >> provides interface transport; >> } >> implementation{ >> components transportM; >> components new TimerMilliC() as transportUpdate; >> >> transportM.transportUpdate -> transportUpdate; >> >> transport = transportM; >> } >> >> And finally the errors as they appear: >> /home/fire/workspace/Project 3/src/transport/transport.nc:24: error: >> expected ')' before 'closed' >> /home/fire/workspace/Project 3/src/NodeM.nc:228: error: expected ')' >> before 'closed' >> /home/fire/workspace/Project 3/src/transport/transport.nc:24: error: >> expected ')' before 'closed' >> /home/fire/workspace/Project 3/src/NodeM.nc:228: error: expected ')' >> before 'closed' >> /home/fire/workspace/Project 3/src/transport/transport.nc:24: error: >> expected ')' before 'closed' >> /home/fire/workspace/Project 3/src/transport/transportM.nc: In function >> 'transportM$transport$readTransportPacket': >> /home/fire/workspace/Project 3/src/transport/transportM.nc:235: warning: >> implicit declaration of function 'transportM$transport$closed' >> >> Any help or ideas would be appreciated. >> Thank you, >> Anthony >> >> >> >> _______________________________________________ >> Tinyos-help mailing list >> [email protected] >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> > > > > -- > Eric B. Decker > Senior (over 50 :-) Researcher > > > -- Eric B. Decker Senior (over 50 :-) Researcher
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
