[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/tda5250/mac SpeckMacDP.nc, 1.6, 1.7 RedMacP.nc, 1.18, 1.19 RedMac.h, 1.2, 1.3 CsmaMacP.nc, 1.16, 1.17
akoepke
andreaskoepke at users.sourceforge.net
Thu Jul 10 05:40:06 PDT 2008
Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250/mac
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv5780/mac
Modified Files:
SpeckMacDP.nc RedMacP.nc RedMac.h CsmaMacP.nc
Log Message:
keep sfd time
Index: SpeckMacDP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250/mac/SpeckMacDP.nc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** SpeckMacDP.nc 5 Mar 2008 11:20:43 -0000 1.6
--- SpeckMacDP.nc 10 Jul 2008 12:40:01 -0000 1.7
***************
*** 789,792 ****
--- 789,793 ----
#endif
storeStrength(msg);
+ getMetadata(msg)->sfdtime = rxTime;
getMetadata(msg)->time = calcGeneratedTime((red_mac_header_t*) payload);
getMetadata(msg)->ack = WAS_NOT_ACKED;
***************
*** 950,955 ****
async event void RadioTimeStamping.transmittedSFD(uint16_t time, message_t* p_msg ) {
if((macState == TX) && (p_msg == txBufPtr)) {
txMacHdr->time =
! call TimeDiff32.computeDelta(call LocalTime32kHz.get(), getMetadata(p_msg)->time);
}
}
--- 951,958 ----
async event void RadioTimeStamping.transmittedSFD(uint16_t time, message_t* p_msg ) {
if((macState == TX) && (p_msg == txBufPtr)) {
+ getMetadata(msg)->sfdtime = call LocalTime32kHz.get();
txMacHdr->time =
! call TimeDiff32.computeDelta(getMetadata(msg)->sfdtime,
! getMetadata(p_msg)->time);
}
}
Index: RedMacP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250/mac/RedMacP.nc,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** RedMacP.nc 18 Jun 2008 01:25:54 -0000 1.18
--- RedMacP.nc 10 Jul 2008 12:40:01 -0000 1.19
***************
*** 148,155 ****
SUB_FOOTER_TIME=2*BYTE_TIME, // 2 bytes crc
// DEFAULT_SLEEP_TIME=1625,
! // DEFAULT_SLEEP_TIME=2048,
// DEFAULT_SLEEP_TIME=4096,
// DEFAULT_SLEEP_TIME=8192,
! DEFAULT_SLEEP_TIME=16384,
// DEFAULT_SLEEP_TIME=32768U,
// DEFAULT_SLEEP_TIME=65535U,
--- 148,155 ----
SUB_FOOTER_TIME=2*BYTE_TIME, // 2 bytes crc
// DEFAULT_SLEEP_TIME=1625,
! DEFAULT_SLEEP_TIME=2048,
// DEFAULT_SLEEP_TIME=4096,
// DEFAULT_SLEEP_TIME=8192,
! // DEFAULT_SLEEP_TIME=16384,
// DEFAULT_SLEEP_TIME=32768U,
// DEFAULT_SLEEP_TIME=65535U,
***************
*** 876,879 ****
--- 876,880 ----
dTrace.sender = getHeader(msg)->src;
#endif
+ getMetadata(msg)->sfdtime = rxTime;
getMetadata(msg)->time = calcGeneratedTime((red_mac_header_t*) payload);
getMetadata(msg)->ack = WAS_NOT_ACKED;
***************
*** 1067,1073 ****
txMacHdr->time = dTrace.delta;
call DeltaTrace.traceTx(&dTrace);
#else
txMacHdr->time =
! call TimeDiff32.computeDelta(call LocalTime32kHz.get(), getMetadata(p_msg)->time);
#endif
}
--- 1068,1077 ----
txMacHdr->time = dTrace.delta;
call DeltaTrace.traceTx(&dTrace);
+ getMetadata(p_msg)->sfdtime = dTrace.now;
#else
+ getMetadata(p_msg)->sfdtime = call LocalTime32kHz.get();
txMacHdr->time =
! call TimeDiff32.computeDelta(getMetadata(p_msg)->sfdtime,
! getMetadata(p_msg)->time);
#endif
}
Index: RedMac.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250/mac/RedMac.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** RedMac.h 12 Dec 2006 18:23:13 -0000 1.2
--- RedMac.h 10 Jul 2008 12:40:01 -0000 1.3
***************
*** 37,47 ****
#define RED_MAC_H
- /*
- * highest bit of token set: this message is ACK and not intended for the
- * upper layers. Token is used for alternating bit like duplicate detection,
- * and set by the sender in [0,127] intervall. The receiver reflects the
- * token in the Ack, with the highest bit set.
- */
-
typedef nx_struct red_mac_header_t {
nx_uint8_t repetitionCounter;
--- 37,40 ----
Index: CsmaMacP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250/mac/CsmaMacP.nc,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** CsmaMacP.nc 5 Mar 2008 11:20:43 -0000 1.16
--- CsmaMacP.nc 10 Jul 2008 12:40:01 -0000 1.17
***************
*** 304,308 ****
call ReRxTimer.startOneShot(5000);
}
!
uint16_t backoff(uint8_t counter) {
uint16_t mask = BACKOFF_MASK >> (MAX_LONG_RETRY - counter);
--- 304,308 ----
call ReRxTimer.startOneShot(5000);
}
!
uint16_t backoff(uint8_t counter) {
uint16_t mask = BACKOFF_MASK >> (MAX_LONG_RETRY - counter);
***************
*** 963,967 ****
}
! async event void RadioTimeStamping.transmittedSFD( uint16_t time, message_t* p_msg ) {}
/***** Rssi Resource events ******************/
--- 963,971 ----
}
! async event void RadioTimeStamping.transmittedSFD( uint16_t time, message_t* p_msg ) {
! if((macState == TX) && (p_msg == txBufPtr)) {
! // to do
! }
! }
/***** Rssi Resource events ******************/
More information about the Tinyos-2-commits
mailing list