[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/lqi
CollectionSenderP.nc, 1.1, 1.2 LqiForwardingEngineP.nc, 1.9,
1.10 LqiRoutingEngineP.nc, 1.6, 1.7
Phil Levis
scipio at users.sourceforge.net
Thu Sep 13 16:10:51 PDT 2007
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/net/lqi
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv27056/tos/lib/net/lqi
Modified Files:
CollectionSenderP.nc LqiForwardingEngineP.nc
LqiRoutingEngineP.nc
Log Message:
The big interface switchover for Packet, Send, Receive, and AMSend.
Index: CollectionSenderP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/lqi/CollectionSenderP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CollectionSenderP.nc 7 Apr 2007 01:58:05 -0000 1.1
--- CollectionSenderP.nc 13 Sep 2007 23:10:18 -0000 1.2
***************
*** 48,53 ****
}
! command void* Send.getPayload(message_t* m) {
! return call SubSend.getPayload(m);
}
--- 48,53 ----
}
! command void* Send.getPayload(message_t* m, uint8_t len) {
! return call SubSend.getPayload(m, len);
}
Index: LqiForwardingEngineP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/lqi/LqiForwardingEngineP.nc,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** LqiForwardingEngineP.nc 16 May 2007 19:07:19 -0000 1.9
--- LqiForwardingEngineP.nc 13 Sep 2007 23:10:18 -0000 1.10
***************
*** 125,129 ****
lqi_header_t* getHeader(message_t* msg) {
! return (lqi_header_t*) call SubPacket.getPayload(msg, NULL);
}
--- 125,129 ----
lqi_header_t* getHeader(message_t* msg) {
! return (lqi_header_t*) call SubPacket.getPayload(msg, sizeof(lqi_header_t));
}
***************
*** 436,441 ****
}
! command void* Send.getPayload(message_t* m) {
! return call Packet.getPayload(m, NULL);
}
--- 436,441 ----
}
! command void* Send.getPayload(message_t* m, uint8_t len) {
! return call Packet.getPayload(m, len);
}
***************
*** 449,468 ****
- command void* Receive.getPayload[collection_id_t id](message_t* msg, uint8_t* len) {
- return call Packet.getPayload(msg, len);
- }
-
- command uint8_t Receive.payloadLength[collection_id_t id](message_t* m) {
- return call Packet.payloadLength(m);
- }
-
- command void* Snoop.getPayload[collection_id_t id](message_t* msg, uint8_t* len) {
- return call Packet.getPayload(msg, len);
- }
-
- command uint8_t Snoop.payloadLength[collection_id_t id](message_t* m) {
- return call Packet.payloadLength(m);
- }
-
command uint8_t Packet.payloadLength(message_t* msg) {
return call SubPacket.payloadLength(msg) - sizeof(lqi_header_t);
--- 449,452 ----
***************
*** 474,483 ****
return (call SubPacket.maxPayloadLength() - sizeof(lqi_header_t));
}
! command void* Packet.getPayload(message_t* msg, uint8_t* len) {
! void* rval = call SubPacket.getPayload(msg, len);
! if (len != NULL) {
! *len -= sizeof(lqi_header_t);
}
- rval += sizeof(lqi_header_t);
return rval;
}
--- 458,466 ----
return (call SubPacket.maxPayloadLength() - sizeof(lqi_header_t));
}
! command void* Packet.getPayload(message_t* msg, uint8_t len) {
! void* rval = call SubPacket.getPayload(msg, len + sizeof(lqi_header_t));
! if (rval != NULL) {
! rval += sizeof(lqi_header_t);
}
return rval;
}
Index: LqiRoutingEngineP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/lqi/LqiRoutingEngineP.nc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** LqiRoutingEngineP.nc 19 Jul 2007 12:35:29 -0000 1.6
--- LqiRoutingEngineP.nc 13 Sep 2007 23:10:19 -0000 1.7
***************
*** 109,117 ****
lqi_header_t* getHeader(message_t* msg) {
! return (lqi_header_t*)call Packet.getPayload(msg, NULL);
}
lqi_beacon_msg_t* getBeacon(message_t* msg) {
! return (lqi_beacon_msg_t*)call Packet.getPayload(msg, NULL);
}
--- 109,117 ----
lqi_header_t* getHeader(message_t* msg) {
! return (lqi_header_t*)call Packet.getPayload(msg, sizeof(lqi_header_t));
}
lqi_beacon_msg_t* getBeacon(message_t* msg) {
! return (lqi_beacon_msg_t*)call Packet.getPayload(msg, sizeof(lqi_beacon_msg_t));
}
***************
*** 278,282 ****
command error_t RouteSelect.initializeFields(message_t* msg) {
! lqi_header_t* header = (lqi_header_t*)call Packet.getPayload(msg, NULL);
header->originaddr = TOS_NODE_ID;
--- 278,282 ----
command error_t RouteSelect.initializeFields(message_t* msg) {
! lqi_header_t* header = getHeader(msg);
header->originaddr = TOS_NODE_ID;
More information about the Tinyos-2-commits
mailing list