欢迎来到天天文库
浏览记录
ID:47358234
大小:3.67 MB
页数:19页
时间:2020-01-10
《北邮计科大三现代交换技术实验报告(全部代码)时间表调度实验摘挂机检测实验》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
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
2、[i][2]=0;}ScheduleTable[0][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;i3、ate200[i]){p=newUpOnnode;p->phonestate=ehandup;p->linenum=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、ate[i];return;}基础实验三 脉冲计数实验源代码voidscanpulse(intlinestate[LINEMAX],intlinestate10[LINEMAX],intchange[LINEMAX],intfchange[LINEMAX],intpulsenum[LINEMAX]){inti;for(i=0;i5、f(change[i]&&(!linestate10[i]))pulsenum[i]=pulsenum[i]+1;}for(i=0;i6、head2,Digitnode*end2){inti;Digitnode*p;for(i=0;inum=pulsenum[i];p->linenum=i;p->next=0;end2->next=p;end2=p;pulsenum[i]=0;}}}for(i=0;i7、0;linestate100[i]=linestate2[i];}return;}基础实验五 软件送音实验源代码#include"bconstant.h"extern"C"_declspec(dllexport)intdecide_ringtype(Userstatestate){switch(state){case1:caller_ehandup;return1;case2:caller_calledbusy;return4;case3:theother_firstehandon;return4;case4:dial_ti8、mer_timeout;return4;..case5:recvnum_timer_timeout;return4;case6:connect_timer_timeout;return4;case7:nulltone_timer_timeout;return4;case8:r
3、ate200[i]){p=newUpOnnode;p->phonestate=ehandup;p->linenum=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、ate[i];return;}基础实验三 脉冲计数实验源代码voidscanpulse(intlinestate[LINEMAX],intlinestate10[LINEMAX],intchange[LINEMAX],intfchange[LINEMAX],intpulsenum[LINEMAX]){inti;for(i=0;i5、f(change[i]&&(!linestate10[i]))pulsenum[i]=pulsenum[i]+1;}for(i=0;i6、head2,Digitnode*end2){inti;Digitnode*p;for(i=0;inum=pulsenum[i];p->linenum=i;p->next=0;end2->next=p;end2=p;pulsenum[i]=0;}}}for(i=0;i7、0;linestate100[i]=linestate2[i];}return;}基础实验五 软件送音实验源代码#include"bconstant.h"extern"C"_declspec(dllexport)intdecide_ringtype(Userstatestate){switch(state){case1:caller_ehandup;return1;case2:caller_calledbusy;return4;case3:theother_firstehandon;return4;case4:dial_ti8、mer_timeout;return4;..case5:recvnum_timer_timeout;return4;case6:connect_timer_timeout;return4;case7:nulltone_timer_timeout;return4;case8:r
4、ate[i];return;}基础实验三 脉冲计数实验源代码voidscanpulse(intlinestate[LINEMAX],intlinestate10[LINEMAX],intchange[LINEMAX],intfchange[LINEMAX],intpulsenum[LINEMAX]){inti;for(i=0;i5、f(change[i]&&(!linestate10[i]))pulsenum[i]=pulsenum[i]+1;}for(i=0;i6、head2,Digitnode*end2){inti;Digitnode*p;for(i=0;inum=pulsenum[i];p->linenum=i;p->next=0;end2->next=p;end2=p;pulsenum[i]=0;}}}for(i=0;i7、0;linestate100[i]=linestate2[i];}return;}基础实验五 软件送音实验源代码#include"bconstant.h"extern"C"_declspec(dllexport)intdecide_ringtype(Userstatestate){switch(state){case1:caller_ehandup;return1;case2:caller_calledbusy;return4;case3:theother_firstehandon;return4;case4:dial_ti8、mer_timeout;return4;..case5:recvnum_timer_timeout;return4;case6:connect_timer_timeout;return4;case7:nulltone_timer_timeout;return4;case8:r
5、f(change[i]&&(!linestate10[i]))pulsenum[i]=pulsenum[i]+1;}for(i=0;i6、head2,Digitnode*end2){inti;Digitnode*p;for(i=0;inum=pulsenum[i];p->linenum=i;p->next=0;end2->next=p;end2=p;pulsenum[i]=0;}}}for(i=0;i7、0;linestate100[i]=linestate2[i];}return;}基础实验五 软件送音实验源代码#include"bconstant.h"extern"C"_declspec(dllexport)intdecide_ringtype(Userstatestate){switch(state){case1:caller_ehandup;return1;case2:caller_calledbusy;return4;case3:theother_firstehandon;return4;case4:dial_ti8、mer_timeout;return4;..case5:recvnum_timer_timeout;return4;case6:connect_timer_timeout;return4;case7:nulltone_timer_timeout;return4;case8:r
6、head2,Digitnode*end2){inti;Digitnode*p;for(i=0;inum=pulsenum[i];p->linenum=i;p->next=0;end2->next=p;end2=p;pulsenum[i]=0;}}}for(i=0;i7、0;linestate100[i]=linestate2[i];}return;}基础实验五 软件送音实验源代码#include"bconstant.h"extern"C"_declspec(dllexport)intdecide_ringtype(Userstatestate){switch(state){case1:caller_ehandup;return1;case2:caller_calledbusy;return4;case3:theother_firstehandon;return4;case4:dial_ti8、mer_timeout;return4;..case5:recvnum_timer_timeout;return4;case6:connect_timer_timeout;return4;case7:nulltone_timer_timeout;return4;case8:r
7、0;linestate100[i]=linestate2[i];}return;}基础实验五 软件送音实验源代码#include"bconstant.h"extern"C"_declspec(dllexport)intdecide_ringtype(Userstatestate){switch(state){case1:caller_ehandup;return1;case2:caller_calledbusy;return4;case3:theother_firstehandon;return4;case4:dial_ti
8、mer_timeout;return4;..case5:recvnum_timer_timeout;return4;case6:connect_timer_timeout;return4;case7:nulltone_timer_timeout;return4;case8:r
此文档下载收益归作者所有