Hi guys, I\'m trying to implement a generic data structure in nesC... just like a Vector in java. Now, since nesC doesn\'t support dynamic allocation of memory, I\'m thinking to fix the data structure size at compilation time. But, actually there is another issue: how to implement a component able to store uint16, int16, bool, and so on, without code replication? I read something about generic component in the TinyOS 2.0 Programming guide... I analized BitVectorC, in which is it used the \'typedef\' keyword... but, you know, implementing a generic data structure you of course need a kind of \"elementAt(index)\" function... so, right now I don\'t know what return type I have to use... Note that I want to give my component the skill to store different element type, simply setting the type itself at compilation time; in other words, I don\'t need to store in the same component instance, i.e., some bool, some uint32 and finally some int16!
So, anyone has some suggestion to give me?! Thank you very much, Antonio -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Vuoi ascoltare i tuoi MP3 in auto anche se la tua autoradio non lo permette? Con HEMP3CAR puoi collegare il tuo IPOD o la tua Pen Drive direttamente alla tua vecchia autoradio! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6591&d=20070521
_______________________________________________ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help