{------------------------------------------------------------------------------ { { D D D 0 0 { D D 0 { D 0 D 0 { D 0 D 0 { D 0 D 0 { D 0 0 { D D D 0 0 ------- D0 Online Software { { { ITC Setup and Initialize -- SETUP_INIT.EPAS { { Purpose and Methods : Routines and data structures used to setup and { initialize all ITC modules and user data structures. { ITC_Init is exported to users so that they can { change the default sizes of the ring buffer and { channel control block array. { { Arguments : None { { Created on October 23, 1989 by John Featherly { {------------------------------------------------------------------------------ } Module Setup_Init; Include GLOBAL; Var ker$gt_node_name : [external] varying_string(6); ker$gq_node_address : [external] array [1..4] of $uword; {--------------------------- { ITC_Init { { User can specify the size { of the CCB and Ring Buff { arrays if they call this { before it's called by { default. { { 6 May 1991 Scott Snyder { Let the user specify limits. {--------------------------- } Procedure ITC_Init ( var Par_Number_of_channels : [OPTIONAL] Channel_Range; var Par_Ring_Buff_Size : [OPTIONAL] Ring_Buff_Range ); Function Par_Check (Par, Def, Max : Integer ) : Integer; Begin If Par > Max Then Par_Check := Max Else If Par < Def Then Par_Check := Def Else Par_Check := Par End; Var Cur_Process : PROCESS; Begin {------------------ { set the sizes of { channel and ring { buffer size {------------------ } If not Init Then Begin {------------------ { set the sizes of { channel and ring { buffer size { also the max { message size {-----------------} If Present(Par_Number_of_Channels) Then Number_of_Channels := Par_Check( Par_Number_of_Channels, Def_Number_of_Channels, Max_Number_of_Channels) Else Number_of_Channels := Def_Number_of_Channels; If Present(Par_Ring_Buff_Size) Then Ring_Buff_Size := Par_Check( Par_Ring_Buff_Size, Def_Ring_Buff_Size, Max_Ring_Buff_Size) Else Ring_Buff_Size := Def_Ring_Buff_Size; Con_data.comp.odblen := 12; CURRENT_PROCESS( cur_process); Con_data.comp.ID := cur_process::integer; Con_data.comp.Node_Name := ker$gt_node_name; Con_data.comp.Node_Numb := ker$gq_node_address[3]; Init := True End {init'd for the very first time} {Else do nothing, have been init'd previously} End { ITC Init }; End { Module Setup Init }.