[Tinyos-help] Sending array to the PC

2011-12-15 Thread Martin Stehlik
Hello! In my application, I have defined following structure: typedef nx_struct neighbors { nx_uint16_t id; // id of the neighbor nx_uint8_t rssi; // rssi of the signal received from neighbor } neighbors_t; Then, I have following array: neighbors_t tableOfNeighbors[MAX_NEIGHBORS

Re: [Tinyos-help] Sending array to the PC

2011-12-15 Thread Michael Schippling
This looks like a structure assignment which should copy between two pointers: nmsg->neighbors = tableOfNeighbors; but I think it might not work correctly with arrays. You probably need to do a memcpy() to get the contents of your table into the message. I'm a little rusty on my C pointers (to