Dear friends: I wrote a mac protocol named TMAC, I don't have TMAC source code, so I just modified the SMAC source code and only add TA to apaptively adjust the active time. I modified the SMAC test tcl script MyTest.tcl to run TMAC and it works fine. I can see the total energy consumption is decreasing and the end-to-end delay is a little more than SMAC. However, when I modified the test-suite-smac-multihop.tcl to run TMAC, I got the the trace file tmac1.tr, when I want to see the trace of packet 0, I use the command: ($27 is the packet sequence) awk '$27=="[0]"{print $0}' tmac1.tr Then I got:
s 100.000000000 _0_ AGT --- 0 cbr 50 [0.00 0 0] [energy 88.125154 ei 11.821es 0.016 et 0.005 er 0.010] ------- [0:0 9:0 32 0] [0] 0 0 r 100.000000000 _0_ RTR --- 0 cbr 50 [0.00 0 0] [energy 88.125154 ei 11.821es 0.016 et 0.005 er 0.010] ------- [0:0 9:0 32 0] [0] 0 0 s 100.000000000 _0_ RTR --- 0 cbr 50 [0.00 0 0] [energy 88.125154 ei 11.821es 0.016 et 0.005 er 0.010] ------- [0:0 9:0 32 0] [0] 0 0 I can see at 100.0 a packet was generated in the AGT,then went to the RTR, however,it never went to the MAC layer, so it can't be sent to other nodes. I can't find the problem,please help me! BTW, the MACTrace is ON Any suggestions will be appreciated! Best Regards David