[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/tda5250/mac SpeckMacDP.nc, 1.7, 1.8 RedMacP.nc, 1.19, 1.20
akoepke
andreaskoepke at users.sourceforge.net
Fri Aug 8 01:05:50 PDT 2008
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tools/release deputy.files, NONE, 1.1 nesc.spec, NONE, 1.1
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tools/release/external-tools avarice.spec, NONE, 1.1 avr-gcc.spec, NONE, 1.1 avr-insight.spec, NONE, 1.1 binutils.spec, NONE, 1.1 msp430-libc.spec, NONE, 1.1 xscale-elf.gcc.spec, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250/mac
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv5941
Modified Files:
SpeckMacDP.nc RedMacP.nc
Log Message:
fix bug: mac header was "allocated" twice
Index: SpeckMacDP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250/mac/SpeckMacDP.nc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** SpeckMacDP.nc 10 Jul 2008 12:40:01 -0000 1.7
--- SpeckMacDP.nc 8 Aug 2008 08:05:47 -0000 1.8
***************
*** 141,144 ****
--- 141,145 ----
SUB_HEADER_TIME=PHY_HEADER_TIME + sizeof(message_header_t)*BYTE_TIME,
SUB_FOOTER_TIME=2*BYTE_TIME, // 2 bytes crc
+ #ifndef DEFAULT_SLEEP_TIME
DEFAULT_SLEEP_TIME=1625,
// DEFAULT_SLEEP_TIME=3250,
***************
*** 148,151 ****
--- 149,153 ----
// DEFAULT_SLEEP_TIME=32768U,
// DEFAULT_SLEEP_TIME=65535U,
+ #endif
DATA_DETECT_TIME=17,
RX_SETUP_TIME=102, // time to set up receiver
***************
*** 347,351 ****
}
if(msg == NULL) return;
! macHdr = (red_mac_header_t *)call SubPacket.getPayload(msg, sizeof(red_mac_header_t) + length);
macHdr->repetitionCounter = sT/(length * BYTE_TIME + SUB_HEADER_TIME + SUB_FOOTER_TIME) + 1;
atomic {
--- 349,353 ----
}
if(msg == NULL) return;
! macHdr = (red_mac_header_t *)call SubPacket.getPayload(msg, sizeof(red_mac_header_t));
macHdr->repetitionCounter = sT/(length * BYTE_TIME + SUB_HEADER_TIME + SUB_FOOTER_TIME) + 1;
atomic {
***************
*** 540,543 ****
--- 542,546 ----
}
MIN_BACKOFF_MASK >>= 2;
+ if(MIN_BACKOFF_MASK < 0x3ff) MIN_BACKOFF_MASK=0x3ff;
}
#ifdef SPECKMAC_DEBUG
***************
*** 951,957 ****
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);
}
--- 954,960 ----
async event void RadioTimeStamping.transmittedSFD(uint16_t time, message_t* p_msg ) {
if((macState == TX) && (p_msg == txBufPtr)) {
! getMetadata(p_msg)->sfdtime = call LocalTime32kHz.get();
txMacHdr->time =
! call TimeDiff32.computeDelta(getMetadata(p_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.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** RedMacP.nc 10 Jul 2008 12:40:01 -0000 1.19
--- RedMacP.nc 8 Aug 2008 08:05:48 -0000 1.20
***************
*** 148,151 ****
--- 148,152 ----
SUB_FOOTER_TIME=2*BYTE_TIME, // 2 bytes crc
// DEFAULT_SLEEP_TIME=1625,
+ #ifndef DEFAULT_SLEEP_TIME
DEFAULT_SLEEP_TIME=2048,
// DEFAULT_SLEEP_TIME=4096,
***************
*** 154,157 ****
--- 155,159 ----
// DEFAULT_SLEEP_TIME=32768U,
// DEFAULT_SLEEP_TIME=65535U,
+ #endif
DATA_DETECT_TIME=17,
RX_SETUP_TIME=102, // time to set up receiver
***************
*** 385,389 ****
}
if(msg == NULL) return;
! macHdr = (red_mac_header_t *)call SubPacket.getPayload(msg, sizeof(red_mac_header_t) + length);
macHdr->repetitionCounter = sT/(length * BYTE_TIME + SUB_HEADER_TIME + SUB_FOOTER_TIME +
TX_GAP_TIME) + 1;
--- 387,391 ----
}
if(msg == NULL) return;
! macHdr = (red_mac_header_t *)call SubPacket.getPayload(msg, sizeof(red_mac_header_t));
macHdr->repetitionCounter = sT/(length * BYTE_TIME + SUB_HEADER_TIME + SUB_FOOTER_TIME +
TX_GAP_TIME) + 1;
***************
*** 404,407 ****
--- 406,411 ----
}
else {
+ sdDebug(332);
+ sdDebug(macHdr->repetitionCounter);
call Timer.start(backoff(longRetryCounter));
}
***************
*** 858,862 ****
rxStat.repCounter = 0xff;
#endif
! sdDebug(190);
if(macState == RX_P) {
// sdDebug(191);
--- 862,866 ----
rxStat.repCounter = 0xff;
#endif
! // sdDebug(190);
if(macState == RX_P) {
// sdDebug(191);
***************
*** 1056,1060 ****
rxTime = call LocalTime32kHz.get();
call ChannelMonitor.rxSuccess();
- sdDebug(221);
}
}
--- 1060,1063 ----
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tools/release deputy.files, NONE, 1.1 nesc.spec, NONE, 1.1
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tools/release/external-tools avarice.spec, NONE, 1.1 avr-gcc.spec, NONE, 1.1 avr-insight.spec, NONE, 1.1 binutils.spec, NONE, 1.1 msp430-libc.spec, NONE, 1.1 xscale-elf.gcc.spec, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-2-commits
mailing list