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

📄 mobile_sys.pr

📁 通信软件设计基础实验报告 简易手机软件系统
💻 PR
📖 第 1 页 / 共 3 页
字号:
/*#SDTREF(SDL,D:\122\mobile_sys.ssy,4)*/
system mobile_sys;
/*#SDTREF(SDL,D:\122\mobile_sys.ssy,1)*/


/*#SDTREF(SDL,D:\122\mobile_sys.ssy(1),191(25,40))*/
Signallist
to_env=display, busy_tone_on, busy_tone_off,ringback_tone_on,  ringback_tone_off,
sound_on,sound_off,mic_on,mic_off,callnumber,disconnect,ring_tone_on, ring_tone_off,
receiver_busy,res,send_res,message_tone,send_message_tone,message;
Signallist
env_in=digit,hook_off,hook_on,res,receive_res,connectto,disconnect,connect_req,
receiver_busy,message,send_message;

/*#SDTREF(SDL,D:\122\mobile_sys.ssy(1),158(50,105))*/
channel /*#E*/ 
env_sys from env to mobile_control with 
/*#SDTREF(SDL,D:\122\mobile_sys.ssy(1),159(32,115))*/
env_in;
endchannel env_sys;
/*#SDTREF(SDL,D:\122\mobile_sys.ssy(1),149(145,105))*/
channel /*#E*/ 
sys_env from mobile_control to env with 
/*#SDTREF(SDL,D:\122\mobile_sys.ssy(1),150(160,115))*/
to_env;
endchannel sys_env;
/*#SDTREF(SDL,D:\122\mobile_sys.ssy(1),146(80,105))*/
block mobile_control referenced;
/*#SDTREF(SDL,D:\122\mobile_sys.ssy,4)*/
endsystem mobile_sys;
/*#SDTREF(SDL,D:\122\mobile_control.sbk,4)*/
block mobile_control;
/*#SDTREF(SDL,D:\122\mobile_control.sbk(1),239(20,40))*/
Signallist
p_env=display, busy_tone_on, busy_tone_off,ringback_tone_on,  ringback_tone_off,
sound_on,sound_off,mic_on,mic_off,callnumber,disconnect,ring_tone_on, ring_tone_off,
receiver_busy,res,send_res,message_tone,send_message_tone,message;
Signallist
env_m=digit,hook_off,hook_on,res,receive_res,connectto,disconnect,connect_req,
receiver_busy,message,send_message;

/*#SDTREF(SDL,D:\122\mobile_control.sbk(1),155(47,90))*/
signalroute /*#E*/ 
env_p from env to phone_control with 
/*#SDTREF(SDL,D:\122\mobile_control.sbk(1),156(67,100))*/
env_p;
/*#SDTREF(SDL,D:\122\mobile_control.sbk(1),164(123,90))*/
signalroute /*#E*/ 
p_env from phone_control to env with 
/*#SDTREF(SDL,D:\122\mobile_control.sbk(1),165(167,100))*/
p_env;
/*#SDTREF(SDL,D:\122\mobile_control.sbk(1),209(47,125))*/
signalroute /*#E*/ 
env_m from env to message_control with 
/*#SDTREF(SDL,D:\122\mobile_control.sbk(1),210(62,135))*/
env_m;
/*#SDTREF(SDL,D:\122\mobile_control.sbk(1),218(142,125))*/
signalroute /*#E*/ 
m_env from message_control to env with 
/*#SDTREF(SDL,D:\122\mobile_control.sbk(1),219(167,135))*/
m_env;
/*#SDTREF(SDL,D:\122\mobile_control.sbk(1),116(75,90))*/
process phone_control referenced;
/*#SDTREF(SDL,D:\122\mobile_control.sbk(1),206(75,125))*/
process message_control referenced;
/*#SDTREF(SDL,D:\122\mobile_control.sbk(1),161(7,95))*/
connect env_sys and env_p,
/*#SDTREF(SDL,D:\122\mobile_control.sbk(1),215(7,130))*/
env_m;
/*#SDTREF(SDL,D:\122\mobile_control.sbk(1),203(177,95))*/
connect sys_env and p_env,
/*#SDTREF(SDL,D:\122\mobile_control.sbk(1),224(177,130))*/
m_env;
/*#SDTREF(SDL,D:\122\mobile_control.sbk,4)*/
endblock mobile_control;
/*#SDTREF(SDL,D:\122\phone_control.spr,4)*/
process phone_control;
/*#SDTREF(SDL,D:\122\phone_control.spr(1),632(105,10))*/
Dcl
 Wel charstring, 
number charstring, 
localnumber charstring,
connected charstring,
network_busy charstring, 
called_busy charstring,
 ringon charstring, 
Nobaby_get charstring, 
callon charstring,
call_ended  charstring,
call_end  charstring;
/*#SDTREF(SDL,D:\122\phone_control.spr(1),641(150,25))*/
dcl cd_num num,
       cd_no idx3,
        code1  idx10;
/*#SDTREF(SDL,D:\122\phone_control.spr(3),629(95,10))*/
procedure editsmesarr_connected referenced;
/*#SDTREF(SDL,D:\122\phone_control.spr(1),116(45,10))*/
start /*#E*/ 
;
/*#SDTREF(SDL,D:\122\phone_control.spr(1),635(25,25))*/
task /*#E*/ 
Wel:='welcome!' ,
number:= 'number', 
localnumber:='localnumber',
connected:='connect to ',
network_busy:= 'network busy', 
called_busy:= 'called busy', 
ringon:= 'ringon', 
Nobaby_get:= 'Nobaby get', 
callon:= 'callon',
call_ended:='call_ended',
call_end:='call_end';
/*#SDTREF(SDL,D:\122\phone_control.spr(1),125(45,65))*/
output /*#E*/ 
display(Wel);
/*#SDTREF(SDL,D:\122\phone_control.spr(1),119(45,80))*/
nextstate /*#E*/ 
idle;
/*#SDTREF(SDL,D:\122\phone_control.spr(1),119(45,80))*/
state /*#E*/ 
idle;
/*#SDTREF(SDL,D:\122\phone_control.spr(1),224(95,75))*/
input /*#E*/ 
connect_req(number);
/*#SDTREF(SDL,D:\122\phone_control.spr(1),230(80,95))*/
output /*#E*/ 
display(number),ring_tone_on,res;
/*#SDTREF(SDL,D:\122\phone_control.spr(1),452(100,120))*/
/*#E*/ 
set(now+30s,t2);
/*#SDTREF(SDL,D:\122\phone_control.spr(1),236(100,140))*/
nextstate /*#E*/ 
wait_res2;
/*#SDTREF(SDL,D:\122\phone_control.spr(1),152(40,95))*/
input /*#E*/ 
digit(code1)
;
/*#SDTREF(SDL,D:\122\phone_control.spr(1),149(35,110))*/
output /*#E*/ 
display(cd_num);
/*#SDTREF(SDL,D:\122\phone_control.spr(1),146(30,125))*/
task /*#E*/ 
cd_num(cd_no):=code1,
cd_no:=cd_no+1,number:=(number//code1);
/*#SDTREF(SDL,D:\122\phone_control.spr(1),200(45,140))*/
nextstate /*#E*/ 
-;
/*#SDTREF(SDL,D:\122\phone_control.spr(1),119(45,80))*/
endstate;
/*#SDTREF(SDL,D:\122\phone_control.spr(1),200(45,140))*/
state /*#E*/ 
-;
/*#SDTREF(SDL,D:\122\phone_control.spr(1),206(45,155))*/
input /*#E*/ 
hook_off;
/*#SDTREF(SDL,D:\122\phone_control.spr(1),215(45,175))*/
output /*#E*/ 
callnumber(number);
/*#SDTREF(SDL,D:\122\phone_control.spr(1),329(45,195))*/
/*#E*/ 
set(now+3s,T0);
/*#SDTREF(SDL,D:\122\phone_control.spr(1),140(45,215))*/
nextstate /*#E*/ 
wait_res;
/*#SDTREF(SDL,D:\122\phone_control.spr(1),200(45,140))*/
endstate;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),254(20,25))*/
state /*#E*/ 
wait_res;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),257(5,45))*/
input /*#E*/ 
res;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),260(5,60))*/
output /*#E*/ 
ringback_tone_on,display_num;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),293(5,75))*/
nextstate /*#E*/ 
wait_connect;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),335(50,45))*/
input /*#E*/ 
t0;
grst0:
/*#SDTREF(SDL,D:\122\phone_control.spr(2),341(65,65))*/
output /*#E*/ 
busy_tone_on,display(network_busy);
/*#SDTREF(SDL,D:\122\phone_control.spr(2),347(65,80))*/
/*#E*/ 
set(now+15s,t1);
/*#SDTREF(SDL,D:\122\phone_control.spr(2),365(65,95))*/
nextstate /*#E*/ 
wait_hook_on;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),392(95,45))*/
input /*#E*/ 
receiver_busy;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),341(65,65))*/
join /*#E*/ 
grst0;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),254(20,25))*/
endstate;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),293(5,75))*/
state /*#E*/ 
wait_connect;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),488(25,95))*/
input /*#E*/ 
hook_on;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),491(25,125))*/
output /*#E*/ 
ringback_tone_off,disconnect(localnumber);
grst1:
/*#SDTREF(SDL,D:\122\phone_control.spr(2),386(70,155))*/
nextstate /*#E*/ 
idle;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),263(5,145))*/
input /*#E*/ 
receive_res(call_number),connectto;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),269(5,175))*/
output /*#E*/ 
ringback_tone_off,mic_on,display(connected//called_number),
sound_on;
grst2:
/*#SDTREF(SDL,D:\122\phone_control.spr(2),302(55,190))*/
nextstate /*#E*/ 
connected;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),293(5,75))*/
endstate;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),365(65,95))*/
state /*#E*/ 
wait_hook_on;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),353(55,115))*/
input /*#E*/ 
hook_on;
grst3:
/*#SDTREF(SDL,D:\122\phone_control.spr(2),377(70,135))*/
output /*#E*/ 
busy_tone_off,display(wel);
/*#SDTREF(SDL,D:\122\phone_control.spr(2),386(70,155))*/
join /*#E*/ 
grst1;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),356(90,115))*/
input /*#E*/ 
t1;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),377(70,135))*/
join /*#E*/ 
grst3;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),365(65,95))*/
endstate;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),308(165,25))*/
state /*#E*/ 
wait_res2;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),653(115,20))*/
input /*#E*/ 
disconnect(call_number);
grst4:
/*#SDTREF(SDL,D:\122\phone_control.spr(2),467(135,70))*/
task /*#E*/ 
phone_num[i]:=call_number,i:=i+1;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),476(135,90))*/
output /*#E*/ 
ring_tone_off,display(Wel),receiver_busy(localnumber);
/*#SDTREF(SDL,D:\122\phone_control.spr(2),386(70,155))*/
join /*#E*/ 
grst1;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),461(130,50))*/
input /*#E*/ 
t2;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),467(135,70))*/
join /*#E*/ 
grst4;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),446(155,50))*/
input /*#E*/ 
hook_on;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),467(135,70))*/
join /*#E*/ 
grst4;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),314(165,110))*/
input /*#E*/ 
hook_off;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),311(165,135))*/
output /*#E*/ 
ring_tone_off,send_res(localnumber),display(connected//number),
mic_on,sound_on;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),302(55,190))*/
join /*#E*/ 
grst2;
/*#SDTREF(SDL,D:\122\phone_control.spr(2),308(165,25))*/
endstate;
/*#SDTREF(SDL,D:\122\phone_control.spr(3),413(15,35))*/
state /*#E*/ 
connected;
/*#SDTREF(SDL,D:\122\phone_control.spr(3),416(15,55))*/
input /*#E*/ 
connect_req;
/*#SDTREF(SDL,D:\122\phone_control.spr(3),422(15,75))*/
task /*#E*/ 
phone_num[i]:=caller_num,i:=i+1;
/*#SDTREF(SDL,D:\122\phone_control.spr(3),425(15,95))*/
output /*#E*/ 
display_caller_number,receiver_busy;
/*#SDTREF(SDL,D:\122\phone_control.spr(3),440(15,115))*/
nextstate /*#E*/ 
connected;
/*#SDTREF(SDL,D:\122\phone_control.spr(3),503(45,55))*/
input /*#E*/ 
hook_on;
/*#SDTREF(SDL,D:\122\phone_control.spr(3),509(45,80))*/
output /*#E*/ 
mic_off,sound_off,disconnect,display_welcome;
grst5:
/*#SDTREF(SDL,D:\122\phone_control.spr(3),518(45,170))*/
nextstate /*#E*/ 
idle;
/*#SDTREF(SDL,D:\122\phone_control.spr(3),506(75,55))*/
input /*#E*/ 
disconnect;
/*#SDTREF(SDL,D:\122\phone_control.spr(3),524(75,70))*/
output /*#E*/ 
mic_off,sound_off,busy_tone_on,
display_disconnect;
/*#SDTREF(SDL,D:\122\phone_control.spr(3),527(75,95))*/
/*#E*/ 
set(now+30,t1);
/*#SDTREF(SDL,D:\122\phone_control.spr(3),542(75,115))*/
nextstate /*#E*/ 
wait_hook_on;
/*#SDTREF(SDL,D:\122\phone_control.spr(3),602(105,55))*/
input /*#E*/ 
up_keystroke;
grst6:
/*#SDTREF(SDL,D:\122\phone_control.spr(3),623(115,85))*/
call /*#E*/ 
editsmesarr_connected;
/*#SDTREF(SDL,D:\122\phone_control.spr(3),596(130,110))*/
nextstate /*#E*/ 
-;
/*#SDTREF(SDL,D:\122\phone_control.spr(3),593(145,55))*/
input /*#E*/ 
down_keystroke;
/*#SDTREF(SDL,D:\122\phone_control.spr(3),623(115,85))*/
join /*#E*/ 
grst6;
/*#SDTREF(SDL,D:\122\phone_control.spr(3),413(15,35))*/
endstate;
/*#SDTREF(SDL,D:\122\phone_control.spr(3),542(75,115))*/
state /*#E*/ 
wait_hook_on;
/*#SDTREF(SDL,D:\122\phone_control.spr(3),554(75,135))*/
input /*#E*/ 
hook_on;
grst7:
/*#SDTREF(SDL,D:\122\phone_control.spr(3),548(75,155))*/
output /*#E*/ 
busy_tone_off,display(welcome);
/*#SDTREF(SDL,D:\122\phone_control.spr(3),518(45,170))*/
join /*#E*/ 
grst5;
/*#SDTREF(SDL,D:\122\phone_control.spr(3),551(100,135))*/
input /*#E*/ 
t1;
/*#SDTREF(SDL,D:\122\phone_control.spr(3),548(75,155))*/
join /*#E*/ 
grst7;
/*#SDTREF(SDL,D:\122\phone_control.spr(3),542(75,115))*/
endstate;
/*#SDTREF(SDL,D:\122\phone_control.spr,4)*/
endprocess phone_control;
/*#SDTREF(SDL,D:\122\editsmesarr_connected.spd,4)*/
procedure editsmesarr_connected;
/*#SDTREF(SDL,D:\122\editsmesarr_connected.spd(1),167(65,15))*/
dcl  smesarr shortmessagearr;
/*#SDTREF(SDL,D:\122\editsmesarr_connected.spd(1),164(35,30))*/
start /*#E*/ 
;
/*#SDTREF(SDL,D:\122\editsmesarr_connected.spd(1),161(35,50))*/
task /*#E*/ 
j:=0;
grst8:
/*#SDTREF(SDL,D:\122\editsmesarr_connected.spd(1),158(15,65))*/
output /*#E*/ 
display(smesarr!smessarr(j)!mes);
/*#SDTREF(SDL,D:\122\editsmesarr_connected.spd(1),155(20,80))*/
nextstate /*#E*/ 
display_smesarr.smessarr_mes;
/*#SDTREF(SDL,D:\122\editsmesarr_connected.spd(1),155(20,80))*/
state /*#E*/ 
display_smesarr.smessarr_mes;
/*#SDTREF(SDL,D:\122\editsmesarr_connected.spd(1),152(10,100))*/

⌨️ 快捷键说明

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