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];

I need to send the array to the PC for analyzing in my Java application.
I would like to send following message using SerialActiveMessageC:

typedef nx_struct neighborsMsg {
        neighbors_t neighbors[MAX_NEIGHBORS];
} neighborsMsg_t;

but this assignment did not work:

neighborsMsg_t* nmsg = (neighborsMsg_t*)(call
SerialPacket.getPayload(&pkt, sizeof(neighborsMsg_t)));

nmsg->neighbors = tableOfNeighbors;

resulting in:

invalid lvalue in assignment

Could anyone write me what is the best way how we can transfer arrays
from the nodes to the PC? Is it possible to send arrays in messages?

I would really appreciate any answer! I spent time searching google and
mailinglist.

Regards,
Martin
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to