NetIPC 3000/XL Programmer's Reference Manual (5958-8600)

Table Of Contents
154 Chapter4
NetIPC Examples
Example 3
i := i+1;
end;{else send}
end;{while}
p_transit_time := timer - chrono;
end;{data transfer}
{-------------------------SHUTDOWN-----------------------------------}
{ PURPOSE : Shutdown call, destination and vc descriptor }
{ according to the value of rc. }
{ Display the results of set up and transit time }
{ Ask to retry }
{--------------------------------------------------------------------}
PROCEDURE shutdown;
begin
if rc <= error then
begin
{------------------------------------}
{ Shutdown the vc descriptor. }
{ Send CLEAR on the line. }
{------------------------------------}
IPCShutdown (p_vc_desc,,,result);
if result <> 0 then check (result,i_shut_connection);
writeln ('CLEAR packet sent ...');
end;
if rc <= no_vc_desc then
begin
{------------------------------------}
{ Shutdown the destination desc. }
{------------------------------------}
IPCShutdown (p_dest_desc,,,result);
if result <> 0 then check (result,i_shut_dest);
end;
if rc <= no_dest_desc then
begin
{------------------------------------}
{ Shutdown the call descriptor. }
{------------------------------------}
IPCSHUTDOWN (p_call_desc,,,result);
if result <> 0 then check (result,i_shut_source)
end;
if rc = done then
begin
{------------------------------------}
{ Display the results. }
{------------------------------------}
writeln ('The following figures have been measured on the network :');
writeln (' Set up time : ',p_set_up_time:10,' ms');
writeln (' Transit time : ',(p_transit_time/(c_nb_loop*2)):10:0,
' ms');
p_retry := ask_y_n ;
end;
end;{shutdown}