DataMuseum.dk

Presents historical artifacts from the history of:

RC3500

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC3500

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦2c6086e31⟧ TextFileVerbose

    Length: 26112 (0x6600)
    Types: TextFileVerbose
    Names: »tsdtejob«

Derivation

└─⟦a41ae585a⟧ Bits:30001842 SW-save af projekt 1000, Alarm-system
    └─⟦72244f0ef⟧ 
        └─⟦this⟧ »tsdtejob« 

TextFileVerbose

job oer 6 200 time 11 0 area 10 size 100000
(
source = copy 25.1
tsdtelst = set 1 disc1
tsdteerr = set 1 disc1
tsdtelst = indent source mark lc
listc = cross tsdtelst
o tsdteerr
message ts dte sim
pascal80  codesize.1024 alarmenv paxenv source
o c
lookup pass6code
if ok.yes
( tsdtebin = set 1 disc1
tsdtebin = move pass6code
scope user tsdtebin
)
tsdtelst = copy listc tsdteerr
scope user tsdtelst
scope user tsdteerr
finis output.no
)

process  dtesimulator(
op_sem   : sempointer;  (* operator semaphore *)
var
pax_pool_sem,
dte_sem : !ts_pointer;
var
netc_sem,
rut_trm_sem,
(*              equal to utrm at local receiver *)
rut_rec_sem  : !sempointer;   
(*              equal to urec at local transmitter *)
dte_adr : int_pax_addr
);

const
version = "vers  1.14 /";
(*----------------------*)

(*===================================================================
"                                                                   "
"  FUNCTION : DTE establishes a connection between PAXCON and       "
"             ROUTER in the prototype of the alarmsystem.           "
"                                                                   "
"  STRATEGI : DTE converts one DTE-function to one ore more         "
"             ROUTER-functions.                                     "
"                                                                   "
=====================================================================*)

\f


(*   INTRODUCTION TO DTE   

Abbreviation list :
-----------------

mes               message

op                operator

ptr               pointer

sem               semaphore

ts                terminal station


Pseudo code version 80.12.19 :
----------------------------
*)
\f


(*-----------------------------------------------------------
-   constants                                               -
-------------------------------------------------------------*)
const

max_calls = max_stream_no-min_stream_no+1;
\f


(*--------------------------------------------------------------
-  types                                                       -
----------------------------------------------------------------*)
type

stream_e
= record
car_ref : reference;
l_rec_q : integer;
receive_queue : semaphore;
dst_stream : byte;
dst : int_pax_addr;
facility : integer;
state : state_type;
priority : byte;
diag_code : byte
end;

calls_e
= record
dst : int_pax_addr;
dst_stream : byte;
used : boolean ;
facility : integer;
end;
\f


(*-----------------------------------------------------------
.   variables section                                       .
-------------------------------------------------------------*)
var
i : integer;

ref,
rut_buf_ref,
in_ref   :  reference;

z : zone;

ric_pool : semaphore;

calls : array (1..max_calls) of calls_e;

streams : array ( min_stream_no..max_stream_no) of stream_e;

act_stream_no : integer;
act_dst : int_pax_addr;
act_user_field : integer;
act_call_no : integer;
act_result : byte;
act_diag_code : byte;
act_pac_state : byte:=0;

no_trm_bufs : integer := 0;

no_rec_bufs : integer := 0;


cur_facility : integer := 0;

tst : byte := 255;

(*
 8 - write actions on streams
16 - write results from router
32 - write table entryes
64 - write testsections
128 - write procedure calls
*)
\f


(*==============================================================
=   procedures section                                         =
================================================================*)

procedure ts_wait(
var
mes_ref  : reference;
sem_ptr  : sempointer
);

(*-----------------------------------------------------------
. wait with return of dummy messages                        -
-------------------------------------------------------------*)

begin

wait( mes_ref, sem_ptr^);

while mes_ref^.u3 = dummy_route do
begin
if tst>4 then
testout(z,"returned    ",mes_ref^.u1);
signal( mes_ref, pax_pool_sem.s^);
wait( mes_ref, sem_ptr^);
end;

end (* ts_wait *);

\f


procedure write_adr (
adr : int_pax_addr );
(*------------------------------------------------------
.  writes a internal paxnet address
--------------------------------------------------------*)
begin
testout(z,"int-node-adr", adr.node_addr);
end;
\f


procedure write_stream (
i : byte );
(*-------------------------------------------------------
.   writes the content of stream table entry i
---------------------------------------------------------*)
begin
with streams(i) do
begin
testout(z,"stream-table",i);
if nil(car_ref) then
testout(z,"car-ref nil ",i)
else
testout(z,"car-ref used",i);
testout(z,"l-rec-q     ", l_rec_q);
testout(z,"dst-stream  ", dst_stream);
write_adr( dst);
testout(z,"facility    ", facility);
testout(z,"diag-code   ", diag_code);
end;
end;
\f


procedure write_call (
i : byte );
(*----------------------------------------------------
.  writes the content of calls table entry i
------------------------------------------------------*)
begin
with calls(i) do
begin
if used then
testout(z,"entry used  ", i)
else
testout(z,"entry not us", i);
write_adr( dst);
testout(z,"dst-stream  ", dst_stream);
testout(z,"facility    ", facility );
end;
end;
\f


function free_call_id : integer;
(*------------------------------------------------------
-   finds a free entry in calls table                  -
--------------------------------------------------------*)
var
i : integer:=1;
begin
while ( calls(i).used ) and (i<max_calls) do
i:= i+1;

if calls(i).used then
free_call_id := -1
else
free_call_id := i;
if tst>32 then
testout( z, "free call id",i);
end;
\f


procedure call_to_stream (
call_index ,
stream_index : byte );
(*-----------------------------------------------------
-   moves all call-values from calls to streams       -
-------------------------------------------------------*)
begin
with streams( stream_index) do
begin
dst_stream := calls( call_index).dst_stream;
dst := calls( call_index).dst;
facility := calls( call_index).facility;

if tst>32 then
begin
testout(z,"calls moved ", call_index);
testout(z,"dst-stream  ", dst_stream);
write_adr( dst);
testout(z,"facilities  ", facility);
end;

end;

calls( call_index).used := false;
end;
\f


procedure clear_stream_table (
indx : byte );
(*-----------------------------------------------------------
.  clears the streamtable index stream-no
-------------------------------------------------------------*)
begin
if tst>32 then
write_stream(indx);

with streams( indx) do
begin
if not nil( car_ref) then
begin
car_ref^.u2 := dte_user_clear;
signal( car_ref, netc_sem^);
end;

dst_stream := 0;
dst := int_pax_addr(0,0,0,0);
facility := 0;
diag_code := 0;
state := clearing;
end;
end;
\f


procedure get_transmit_buf (
var ref : reference );
(*------------------------------------------------------
-   allocates a transmitbuffer and makes it ready for use
--------------------------------------------------------*)
begin
sensesem( ref, pax_pool_sem.w^);

if not nil( ref) then
begin
no_trm_bufs := no_trm_bufs +1;

if tst>128 then
testout(z,"get-trm-buf ", no_trm_bufs);

ref^.u1 := rut_trp;
ref^.u2 := rut_default;
ref^.u3 := rut_default;
ref^.u4 := from_link;

lock ref as buf : rut_trp_pdata do
begin
with buf.rut_prefix do
begin
first := l_rut_prefix;
last := l_rut_prefix + l_phead1 + l_control  -1;
ext_no := dte_adr.ext_addr;
end;

with buf.phead do
begin
format := rut_format_1;
priority := rut_prio_0;
packet_type := rut_pack_type;
state := 0;
org := dte_adr;
top_of_data := l_rut_prefix + l_phead1 + l_control ;
end;
end;
end
else
if tst>128 then
testout(z,"no trm bufs ", 0);
end;
\f


procedure send_rpacket_bufs (
no_of_bufs : byte );
(*---------------------------------------------------------
-   sends receive packet buffers to router                -
-----------------------------------------------------------*)
var
i : integer;
ref : reference;
begin
for i := 1 to no_of_bufs do
begin
sensesem( ref, pax_pool_sem.w^);

if not nil( ref) then
begin
no_rec_bufs := no_rec_bufs +1;

if tst>128 then
testout(z,"get-rec-buf ", no_rec_bufs);

ref^.u1 := rut_rec;
ref^.u2 := rut_default;
ref^.u3 := rut_default;
ref^.u4 := from_link;

lock ref as rec : rut_trp_pdata do
with rec do
begin
with rec.rut_prefix do
begin
first := l_rut_prefix ;
last := first + max_l_data+ l_phead1-1;
ext_no := dte_adr.ext_addr;
end;

with rec.phead do
begin
format := rut_format_1;
priority:=0;
packet_type := rut_pack_type;
dst := int_pax_addr(0,0,0,0);
state := 0;
org := dte_adr;
facility := cur_facility;
top_of_data := rut_prefix.first + max_l_data +1;
user_field := rut_rec;
end;
end;

signal( ref, rut_rec_sem^);
end
else
if tst>128 then
testout(z,"no rpac bufs", 0);
end;
end;
\f


procedure act_destination;
(*--------------------------------------------------------------
-   converts an external paxnetaddress to an internal          -
-   paxnetaddress                                              -
----------------------------------------------------------------*)

var
i : integer := 0;
begin

lock in_ref as dte_buf : car_buf_type do
while (dte_buf.call_buf.dte_adr <> paxnet_config(i))
and (i<15) do i := i+1;

act_dst.net_addr := 0;
act_dst.reg_addr := 0;
act_dst.node_addr := i;
act_dst.ext_addr := 3;

if tst>64 then
testout(z,"dst-node-adr", i);
end;
\f


function external_addr (
internal_addr : int_pax_addr
): ext_pax_addr;
(*--------------------------------------------------------------
-   converts an internal paxnetaddress to an external paxnetaddress
----------------------------------------------------------------*)
begin

if internal_addr.node_addr < 15 then
external_addr := paxnet_config( internal_addr.node_addr)
else
external_addr := paxnet_config(15);

if tst>64 then
testout(z,"ext-addr-ix ", internal_addr.node_addr);
end;
\f


(*------------------------------------------------------------
.     MAIN PROGRAM                                           .
--------------------------------------------------------------*)
begin

testopen( z, own.incname, op_sem);
testout(  z, version    , al_env_version);
testout(z,"int_pax_adr ", 0);
write_adr( dte_adr);

(* initialize streams-array  *)

for i := min_stream_no to max_stream_no do
with streams(i) do
begin
l_rec_q := 0;
dst_stream := 0;
dst := int_pax_addr(0,0,0,0);
facility := 0;
diag_code := 0;
state := free;
priority := rut_prio_0;
end;

(*  initialize call-array  *)

for i:= 1 to max_calls do
begin
calls(i).used := false;
calls(i).facility := 0;
end;
if tst>64 then
testout(z,"testsection ", 1);
\f


(*---   connect extension in router   ---*)
(*-------------------------------------*)

sensesem( in_ref, pax_pool_sem.w^);

if not nil( in_ref) then
begin
in_ref^.u1 := rut_con;
in_ref^.u2 := rut_default;
in_ref^.u3 := rut_default;
in_ref^.u4 := from_link;

lock in_ref as buf : rut_prefix_type do
buf.ext_no := dte_adr.ext_addr;

signal( in_ref, rut_rec_sem^);

if tst>128 then
testout(z,"cex         ",1);
end;

send_rpacket_bufs(2);
\f


repeat

ts_wait( in_ref, dte_sem.w);


if in_ref^.u4 = from_link then
(*---------------------------------------------------
.   buffer from ROUTER
-----------------------------------------------------*)

if in_ref^.u2 = rut_ok then

begin
case in_ref^.u1 of

rut_con :
(*----------   connect extension   ----------*)
begin
if tst>64 then
testout(z,"testsection ", 1);
if tst>16 then
case in_ref^.u2 of
rut_ok :
begin
testout( z, "dte connectd",0);
end;
rut_no_res :
begin
testout(z,"connect err", rut_no_res);
testout( z, "no resources", 0);
testout( z, " in router  ", 0);
end;
rut_ext_err :
begin
testout(z,"connect err", rut_ext_err);
testout( z, "extentionerr", 0);
end
otherwise
testout( z, "unknown err ", in_ref^.u2);
end;

signal( in_ref, pax_pool_sem.s^);
end;
\f


rut_srdy :
(*----------   sense ready   ----------*)
begin
if tst>16 then
testout( z, "sense ready ", in_ref^.u2);
signal( in_ref, pax_pool_sem.s^);
end;

rut_dis :
(*----------   disconnect extension   ----------*)
begin
if tst>16 then
testout( z, "discon ext  ", in_ref^.u2);
signal( in_ref, pax_pool_sem.s^);
end;


rut_res :
(*----------   reset   ----------*)
begin
if tst>16 then
testout(z,"rut-res     ",0);
signal( in_ref, pax_pool_sem.s^);
end;
\f


rut_trp , rut_dir :
(*----------   transmit packet   ----------*)
begin
if tst>8 then
testout(z,"rut-trp     ",in_ref^.u2);
<*
act_result := in_ref^.u2;
lock in_ref as buf : rut_trp_pdata do
begin
act_user_field := buf.phead.user_field div 256;
act_stream_no := buf.phead.user_field mod 256;
if tst>8 then
testout(z,"act-streamno", act_stream_no);

if ( act_user_field = dte_car)
and ( act_stream_no > 0) then
begin
ref :=: streams( act_stream_no).car_ref;
ref^.u2 := dte_ok_result;
signal( ref, netc_sem^);
end;
end;
*>
signal( in_ref, pax_pool_sem.s^);
end;
\f


rut_rec :
(*----------   receive packet   ----------*)
begin
if tst>8 then
testout(z,"rut-rec     ",0);

lock in_ref as buf : rut_trp_pdata do
begin

act_pac_state := buf.phead.state;
if tst>4 then
testout(z,"act pac stat", act_pac_state);
act_user_field := buf.phead.user_field div 256 ;
act_stream_no := buf.phead.user_field mod 256;
act_dst := buf.phead.org;

if tst>32 then
begin
testout(z,"rec-origin  ",0);
write_adr( act_dst);

testout(z,"act-user-fld", act_user_field);
testout(z,"act_streamno", act_stream_no);
end;

case act_user_field of
\f


dte_car :
begin  (*-------  it is an incomming call  --------*)

sensesem( ref, ric_pool);

if not nil( ref) then
begin
act_call_no := free_call_id;

if act_call_no <> -1 then
begin

if tst>64 then
begin
testout(z,"testsection ", 3);
testout(z,"us=dte-car  ",dte_car);
end;

ref^.u2 := dte_ok_result;

if tst>64 then
testout(z,"act-call-no ", act_call_no);

calls( act_call_no).dst_stream := act_stream_no;
calls( act_call_no).used := true;
calls( act_call_no).dst  := act_dst;

lock ref as ric : ric_buf_type do
with ric do
begin
first := ric_first_val;
last := ric_first_val + l_listen+l_control-1;
call_id := act_call_no;
call_buf.dte_adr_l := l_dte_adr;
call_buf.dte_adr := external_addr( act_dst);
call_buf.facility_l := l_facilities;
call_buf.facility := buf.phead.facility;
call_buf.control := buf.control;
call_buf.alarm_mess := buf.alarm_mess;
end;

signal( ref, netc_sem^);
end
else
begin
signal( ref, ric_pool);
testout(z,"no free call", 0);
end
end
else
testout(z,"no ric bufs ", 0);
end;
\f


dte_clr :
(*    call clear from remote user  *)
begin
if tst>64 then
begin
testout(z,"testsection ", 6);
testout(z,"us=dte-clr  ", dte_clr);
end;

(*  send diag-code to local user  *)

sensesem( ref, streams( act_stream_no).receive_queue);

while not nil( ref) do
begin
ref^.u2 := dte_remo_clear;

lock ref as dte_buf : dte_sdata_data do
dte_buf.control := buf.control;

signal( ref, netc_sem^);
streams(act_stream_no).l_rec_q := streams(act_stream_no).l_rec_q -1;
sensesem( ref, streams(act_stream_no).receive_queue);
end;


if streams( act_stream_no).state = clearing then
streams( act_stream_no).state := free
else
begin
get_transmit_buf( rut_buf_ref);

if not nil( rut_buf_ref) then
begin
lock rut_buf_ref as rut_buf : rut_trp_pdata do
with rut_buf do
begin
with phead do
begin
dst := streams(act_stream_no).dst;
facility := streams(act_stream_no).facility;
user_field := dte_clr * 256 + streams(act_stream_no).dst_stream;
end;
control.op_code := dte_user_clear;
control.data := 0;
end;
signal( rut_buf_ref, rut_trm_sem^);
end
else
testout(z,"no pax bufs ", 0);

clear_stream_table( act_stream_no);
end;

end;
\f


dte_aic :
(*  call accept from remote user  *)
begin
if tst>64 then
begin
testout(z,"testsection ", 11);
testout(z,"us=dte-aic  ", dte_aic);
end;

streams( act_stream_no).dst_stream := buf.control.data;
end;


dte_rejic :
(*  call reject from remote user  *)
begin
if tst>64 then
begin
testout(z,"testsection ", 11);
testout(z,"us=dte-rejic",dte_rejic);
end;

streams( act_stream_no).diag_code := buf.control.data;
sensesem( ref, streams( act_stream_no).receive_queue);

if not nil( ref) then
begin
lock ref as dte_buf : dte_sdata_data do
begin
ref^.u2 := dte_remo_clear;
dte_buf.control := buf.control;
end;
signal( ref, netc_sem^);
sensesem( ref, streams( act_stream_no).receive_queue);
end;

while not nil( ref) do
begin
ref^.u2 := dte_remo_clear;
signal( ref, netc_sem^);
sensesem( ref, streams( act_stream_no).receive_queue);
end;
end;

\f


dte_sdata :
(*  data from remote user *)
begin
if tst>64 then
begin
testout(z,"testsection ", 5);
testout(z,"us=dte-sdata", dte_sdata);
end;
sensesem( ref, streams( act_stream_no).receive_queue);

if not nil( ref) then
begin
ref^.u2 := dte_ok_result;

lock ref as dte_buf : dte_sdata_data do
begin
dte_buf.control := buf.control;
dte_buf.alarm_mess := buf.alarm_mess;

dte_buf.first := sdata_first_val;
dte_buf.last := dte_buf.first + l_control+l_listen-1;

end;

signal( ref, netc_sem^);
end
else
if tst>64 then
testout( z, "no dte_rdata", act_stream_no);
end
otherwise
begin
if tst>64 then
testout(z,"userfield is", act_user_field);
end;


end (* case *);

end (* lock in_ref *);

in_ref^.u2 := rut_default;
signal( in_ref, rut_rec_sem^);

end;
\f


rut_stat :
(*----------   status   ----------*)
begin
if tst>64 then
testout(z,"rut-stat    ",0);
end;

otherwise
(*----------   unknown router-function   ----------*)
begin
if tst>64 then
testout(z,"unkn rutfkt ",0);
end
end;  (*  case router-functions  *)
end
else
begin
if tst>16 then
begin
case in_ref^.u2 of

rut_not_proc :
testout(z,"not processd",in_ref^.u1);
rut_ill :
testout(z,"ill rut fkt ",in_ref^.u1);
rut_no_res :
testout(z,"no-resources",in_ref^.u1);
rut_ext_err :
testout(z,"extension er",in_ref^.u1);
rut_default :
testout(z,"rut-default ",in_ref^.u1);
rut_format_err :
testout(z,"rut-form-err",in_ref^.u1);
rut_buffer_err :
testout(z,"rut-buff-err",in_ref^.u1);
otherwise
testout(z,"unkn rut res",in_ref^.u2);
end (* case *);

lock in_ref as r : rut_trp_pdata do
case r.phead.state of
1,6 : testout(z,"no-resources", 3);
5 : testout(z,"dst-unknown ", 3);
7 : testout(z,"congestion  ",3);
8 : testout(z,"lifetime exc",3);
9 : testout(z,"line error  ",3);
otherwise
testout(z,"router state", r.phead.state);
end;
end;

signal( in_ref, pax_pool_sem.s^);
end

\f


else
if in_ref^.u4 = to_link then
(*---------------------------------------------------
.   buffer from NETCON
-----------------------------------------------------*)
begin
if ((in_ref^.u3 < min_stream_no) or (in_ref^.u3 > max_stream_no))
and (in_ref^.u1 <> dte_ric) and (in_ref^.u1 <> dte_rejic) then
begin
in_ref^.u2 := dte_stream_err;
signal( in_ref, netc_sem^);
end
else
case in_ref^.u1 of

dte_car :
(*   call from local user  *)
begin
if tst>64 then
begin
testout(z,"testsection ", 10);
testout(z,"dte-car     ",1);
end;

get_transmit_buf( rut_buf_ref);
act_stream_no := in_ref^.u3;

act_destination;
if tst>64 then
begin
testout(z,"act-dst     ", 0);
write_adr( act_dst);
end;

if not nil( rut_buf_ref) then
begin

lock in_ref as dte_buf : car_buf_type do

lock rut_buf_ref as rut_buf : rut_trp_pdata do
begin
with rut_buf.phead do
begin
dst := act_dst;
facility := dte_buf.call_buf.facility;
streams( act_stream_no).facility := facility;
user_field := dte_car * 256 + act_stream_no;
top_of_data := top_of_data + dte_buf.call_buf.alarm_mess.al.no_of_by+2;
end;

rut_buf.control := dte_buf.call_buf.control;
rut_buf.alarm_mess := dte_buf.call_buf.alarm_mess;
rut_buf.rut_prefix.last := rut_buf.rut_prefix.last
+ dte_buf.call_buf.alarm_mess.al.no_of_by+2;
end;

signal( rut_buf_ref, rut_trm_sem^);
end
else
testout(z,"no pax bufs ", 1);

if nil( streams( act_stream_no).car_ref) then
streams( act_stream_no).car_ref :=: in_ref
else
begin
in_ref^.u2 := dte_ok_result;
signal( in_ref, netc_sem^);
end;
streams( act_stream_no).dst := act_dst;

if tst>32 then
write_stream( act_stream_no);
end;
\f


dte_clr :
(*   clear call from local user *)
begin
if tst>64 then
begin
testout(z,"testsection ",13);
testout(z,"dte-clr     ", 1);
end;

lock in_ref as dte_buf : clear_buf_type do
act_diag_code := dte_buf.diag_code;

(*  send diag-code to remote dte  *)

get_transmit_buf( rut_buf_ref);

if not nil( rut_buf_ref) then
begin
lock rut_buf_ref as rut_buf : rut_trp_pdata do
with rut_buf do
begin
with phead do
begin
dst := streams( in_ref^.u3).dst;
facility := streams( in_ref^.u3).facility;
user_field := dte_clr *256 + streams( in_ref^.u3).dst_stream;
end;
control.op_code := dte_clr;
control.data := act_diag_code;
end;
signal( rut_buf_ref, rut_trm_sem^);
end
else
testout(z,"no pax bufs ", 3);

(*  clear stream table *)

clear_stream_table( in_ref^.u3);


(* return clear call buffer *)
in_ref^.u2 := dte_ok_result;
signal( in_ref, netc_sem^);
end;
\f


dte_ric :
(* local user ready for receive call *)
begin
if tst>64 then
begin
testout(z,"testsection ", 2);
testout(z,"dte-ric     ",1);
end;
signal( in_ref, ric_pool);
end;


dte_rdata :
(* local user ready for receive data *)
begin
if tst>64 then
testout(z,"testsection ", 2);
act_stream_no := in_ref^.u3;
with streams( in_ref^.u3) do
begin
l_rec_q := l_rec_q +1;
if tst>64 then
testout(z,"dte-rdata   ", l_rec_q);
end;
signal( in_ref, streams( act_stream_no).receive_queue);
end;

\f


dte_sdata :
(*  local user sends data  *)
begin
if tst>64 then
testout(z,"testsection ", 12);

get_transmit_buf( rut_buf_ref);
act_stream_no := in_ref^.u3;

if not nil( rut_buf_ref) then
begin
lock in_ref as dte_buf : dte_sdata_data do
lock rut_buf_ref as rut_buf : rut_trp_pdata do
begin
with rut_buf.phead do
begin
dst := streams( act_stream_no).dst;
facility := streams( act_stream_no).facility;
user_field := dte_sdata * 256 + streams( act_stream_no).dst_stream;
top_of_data := top_of_data + dte_buf.alarm_mess.al.no_of_by+2;
end;

rut_buf.control := dte_buf.control;
rut_buf.alarm_mess := dte_buf.alarm_mess;
rut_buf.rut_prefix.last := rut_buf.rut_prefix.last
+ dte_buf.alarm_mess.al.no_of_by+2;

if tst>64 then
testout(z,"trm-data    ",dte_buf.control.op_code);


end;

signal( rut_buf_ref, rut_trm_sem^);
end
else
testout(z,"no pax bufs ", 4);

in_ref^.u2 := dte_ok_result;
signal( in_ref, netc_sem^);
end;
\f


dte_aic :
(* local user accepts a call *)
begin
if tst>64 then
begin
testout(z,"testsection ", 4);
testout(z,"dte-aic     ",1);
end;

get_transmit_buf( rut_buf_ref);
act_stream_no := in_ref^.u3;

if not nil( rut_buf_ref) then
begin
lock in_ref as dte_buf : aic_buf_type do
lock rut_buf_ref as rut_buf : rut_trp_pdata do
begin
call_to_stream( dte_buf.aic_id, act_stream_no);

with rut_buf.phead do
begin
dst := streams( act_stream_no).dst;
facility := streams( act_stream_no).facility;
user_field := dte_aic * 256 + streams( act_stream_no).dst_stream;
end;


rut_buf.control.data := act_stream_no;
end;

signal( rut_buf_ref, rut_trm_sem^);
end
else
testout(z,"no pax bufs ", 5);

in_ref^.u2 := dte_ok_result;
signal( in_ref, netc_sem^);

end;
\f


dte_rejic :
(* local user rejects a call *)
begin
if tst>64 then
begin
testout(z,"testsection ", 4);
testout(z,"dte-rejic   ",1);
end;

get_transmit_buf( rut_buf_ref);
act_stream_no := in_ref^.u3;

if not nil( rut_buf_ref) then
begin
lock in_ref as dte_buf : rejic_buf_type do
lock rut_buf_ref as rut_buf : rut_trp_pdata do
begin
calls( dte_buf.rejic_id).used := false;

with rut_buf.phead do
begin
dst := calls( dte_buf.rejic_id).dst;
facility := calls( dte_buf.rejic_id).facility;
user_field := dte_rejic * 256 + calls(dte_buf.rejic_id).dst_stream;
end;

rut_buf.control.op_code := dte_rejic;
rut_buf.control.data := dte_buf.rejic_diag;
end;

signal( rut_buf_ref, rut_trm_sem^);
end
else
testout(z,"no pax bufs ", 6);
in_ref^.u2 := dte_ok_result;
signal( in_ref, netc_sem^);

end;
\f


dte_res :      (*  reset  *)
begin
if tst>8 then
testout(z,"dte-reset   ", in_ref^.u1);
in_ref^.u2 := dte_ok_result;
signal( in_ref, netc_sem^);
end;

dte_stat :     (*  status  *)
begin
if tst>8 then
testout(z,"dte-status  ", in_ref^.u1);
in_ref^.u2 := dte_ok_result;
signal( in_ref, netc_sem^);
end;
otherwise
begin
if tst>8 then
testout(z,"dte-unkn-fkt", in_ref^.u1);
in_ref^.u2 := dte_ok_result;
signal( in_ref, netc_sem^);
end;
end;
end
else
if in_ref^.u4 = dyn_test then
begin
tst := in_ref^.u3;
signal( in_ref, pax_pool_sem.s^);
end
else
begin
if tst>8 then
testout(z,"ill buffer  ", in_ref^.u4);
release( in_ref);
end;

until false;

end.
«eof»