[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/tda5250
Tda5250ActiveMessageP.nc, 1.1.2.3, 1.1.2.4 tda5250_message.h,
1.1.2.3, 1.1.2.4
Jan-Hinrich Hauer
janhauer at users.sourceforge.net
Fri Aug 4 04:20:39 PDT 2006
Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv3784/tos/chips/tda5250
Modified Files:
Tag: tinyos-2_0_devel-BRANCH
Tda5250ActiveMessageP.nc tda5250_message.h
Log Message:
Added commands for accessing the AM src field.
Index: Tda5250ActiveMessageP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250/Tda5250ActiveMessageP.nc,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -d -r1.1.2.3 -r1.1.2.4
*** Tda5250ActiveMessageP.nc 31 May 2006 13:53:02 -0000 1.1.2.3
--- Tda5250ActiveMessageP.nc 4 Aug 2006 11:20:37 -0000 1.1.2.4
***************
*** 67,71 ****
tda5250_header_t* header = getHeader(msg);
header->type = id;
! header->addr = addr;
header->group = TOS_AM_GROUP;
return call SubSend.send(msg, len);
--- 67,72 ----
tda5250_header_t* header = getHeader(msg);
header->type = id;
! header->dest = addr;
! header->src = call amAddress();
header->group = TOS_AM_GROUP;
return call SubSend.send(msg, len);
***************
*** 121,132 ****
command am_addr_t AMPacket.destination(message_t* amsg) {
tda5250_header_t* header = getHeader(amsg);
! return header->addr;
}
command void AMPacket.setDestination(message_t* amsg, am_addr_t addr) {
tda5250_header_t* header = getHeader(amsg);
! header->addr = addr;
}
command bool AMPacket.isForMe(message_t* amsg) {
return (call AMPacket.destination(amsg) == call AMPacket.address() ||
--- 122,143 ----
command am_addr_t AMPacket.destination(message_t* amsg) {
tda5250_header_t* header = getHeader(amsg);
! return header->dest;
}
command void AMPacket.setDestination(message_t* amsg, am_addr_t addr) {
tda5250_header_t* header = getHeader(amsg);
! header->dest = addr;
}
+ command am_addr_t AMPacket.source(message_t* amsg) {
+ tda5250_header_t* header = getHeader(amsg);
+ return header->src;
+ }
+
+ command void AMPacket.setSource(message_t* amsg, am_addr_t addr) {
+ tda5250_header_t* header = getHeader(amsg);
+ header->src = addr;
+ }
+
command bool AMPacket.isForMe(message_t* amsg) {
return (call AMPacket.destination(amsg) == call AMPacket.address() ||
Index: tda5250_message.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250/tda5250_message.h,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -d -r1.1.2.3 -r1.1.2.4
*** tda5250_message.h 3 Aug 2006 18:17:52 -0000 1.1.2.3
--- tda5250_message.h 4 Aug 2006 11:20:37 -0000 1.1.2.4
***************
*** 5,9 ****
typedef nx_struct tda5250_header_t {
! nx_am_addr_t addr;
nx_uint8_t length;
nx_am_group_t group;
--- 5,10 ----
typedef nx_struct tda5250_header_t {
! nx_am_addr_t src;
! nx_am_addr_t dest;
nx_uint8_t length;
nx_am_group_t group;
More information about the Tinyos-2-commits
mailing list