|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 15360 (0x3c00) Types: TextFile Names: »aosalarmenv«
└─⟦a41ae585a⟧ Bits:30001842 SW-save af projekt 1000, Alarm-system └─⟦72244f0ef⟧ └─⟦this⟧ »aosalarmenv«
▶04◀alarmenv10; (* PT.TSSYS.50/10 *) (**************************************************************** * * * alarmenvironment is included at compiletime to make the * * module know all general constants and types used in the * * alarm system. * * * * call : * * <obj>=pascal80 alarmenv <source> * * * *****************************************************************) const al_env_version = #h10; (*********************************************************** * max-values * ************************************************************) const max_lam = 15; (* max number-1 of lam-driver_inkarnations *) max_at = 256; (* max number of at-connectors in ts *) max_vc = 256; (* max number of vc-connectors in ts *) \f (********************************************************** * simple types * ***********************************************************) type func_grp = 0..15; (* function group in operationcode *) what = (generate,check); (* used by check5-function *) ts_time = array (0..1) of integer; (* the type of time in ts *) statusbits = (unused, at_tim, hs, au, serif, restart, batt_lim, batt_sup); (* possible statusbits from at *) \f (********************************************************** * structured types * ***********************************************************) update_range = #h0..#h07; result_range = #h0..#h1f; (* the structure of a macroaddress *) macroaddr = packed record DC_addr : 0..15; NC_addr : 0..63; TS_addr : 0..63; end; (* the structure af an alarmnetaddress *) alarmnetaddr = record macro : macroaddr; micro : integer; end; (* the fixed part of all alarmmessages *) alarmlabel = packed record no_of_by : integer; rec : alarmnetaddr; send : alarmnetaddr; op_code : byte; update : update_range; result : result_range; ts_add : ts_time; end; (* the structure of a paxnetaddress *) paxnetaddr = packed record net_addr : byte; reg_addr : byte; node_addr: byte; user_addr: integer; end; \f (***************************************************************** * miscellaneous constants * ******************************************************************) const label_size = 14; (* number of bytes in alarmlabel *) AT_control = 24+4+3; (* controlword for LAM-drivers AT-channel *) (* 110 bps, 8 databits, 2 stopelements, no parity *) TS_control =96+24+4+3; (* controlword for LAM-drivers TS-channel *) (* 1200 bps, 8 databits, 2 stopelements, no parity *) VCIT_control = 96+24+4+3; (* controlword for LAM-drivers VC(IT)-channel *) max_byte = 255; max_int = 32767 ; (* max value for an integer in ts *) time = ts_time(0,0); (* time used in messages in demo *) receipt = 1; (* used by at-connector *) \f (************************************************************** * installation parameters for connectors * ***************************************************************) trans_err_rate = 20; (* the rate at which the transmissionerrorcounter is *) (* incremented at transmissionerror *) trans_err_int = 0; (* initial value for transmissionerrorcounter *) stop_poll_lim = 180; (* a stop-poll-alarm is send first time transmissionerrorcounter *) (* is greather than or equal to stop_poll_lim *) service_lim = 100; (* a servicealarm is send first time transmissionerrorcounter *) (* is greather than or equal to service_lim *) max_succ_lin_err = 3; (* a linealarm is send when max_succ_line_err *) (* transmissionerrors has come successively *) tsc_port = 0; (* the port-no used by ts-connector in lam-no 1 *) dcm_out_port = 1; dcm_in_port = 1; (* the port-no used by dc-module in lam-no 1 *) \f (*************************************************************** * listen_buffers * ****************************************************************) (* numbers of listenbuffers *) no_listen = 20; (* the total number of listenbuffers in ts *) (* i.e. allocated in a pool in ts-supervisor *) no_netc_listen = 1; (* the number of listenbuffers at net-connector *) no_vch_listen = 4; (* the number of listenbuffers at vc-handler *) (* the number of listenbuffers at at-connector *) no_vcc_listen = 2; (* the number of listenbuffers at vc-connector *) no_pax_listen = 2; (* the number of listenbuffers at net-connector *) (* i.e. allocated in a pool in net-connector *) (* sizes of listenbuffers *) (* all sizes are given in words *) size_listen = 16; (* size of listenbuffers allocated in ts-supervisor *) size_pax_listen = 32; (* size of listenbuffers allocated in net-connector *) size_supp = 32; (* size of supplybuffers allocated in ts-supervisor *) \f (************************************************************** * talk_buffers * ***************************************************************) (* numbers of talkbuffers *) no_pax_talk =1; (* the number of buffers allocated for sending to paxnet *) no_req_supp = 4; (* the number of buffers used to request for a supplybuffer *) (* at the allocator of the operating system *) no_tss_talk = 0; (* the number of buffers used to talk from ts-supervisor *) no_nc_talk = 5; no_lam_talk = 1; (* the number of buffers used to talk to lam-driver *) (* sizes of talkbuffers given in words *) (* the names are associates to the names given above *) size_pax_talk = 32; size_req_supp = 1; size_tss_talk = 0; size_lam_talk = 2; \f (********************************************************** * timeout_buffers * ***********************************************************) (* numbers of timers_buffers at each modul *) (* timersbuffers are used to give timeout from timeoutmodule *) no_netc_tim = 1; no_tss_tim = 6; no_ath_tim = 30; no_vch_tim = 30; no_atc_tim = 2; no_vcc_tim = 2; (* types of timersbuffers *) type timers = record object : integer; end; (* numbers of updatebuffers at each modul *) (* updatebuffers are used to update time and book a timeout at timeoutmodule *) const no_netc_upd = 1; no_tss_upd = 6; no_ath_upd = 30; no_vch_upd = 30; no_atc_upd = 1; no_vcc_upd = 2; (* type of updatebuffers *) type updates = record index : integer; count : integer; object : integer; end; \f (************************************************************ * time_out_periods * *************************************************************) const (* the timeunit used by timeoutmodule *) time_out_unit = 1000; (* i.e. 1 sec. *) (* short timeout for messages from DC *) tss_dc_stime = -10; (* long timeout for messages from NC *) tss_nc_ltime = -3*60; (* short timeout for messages from NC *) tss_nc_stime = -5; (* timeout for messages from netc to tss *) \f (********************************************************** * values for u3 * ***********************************************************) (* routes between modules in ts *) tim_route = 20; tim_route1 = 21; tim_route2=22; (* buffer must bee returned by any moduls *) dummy_route = 0; (* buffer goes from netc or tss down in ts *) netc_route = 2; netc_route1 = 3; at_route = 4; at_route1 = 5; vca_route = 6; vca_route1 = 7; vci_route = 8; vci_route1 = 9; (* buffer from lam *) lam_route = 10; (* buffer from tss *) tss_route = 12; (* buffer from DC-module *) dc_route = 14; op_route = 16; (* buffer from TTY-module *) nc_route = 18; (* buffer from NC supervisor *) \f (********************************************************** * microaddresses * ***********************************************************) (* lower limit for at-microaddresses *) at_addr_limit = 256; (* lower limit for vc-microaddresses *) vc_addr_limit = 32; tss_mic_addr = 0; ath_mic_addr = 1; vch_mic_addr = 2; netc_mic_addr = 3; dc_log_mic_addr = 3; dc_poll_mic_addr = 5; dc_test_mic_addr = 6; dc_erh_mic_addr = 7; \f (*********************************************************** * table_lengthes * ************************************************************) vca_vcm_l = 5; (* no of entries in vca_vcm_table *) at_l = 8; (* no of entries in at-table *) vc_l = 3; (* no of entries in vc_table *) vc_addr_l = 5; (* no of entries in vc_address_table *) at_addr_l = 5; (* no of entries in at-address-table *) at_ts_l = 5; (* no of entries in at_ts_table *) vcmit_l = 5; (* no of entries in vcm(it)_table *) vcmat_l = 5; (* no of entries in vcm(at)_table *) vce_l = 5; (* no of entries in vce_table *) timeout_l = 70; (* number of entryes in timeouttables *) lam_l = max_lam+1; (* number of entryes in lam_table *) \f (********************************************************** * semaphorenumbers * ***********************************************************) (* index in ts_sem_tab *) tssup_sem_no = 1; ath_sem_no = 2; vch_sem_no = 3; netc_sem_no = 4; timeout_sem_no = 5; nc_sem_no = 6; dc_sem_no = 7; vas_sem_no = 8; vis_sem_no = 9; tssup_int1 = 10; tssup_int2 = 11; tssup_int3 = 12; ath_int1 = 13; vch_int1 = 14; net_int1 = 15; net_int2 = 16; net_int3 = 17; net_int4 = 18; dc_int1 = 20; dc_int2 = 21; dc_int3 = 22; dc_int4 = 23; ncsup_int1 = 24; ncsup_int2 = 25; tap_sem_no = 26; tap1_sem_no = 27; com_pool = 28; alc_sem_no = 30; lam_sem_no = 35; vagt_int = lam_sem_no + lam_l; vcc_sem_no = vagt_int + 5 * vc_l; atc_sem_no = vcc_sem_no + ( vc_l * 2 ); ts_sem_total = atc_sem_no + ( at_l * 2 ) +3; type ts_pointer = record s : sempointer; w : sempointer; end; ts_pointer_vector = array (1..ts_sem_total) of ts_pointer; \f (********************************************************** * create parameters * ***********************************************************) const create_unit = 512; tss_size = 2*create_unit; ath_size = create_unit+13*at_l+4*vca_vcm_l;; vch_size = create_unit+11*vc_l; atc_size = create_unit; vac_size = 2*create_unit; vic_size = 2*create_unit; tim_size = create_unit+timeout_l*6; netc_size = 2*create_unit; tsc_size = create_unit; dc_sim_size = 4*create_unit; vas_size = 2*create_unit; vis_size = 2*create_unit; lam_size = 4*create_unit; tap_size = create_unit; nc_sup_size = 600; pu_no = 0; tss_pri = -1; ath_pri = -1; vch_pri = -1; vcc_pri = -1; atc_pri = -1; tim_pri = -1; netc_pri = -1; dc_sim_pri = -1; vc_sim_pri = -1; lam_pri = 0; tsc_pri = -1; tap_pri = -1; \f (********************************************************** * table_entrys * ***********************************************************) type at_range = 0..at_l; vc_range = 0..vc_l; vc_sem_range = vcc_sem_no..vcc_sem_no + 2 * vc_l - 1; \f (**************************************************** * types and values used in dataparts * *******************************************************) type alarm = array (1..2*size_listen - label_size - 2) of byte; steering = array (1..2*size_listen - label_size - 2) of byte; alarm_code = byte; status_byte = byte; count_code = byte; at_address = alarmnetaddr; operation_code = byte; vcavcm_index = integer; lam_no= byte; port_no= byte; start_stop_code = byte; vc_type = byte; test_byte = byte; const (* values for countcode and alarmcode *) recall = 0; start_code = 0; stop_code = 1; service_code = 2; (* values for vc-type *) vcat = 0; vcit = 1; (* values for updatecode *) read_code = 0; insert_code = 1; modify_code = 2; remove_code = 3; (* values for timeout functions - u1 *) type buffertype = record first, last, next: integer; name: alfa; data: array (1..80) of char; end; zone = record testoutpool: pool 1 of buffertype; testoutsem: semaphore; opsem: ^semaphore end; (****************************************************** * external functions and procedures * *******************************************************) (* check5 is used to generate or control the five *) (* checkbits in a telegram sent to or received from *) (* at or vc(at) *) function check5( var msg: reference; dowhat : what ): boolean; external; (* timerbook is used to book a timeout at imeoutmodule *) procedure timerbook( var book_mess, timer_mess : reference; ticks, object: integer; var timeout_sem, answer: semaphore ); external; (* timerupdate is used to update timeoutperiod at *) (* timeoutmodule *) procedure timerupdate( var update_mess:reference; ticks: integer; var timeout_sem, answer: semaphore ); external; (* testopen is used to open testmode for a module *) procedure testopen( var z: zone; modulename: alfa; ps: ^semaphore ); external; procedure testout( (* testout is used to send a message to the operatormodule *) var z: zone; text: alfa; i: integer ); external; (* count is used for counting, without risk for overflow *) procedure count ( var c: integer ); external; . ▶EOF◀