[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/tossim
SerialActiveMessageC.nc, 1.6, 1.7 TossimActiveMessageC.nc, 1.1, 1.2
Phil Levis
scipio at users.sourceforge.net
Thu Sep 13 16:10:52 PDT 2007
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/tossim
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv27056/tos/lib/tossim
Modified Files:
SerialActiveMessageC.nc TossimActiveMessageC.nc
Log Message:
The big interface switchover for Packet, Send, Receive, and AMSend.
Index: SerialActiveMessageC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/tossim/SerialActiveMessageC.nc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** SerialActiveMessageC.nc 23 Jun 2007 03:38:50 -0000 1.6
--- SerialActiveMessageC.nc 13 Sep 2007 23:10:19 -0000 1.7
***************
*** 86,109 ****
}
! command void* AMSend.getPayload[am_id_t id](message_t* m) {
! return call Packet.getPayload(m, NULL);
! }
!
! command void* Receive.getPayload[am_id_t id](message_t* m, uint8_t* len) {
! return call Packet.getPayload(m, len);
! }
!
! command uint8_t Receive.payloadLength[am_id_t id](message_t* m) {
! return call Packet.payloadLength(m);
! }
!
! command void* Snoop.getPayload[am_id_t id](message_t* m, uint8_t* len) {
return call Packet.getPayload(m, len);
}
- command uint8_t Snoop.payloadLength[am_id_t id](message_t* m) {
- return call Packet.payloadLength(m);
- }
-
command am_addr_t AMPacket.address() {
return call amAddress();
--- 86,93 ----
}
! command void* AMSend.getPayload[am_id_t id](message_t* m, uint8_t len) {
return call Packet.getPayload(m, len);
}
command am_addr_t AMPacket.address() {
return call amAddress();
***************
*** 172,180 ****
}
! command void* Packet.getPayload(message_t* msg, uint8_t* len) {
! if (len != NULL) {
! *len = call Packet.payloadLength(msg);
}
- return msg->data;
}
--- 156,166 ----
}
! command void* Packet.getPayload(message_t* msg, uint8_t len) {
! if (len <= TOSH_DATA_LENGTH) {
! return msg->data;
! }
! else {
! return NULL;
}
}
Index: TossimActiveMessageC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/tossim/TossimActiveMessageC.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TossimActiveMessageC.nc 4 Sep 2007 17:19:23 -0000 1.1
--- TossimActiveMessageC.nc 13 Sep 2007 23:10:19 -0000 1.2
***************
*** 85,108 ****
}
! command void* AMSend.getPayload[am_id_t id](message_t* m) {
! return call Packet.getPayload(m, NULL);
! }
!
! command void* Receive.getPayload[am_id_t id](message_t* m, uint8_t* len) {
! return call Packet.getPayload(m, len);
! }
!
! command uint8_t Receive.payloadLength[am_id_t id](message_t* m) {
! return call Packet.payloadLength(m);
! }
!
! command void* Snoop.getPayload[am_id_t id](message_t* m, uint8_t* len) {
return call Packet.getPayload(m, len);
}
- command uint8_t Snoop.payloadLength[am_id_t id](message_t* m) {
- return call Packet.payloadLength(m);
- }
-
command int8_t TossimPacket.strength(message_t* msg) {
return getMetadata(msg)->strength;
--- 85,92 ----
}
! command void* AMSend.getPayload[am_id_t id](message_t* m, uint8_t len) {
return call Packet.getPayload(m, len);
}
command int8_t TossimPacket.strength(message_t* msg) {
return getMetadata(msg)->strength;
***************
*** 120,124 ****
memcpy(bufferPointer, msg, sizeof(message_t));
! payload = call Packet.getPayload(bufferPointer, &len);
if (call AMPacket.isForMe(msg)) {
--- 104,108 ----
memcpy(bufferPointer, msg, sizeof(message_t));
! payload = call Packet.getPayload(bufferPointer, call Packet.maxPayloadLength());
if (call AMPacket.isForMe(msg)) {
***************
*** 194,202 ****
}
! command void* Packet.getPayload(message_t* msg, uint8_t* len) {
! if (len != NULL) {
! *len = call Packet.payloadLength(msg);
}
- return msg->data;
}
--- 178,188 ----
}
! command void* Packet.getPayload(message_t* msg, uint8_t len) {
! if (len <= TOSH_DATA_LENGTH) {
! return msg->data;
! }
! else {
! return NULL;
}
}
More information about the Tinyos-2-commits
mailing list