⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 macs.lst

📁 无线传感器星型网络的节点的基站程序,采用802.15.4协议
💻 LST
📖 第 1 页 / 共 4 页
字号:
 724      7264 696E 
 724      6174 6F72 
 725               		.text
 731               	.global	mlmeDisassociateIndication
 733               	mlmeDisassociateIndication:
 140:macs.c        **** 		}
 141:macs.c        **** 	else if(current_pending_num>=MAX_PENDING_LIST_SIZE)	
 142:macs.c        **** 		{
 143:macs.c        **** 		   //printf("\npending full\n");
 144:macs.c        **** 		     //向上层报告
 145:macs.c        **** 		     //mlme_comm_status()
 146:macs.c        **** 		}
 147:macs.c        **** 	//--------------------------------------------------
 148:macs.c        ****        //In order to test the disassociation frame from the coordinator
 149:macs.c        ****        //LONG_ADDR  RFD_LONG_ADDR;
 150:macs.c        **** 
 151:macs.c        **** 	//test the coordinator want the RFD leave the network
 152:macs.c        ****        //mlmeDisassociateRequest(deviceAddress,0x01, FALSE);
 153:macs.c        **** 
 154:macs.c        ****       //---------------------------------------------------
 155:macs.c        **** 	
 156:macs.c        **** 		
 157:macs.c        **** }
 158:macs.c        **** 
 159:macs.c        **** void mlmeDisassociateIndication(LONG_ADDR deviceAddress, BYTE disassociateReason, bool securityUse,
 160:macs.c        **** {
 735               	.LM48:
 736               	/* prologue: frame size=8 */
 737 02c4 CF93      		push r28
 738 02c6 DF93      		push r29
 739 02c8 CDB7      		in r28,__SP_L__
 740 02ca DEB7      		in r29,__SP_H__
 741 02cc 2897      		sbiw r28,8
 742 02ce 0FB6      		in __tmp_reg__,__SREG__
 743 02d0 F894      		cli
 744 02d2 DEBF      		out __SP_H__,r29
 745 02d4 0FBE      		out __SREG__,__tmp_reg__
 746 02d6 CDBF      		out __SP_L__,r28
 747               	/* prologue end (size=10) */
 748 02d8 2983      		std Y+1,r18
 749 02da 3A83      		std Y+2,r19
 750 02dc 4B83      		std Y+3,r20
 751 02de 5C83      		std Y+4,r21
 752 02e0 6D83      		std Y+5,r22
 753 02e2 7E83      		std Y+6,r23
 754 02e4 8F83      		std Y+7,r24
 755 02e6 9887      		std Y+8,r25
 161:macs.c        **** 	//协调者或终端设备在收到对方发过来的disassociation notification帧后
 162:macs.c        **** 	//通知高层。post高层任务
 163:macs.c        **** 	//空函数,高层实现
 164:macs.c        **** 	//------------------------------------------------------
 165:macs.c        **** 	//---------------待添加------------------------------
 166:macs.c        **** 	//--------网络层删除对应的associate记录--------
 167:macs.c        **** 	//-------------------------------------------------------
 168:macs.c        ****        if(!IS_COORDINATOR)
 169:macs.c        ****        {
 170:macs.c        **** 	 //printf("\n--the RFD received the disassociation indiation----\n");
 171:macs.c        **** 	   mac_current_state=MAC_STATE_IDLE;
 172:macs.c        ****        }  
 173:macs.c        **** 	else
 174:macs.c        **** 		{   
 175:macs.c        **** 		   
 176:macs.c        **** 	           printf("\n----the coordinator received the disassociation indication----\n");	
 757               	.LM49:
 758 02e8 80E0      		ldi r24,lo8(.LC4)
 759 02ea 90E0      		ldi r25,hi8(.LC4)
 760 02ec 0E94 0000 		call puts
 761               	/* epilogue: frame size=8 */
 762 02f0 2896      		adiw r28,8
 763 02f2 0FB6      		in __tmp_reg__,__SREG__
 764 02f4 F894      		cli
 765 02f6 DEBF      		out __SP_H__,r29
 766 02f8 0FBE      		out __SREG__,__tmp_reg__
 767 02fa CDBF      		out __SP_L__,r28
 768 02fc DF91      		pop r29
 769 02fe CF91      		pop r28
 770 0300 0895      		ret
 771               	/* epilogue end (size=9) */
 772               	/* function mlmeDisassociateIndication size 31 (12) */
 774               		.data
 775               	.LC5:
 776 00f6 0A2D 2D2D 		.string	"\n---success disassociated the object RFD from the network------"
 776      7375 6363 
 776      6573 7320 
 776      6469 7361 
 776      7373 6F63 
 777               		.text
 780               	.global	mlmeDisassociateConfirm
 782               	mlmeDisassociateConfirm:
 177:macs.c        **** 	         
 178:macs.c        **** 		}
 179:macs.c        **** 	
 180:macs.c        **** }
 181:macs.c        **** 
 182:macs.c        **** 
 183:macs.c        **** 
 184:macs.c        **** void mlmeDisassociateConfirm(MAC_ENUM status)
 185:macs.c        **** {
 784               	.LM50:
 785               	/* prologue: frame size=0 */
 786               	/* prologue end (size=0) */
 186:macs.c        **** 	//在MAC层发送完成(无论成功与失败),将调用该原语通知高层
 187:macs.c        **** 	//恢复系统的MAC层的状态变量
 188:macs.c        ****   //可以post一个高层任务
 189:macs.c        ****   //空函数,高层实现
 190:macs.c        ****      if(status==SUCCESS)
 788               	.LM51:
 789 0302 8823      		tst r24
 790 0304 21F4      		brne .L27
 191:macs.c        ****      {
 192:macs.c        ****          if(!IS_COORDINATOR)
 193:macs.c        ****          	{
 194:macs.c        ****                    printf("\n---success disassociated from the network-----\n");
 195:macs.c        **** 		     
 196:macs.c        ****          	}
 197:macs.c        ****          else
 198:macs.c        ****          	{   
 199:macs.c        ****          	   
 200:macs.c        ****                    printf("\n---success disassociated the object RFD from the network------\n");	
 792               	.LM52:
 793 0306 80E0      		ldi r24,lo8(.LC5)
 794 0308 90E0      		ldi r25,hi8(.LC5)
 795 030a 0E94 0000 		call puts
 796               	.L27:
 797 030e 0895      		ret
 798               	/* epilogue: frame size=0 */
 799 0310 0895      		ret
 800               	/* epilogue end (size=1) */
 801               	/* function mlmeDisassociateConfirm size 8 (7) */
 803               		.data
 804               	.LC6:
 805 0136 0A73 7563 		.string	"\nsuccess received a orphan notification frame"
 805      6365 7373 
 805      2072 6563 
 805      6569 7665 
 805      6420 6120 
 806               		.text
 811               	.global	mlmeOrphanIndication
 813               	mlmeOrphanIndication:
 201:macs.c        **** 		     
 202:macs.c        ****          	}
 203:macs.c        ****      }		 
 204:macs.c        **** }
 205:macs.c        **** 
 206:macs.c        **** 
 207:macs.c        **** //*************************//
 208:macs.c        **** void mlmeOrphanIndication(LONG_ADDR orphanAddress, bool securityUse, BYTE aclEntry)
 209:macs.c        **** {               
 815               	.LM53:
 816               	/* prologue: frame size=8 */
 817 0312 CF92      		push r12
 818 0314 EF92      		push r14
 819 0316 0F93      		push r16
 820 0318 1F93      		push r17
 821 031a CF93      		push r28
 822 031c DF93      		push r29
 823 031e CDB7      		in r28,__SP_L__
 824 0320 DEB7      		in r29,__SP_H__
 825 0322 2897      		sbiw r28,8
 826 0324 0FB6      		in __tmp_reg__,__SREG__
 827 0326 F894      		cli
 828 0328 DEBF      		out __SP_H__,r29
 829 032a 0FBE      		out __SREG__,__tmp_reg__
 830 032c CDBF      		out __SP_L__,r28
 831               	/* prologue end (size=14) */
 832 032e 2983      		std Y+1,r18
 833 0330 3A83      		std Y+2,r19
 834 0332 4B83      		std Y+3,r20
 835 0334 5C83      		std Y+4,r21
 836 0336 6D83      		std Y+5,r22
 837 0338 7E83      		std Y+6,r23
 838 033a 8F83      		std Y+7,r24
 839 033c 9887      		std Y+8,r25
 210:macs.c        **** 	//协调者或簇头节点在收到一个设备发送过来的orphan nitification帧时候通知高层的原语
 211:macs.c        **** 	//完成高层任务,该任务主要是调用orphan response原语。
 212:macs.c        **** 	SHORT_ADDR shortaddress;
 213:macs.c        **** 	//查找对应orphanAddress的shortaddress.
 214:macs.c        **** 	//-------------------------------------------
 215:macs.c        **** 	//-------------------待添加--------------
 216:macs.c        **** 	//--------------网络层的代码----------
 217:macs.c        **** 	//shortaddress.Val=0xfc8b;
 218:macs.c        ****        //shortaddress.Val=RFD_SHORT_ADDRESS;
 219:macs.c        **** 	printf("\nsuccess received a orphan notification frame\n");
 841               	.LM54:
 842 033e 80E0      		ldi r24,lo8(.LC6)
 843 0340 90E0      		ldi r25,hi8(.LC6)
 844 0342 0E94 0000 		call puts
 220:macs.c        **** 	
 221:macs.c        **** 	shortaddress=short_address_allocate_req(orphanAddress);
 846               	.LM55:
 847 0346 2981      		ldd r18,Y+1
 848 0348 3A81      		ldd r19,Y+2
 849 034a 4B81      		ldd r20,Y+3
 850 034c 5C81      		ldd r21,Y+4
 851 034e 6D81      		ldd r22,Y+5
 852 0350 7E81      		ldd r23,Y+6
 853 0352 8F81      		ldd r24,Y+7
 854 0354 9885      		ldd r25,Y+8
 855 0356 0E94 0000 		call short_address_allocate_req
 222:macs.c        **** 	mlmeOrphanResponse(orphanAddress, shortaddress, TRUE, FALSE);
 857               	.LM56:
 858 035a CC24      		clr r12
 859 035c 21E0      		ldi r18,lo8(1)
 860 035e E22E      		mov r14,r18
 861 0360 8C01      		movw r16,r24
 862 0362 2981      		ldd r18,Y+1
 863 0364 3A81      		ldd r19,Y+2
 864 0366 4B81      		ldd r20,Y+3
 865 0368 5C81      		ldd r21,Y+4
 866 036a 6D81      		ldd r22,Y+5
 867 036c 7E81      		ldd r23,Y+6
 868 036e 8F81      		ldd r24,Y+7
 869 0370 9885      		ldd r25,Y+8
 870 0372 0E94 0000 		call mlmeOrphanResponse
 871               	/* epilogue: frame size=8 */
 872 0376 2896      		adiw r28,8
 873 0378 0FB6      		in __tmp_reg__,__SREG__
 874 037a F894      		cli
 875 037c DEBF      		out __SP_H__,r29
 876 037e 0FBE      		out __SREG__,__tmp_reg__
 877 0380 CDBF      		out __SP_L__,r28
 878 0382 DF91      		pop r29
 879 0384 CF91      		pop r28
 880 0386 1F91      		pop r17
 881 0388 0F91      		pop r16
 882 038a EF90      		pop r14
 883 038c CF90      		pop r12
 884 038e 0895      		ret
 885               	/* epilogue end (size=13) */
 886               	/* function mlmeOrphanIndication size 63 (36) */
 896               	.global	mlmeCommStatusIndication
 898               	mlmeCommStatusIndication:
 223:macs.c        **** }
 224:macs.c        **** //*************************//
 225:macs.c        **** 
 226:macs.c        **** void mlmeCommStatusIndication(WORD panId, BYTE srcAddrMode, ADDRESS *pSrcAddr, BYTE dstAddrMode, AD
 227:macs.c        **** {
 900               	.LM57:
 901               	/* prologue: frame size=0 */
 902               	/* prologue end (size=0) */
 903               	/* epilogue: frame size=0 */
 904 0390 0895      		ret
 905               	/* epilogue end (size=1) */
 906               	/* function mlmeCommStatusIndication size 1 (0) */
 912               	.global	mlmeRxEnableRequest
 914               	mlmeRxEnableRequest:
 228:macs.c        **** 	//通知高层显示response帧的传输情况
 229:macs.c        **** 	//空函数
 230:macs.c        **** }
 231:macs.c        **** 
 232:macs.c        **** 
 233:macs.c        **** void mlmeRxEnableRequest(bool deferPermit, uint32_t rxOnTime, uint32_t rxOnDuration)
 234:macs.c        **** {
 916               	.LM58:
 917               	/* prologue: frame size=0 */
 918               	/* prologue end (size=0) */
 919               	/* epilogue: frame size=0 */
 920 0392 0895      		ret
 921               	/* epilogue end (size=1) */
 922               	/* function mlmeRxEnableRequest size 1 (0) */
 926               	.global	mlmeRxEnableConfirm
 928               	mlmeRxEnableConfirm:
 235:macs.c        **** 	//空函数
 236:macs.c        **** }
 237:macs.c        **** void mlmeRxEnableConfirm(MAC_ENUM status)
 238:macs.c        **** {
 930               	.LM59:
 931               	/* prologue: frame size=0 */
 932               	/* prologue end (size=0) */
 933               	/* epilogue: frame size=0 */
 934 0394 0895      		ret
 935               	/* epilogue end (size=1) */
 936               	/* function mlmeRxEnableConfirm size 1 (0) */
 940               	.global	mlmeSyncLossIndication
 942               	mlmeSyncLossIndication:
 239:macs.c        **** 	//空函数
 240:macs.c        **** }
 241:macs.c        **** 
 242:macs.c        **** void mlmeSyncLossIndication(MAC_ENUM lossReason)
 243:macs.c        **** {
 944               	.LM60:
 945               	/* prologue: frame size=13 */
 946 0396 8F92      		push r8
 947 0398 9F92      		push r9
 948 039a AF92      		push r10
 949 039c BF92      		push r11
 950 039e CF92      		push r12
 951 03a0 DF92      		push r13
 952 03a2 EF92      		push r14
 953 03a4 FF92      		push r15
 954 03a6 0F93      		push r16
 955 03a8 1F93      		push r17
 956 03aa CF93      		push r28
 957 03ac DF93      		push r29
 958 03ae CDB7      		in r28,__SP_L__
 959 03b0 DEB7      		in r29,__SP_H__
 960 03b2 2D97      		sbiw r28,13
 961 03b4 0FB6      		in __tmp_reg__,__SREG__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -