I need to store some of the received information in the local node module
before broadcasting it.
implementation{
message_t pkt; //// to hold data for transmitting the packet
message_t store; /// to hold data for storing in local node module
event message_t* rreqreceiver.receive(message_t* msg, void* payload, uint8_t
len) {
RouteDiscovery_t *rd_msg = (RouteDiscovery_t*) payload;
RouteDiscovery_t *r_req = (RouteDiscovery_t*)(call Packet.getPayload(&pkt,
sizeof
(RouteDiscovery_t)));
r_req->nodeid=rd_msg->source;
/// codes to send packet (&pkt)
/// Here is my doubt, is this good way to store the received message
information in the local node module or is there any other approach to store
the received message
NodeCache_t *cache = (NodeCache_t*)(call Packet.getPayload(&store, sizeof
(NodeCache_t)));
cache->route=rd_msg=route_id;
}
}
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help