欢迎来到天天文库
浏览记录
ID:57146909
大小:3.64 MB
页数:14页
时间:2020-08-03
《北邮 计科大三 现代交换技术 实验资料报告材料(全部代码) 时间表格调度实验 摘挂机检测实验.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、基础实验一时间表调度实验源代码#include"bconstant.h"extern"C"_declspec(dllexport)voidinitSchTable(intScheduleTable[SchTabLen][SchTabWdh]){inti;for(i=0;i<=19;i++){ScheduleTable[i][0]=0;}ScheduleTable[0][0]=1;for(i=0;i<=19;i++){ScheduleTable[i][1]=1;}for(i=0;i<=19;i++){ScheduleTable[i][2]=0;}ScheduleTable[0
2、][2]=1;ScheduleTable[10][2]=1;return;}基础实验二 摘挂机检测实验 源代码extern"C"_declspec(dllexport)voidscanfor200(intlinestate200[LINEMAX],intlinestate[LINEMAX],UpOnnode*head1,UpOnnode*end1){inti;UpOnnode*p;for(i=0;iphonestate=ehandup;p->l
3、inenum=i;p->next=0;end1->next=p;end1=p;}if(linestate200[i]&~linestate[i]){p=newUpOnnode;p->phonestate=ehandon;p->linenum=i;p->next=0;end1->next=p;end1=p;}}if(i==LINEMAX)for(i=0;i4、te10[LINEMAX],intchange[LINEMAX],intfchange[LINEMAX],intpulsenum[LINEMAX]){inti;for(i=0;i5、ate[i];return;}基础实验四 位间隔识别实验源代码Voidscandigit(intlinestate2[LINEMAX],intlinestate100[LINEMAX],intpulsenum[LINEMAX],intfchange[LINEMAX],intlfchange[LINEMAX],Digitnode*head2,Digitnode*end2){inti;Digitnode*p;for(i=0;i6、de;p->num=pulsenum[i];p->linenum=i;p->next=0;end2->next=p;end2=p;pulsenum[i]=0;}}}for(i=0;i7、ate){case1:caller_ehandup;return1;case2:caller_calledbusy;return4;case3:theother_firstehandon;return4;case4:dial_timer_timeout;return4;case5:recvnum_timer_timeout;return4;case6:connect_timer_timeout;return4;case7:nulltone_timer_timeout;return4;case8:ringback_t
4、te10[LINEMAX],intchange[LINEMAX],intfchange[LINEMAX],intpulsenum[LINEMAX]){inti;for(i=0;i5、ate[i];return;}基础实验四 位间隔识别实验源代码Voidscandigit(intlinestate2[LINEMAX],intlinestate100[LINEMAX],intpulsenum[LINEMAX],intfchange[LINEMAX],intlfchange[LINEMAX],Digitnode*head2,Digitnode*end2){inti;Digitnode*p;for(i=0;i6、de;p->num=pulsenum[i];p->linenum=i;p->next=0;end2->next=p;end2=p;pulsenum[i]=0;}}}for(i=0;i7、ate){case1:caller_ehandup;return1;case2:caller_calledbusy;return4;case3:theother_firstehandon;return4;case4:dial_timer_timeout;return4;case5:recvnum_timer_timeout;return4;case6:connect_timer_timeout;return4;case7:nulltone_timer_timeout;return4;case8:ringback_t
5、ate[i];return;}基础实验四 位间隔识别实验源代码Voidscandigit(intlinestate2[LINEMAX],intlinestate100[LINEMAX],intpulsenum[LINEMAX],intfchange[LINEMAX],intlfchange[LINEMAX],Digitnode*head2,Digitnode*end2){inti;Digitnode*p;for(i=0;i6、de;p->num=pulsenum[i];p->linenum=i;p->next=0;end2->next=p;end2=p;pulsenum[i]=0;}}}for(i=0;i7、ate){case1:caller_ehandup;return1;case2:caller_calledbusy;return4;case3:theother_firstehandon;return4;case4:dial_timer_timeout;return4;case5:recvnum_timer_timeout;return4;case6:connect_timer_timeout;return4;case7:nulltone_timer_timeout;return4;case8:ringback_t
6、de;p->num=pulsenum[i];p->linenum=i;p->next=0;end2->next=p;end2=p;pulsenum[i]=0;}}}for(i=0;i7、ate){case1:caller_ehandup;return1;case2:caller_calledbusy;return4;case3:theother_firstehandon;return4;case4:dial_timer_timeout;return4;case5:recvnum_timer_timeout;return4;case6:connect_timer_timeout;return4;case7:nulltone_timer_timeout;return4;case8:ringback_t
7、ate){case1:caller_ehandup;return1;case2:caller_calledbusy;return4;case3:theother_firstehandon;return4;case4:dial_timer_timeout;return4;case5:recvnum_timer_timeout;return4;case6:connect_timer_timeout;return4;case7:nulltone_timer_timeout;return4;case8:ringback_t
此文档下载收益归作者所有