1 /* BEGIN INCLUDE FILE devid.incl.pl1 */ 2 3 /* Rewritten September 1977 by T. Casey to implement a new method of device charging. */ 4 5 6 /****^ HISTORY COMMENTS: 7 1) change(85-10-07,Herbst), approve(87-07-21,MCR7694), 8 audit(87-07-21,GDixon), install(87-08-04,MR12.1-1056): 9 Add dsa_kbyt, dsa_kpkt and dsa_hour device types. 10 END HISTORY COMMENTS */ 11 12 13 /* This include file is used to avoid conflicts between system code and customer 14 sites over the use of elements of the devtab array in installation_parms. 15 16 Sites can define new device types for terminal channel charging (for high-speed 17 lines, for example), set prices for them in installation_parms, and use their 18 names in the charge statement in the CMF. 19 20 There also exists a set of system-defined devices, such as tape and disk, and 21 this set must be expandable. Code to charge for each one of these devices is 22 built into the system. That code can not reference specific elements in the 23 devtab array, since a site may have used any given element in that array for 24 one of its own devices. This include file solves that problem. 25 26 The dev_id array contains the names of devices for which charging code is 27 built into the system. That array should be changed whenever new device 28 charging code is added. The order of device names in that array is insignificant. 29 The constants with names of the form dev_DEVICE are used for program 30 readability, to avoid having to reference specific entries in the dev_id 31 array with numeric constants as subscripts. 32 33 The site must define devices of each of the names in the dev_id array, and 34 set prices for them. Otherwise, no charges will be made for use of those 35 devices. The ed_installation_parms procedure prints a warning, when 36 printing device prices, if any of the required devices is not defined. 37 38 The static variables with names of the form devtab_ix_DEVICE are used to 39 hold the subscripts of the respective devices' devtab entries. These variables 40 must be assigned values at initialization time by the procedures that use them. 41 These procedures should call system_info_$device_prices to get a copy of devtab, 42 and then search devtab for a device_id equal to dev_id(dev_DEVICE) and remember 43 the subscript in devtab_ix_DEVICE. If the device is not defined, the devtab_ix 44 variable should remain zero, as an indication that charging for the device is 45 to be bypassed. 46 47 */ 48 dcl dev_id (8) char (8) aligned int static options (constant) init 49 ("tape", "tape_mt", "disk", "disk_mt", "lv", 50 "dsa_kbyt", "dsa_kpkt", "dsa_hour"); 51 52 dcl dev_tape fixed bin int static options (constant) init (1); 53 dcl dev_tape_mt fixed bin int static options (constant) init (2); 54 dcl dev_disk fixed bin int static options (constant) init (3); 55 dcl dev_disk_mt fixed bin int static options (constant) init (4); 56 dcl dev_lv fixed bin int static options (constant) init (5); 57 dcl dev_dsa_kilobyte fixed bin int static options (constant) init (6); 58 dcl dev_dsa_kilopacket fixed bin int static options (constant) init (7); 59 dcl dev_dsa_hour fixed bin int static options (constant) init (8); 60 61 dcl devtab_ix_tape fixed bin int static init (0); 62 dcl devtab_ix_tape_mt fixed bin int static init (0); 63 dcl devtab_ix_disk fixed bin int static init (0); 64 dcl devtab_ix_disk_mt fixed bin int static init (0); 65 dcl devtab_ix_lv fixed bin int static init (0); 66 dcl devtab_ix_dsa_kilobyte fixed bin int static init (0); 67 dcl devtab_ix_dsa_kilopacket fixed bin int static init (0); 68 dcl devtab_ix_dsa_hour fixed bin int static init (0); 69 70 /* END INCLUDE FILE devid.incl.pl1 */