On Thu, 2006-02-23 at 16:46 -0500, Dasarath Weeratunge wrote:
> Quoting Philip Levis <[EMAIL PROTECTED]>:
>
> I used TOSSIM packet and found out to my surprise that even after sendDone
> method is called, if I modify the contents of the packet (e.g. to reuse it)
> these changes are visible to the receiving node! May be I'm using an outdated
> implementation.
Are you talking about beta/TOSSIM-packet or pc/packet? I wrote the
former and Matt Welsh wrote the latter. The former definitely does not
have this behavior:
void event_start_transmit_handle(event_t* event, struct TOS_state*
state) __attribute__ ((C, spontaneous)) {
link_t* connectLink;
TOS_MsgPtr msg = packet_transmitting[NODE_NUM];
int transmitTime = (preambleLength + msg->length + headerLength);
bool ack = FALSE;
transmitTime *= byteTransmitTime;
connectLink = packet_connectivity[NODE_NUM];
msg->crc = 1;
dbg(DBG_PACKET, "SIM_PACKET: Transmitting, transmit time is %i.\n",
transmitTime);
while (connectLink != NULL) {
int mote = connectLink->mote;
// Can only receive a packet if you're not in transmit mode
event_t* recvEvent = (event_t*)malloc(sizeof(event_t));
IncomingMsg* msgEvent = (IncomingMsg*)malloc(sizeof(IncomingMsg));
msgEvent->fromID = NODE_NUM;
msgEvent->next = NULL;
nmemcpy(&msgEvent->msg, msg, sizeof(TOS_Msg));
as each receiver has a copy of the packet.
Phil
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help