.! .! Standard runoff prefix file for documenter document .! .LAYOUT 0 .PAGE SIZE 60,85 .LM 0 .RM 90 .AUTOPARAGRAPH .ENABLE INDEXING .ENABLE TOC .SET PARAGRAPH 5,1,2 .SPACING 1 .FLAGS INDEX .FLAGS SUBINDEX .FLAGS UNDERLINE .NO FLAGS HYPHENATE .FLAGS COMMENT .FLAGS SUBSTITUTE ` .NO FLAGS ACCEPT .DATE .TITLE FOUR BOF LEVEL III PROGRAM DOCUMENTATION .ST Current as of 6/26/86 .FT .HL 1 [MA_Q.CRUPD]HASH.MAR;18 .c ;MODULE .c ;^&HASH\& .HL 2HASH .nf .x HASH>Defined Source:[MA_Q.CRUPD]HASH.MAR;18 Designer :EARL LAKIA Author :Earl Lakia Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:21-feb-87 Revision level :1.0 .C ;Formal Parameter List Receives: MESSAGEID BYTE(MID$K_SIZ) CHARACTER BYTE ARRAY THAT THE HASH KEY IS TO BE CALCUALTED ON. Returns: HASH INTEGER*4 RETURNED HASH VALUE IN THE RANGE OF 0 TO 127. .SK .fill .SK Description: .sk Subroutine to compute the hash value from a message id. .SK .nofill Calling sequence: INTEGER*4 HASHVAL INTEGER*4 HASH INCLUDE 'MA_Q$DEF:QUEUE.TLB(MIDDEF)/LIST' RECORD/MIDDEF/MID C HASHVAL=HASH(%REF(MID.MID$C_MID)) .fill The hash algorithm used will add the characters in the string in reverse order together along with exclusive "oring" each with the character position such as to give a larger spread. The final sum is then masked to form a 7 bit result (ie: value from zero to 127). .PAGE .HL 1 [MA_Q.CRUPD]KNL_SECT_OPEN.MAR;113 .c ;MODULE .c ;^&KNL_SECT_OPEN\& .HL 2KNL_SECT_OPEN .nf .x KNL_SECT_OPEN>Defined Source:[MA_Q.CRUPD]KNL_SECT_OPEN.MAR;113 Designer :EARL LAKIA Author :EARL LAKIA Date of last update: 23-feb-1987 Revision level :2.6 .C ;Formal Parameter List Receives: SECTION_NAME CHARACTER NAME OF THE SECTION TO CREATE FAB STRUCTURE FAB THAT WAS CALLED FROM THE USER OPEN. RAB STRUCTURE RAB OF FILE THAT WAS CALLED FROM USER OPEN. LUN INTEGER*4 UNIT NUMBER FOR FILE BEING OPENNED. Returns: Accesses common(s): .X KDATA>Common KDATA STORE CHANNEL NUMBER, ETC. FOR OTHER NON KERNAL CODE. Accesses file(s): Other modules referenced: .SK .X OPR_FAO_MSG>Referenced OPR_FAO_MSG Log error to OPA0: (Found in library: INLAND) .fill .SK Description: .sk .FILL This subroutine opens the queue section file for Kernal mode access, and stores this processes wakeup local event flag and IPID into the global queue section so other processes can request a checkpoint. An exit handler is set up such that when the process exits and approiate words in the section file can also be cleared (Don't want processes requesting checkpoint by a nolonger existant process). Finally, set up the exclusive update lock for the region in null mode state. This subroutine is called because of a FORTRAN user open. This subroutine is passed the following: .NOFILL (AP)= number of arguments 4(AP)= address of the FAB 8(AP)= address of the RAB 12(AP)= address of a longword containing the unit number .FILL .PAGE .c ;MODULE .c ;^&UPDATE\& .HL 2UPDATE .nf .x UPDATE>Defined Source:[MA_Q.CRUPD]KNL_SECT_OPEN.MAR;113 Designer :EARL LAKIA Author : Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:12-AUG-1986 06:36:43.24 Revision level :1.0 .C ;Formal Parameter List Receives: nothing, all parameters are passed by common Returns: UPDATE INTEGER*4 Status from the Update section call Accesses common(s): .X KDATA>Common KDATA COMMON USED TO SAVE SECTION ADDRESSES, ETC. Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG LOG MESSAGES TO CONSOLE (found in library:INLAND) .SK .fill .SK Description: .sk This subroutine is called by the main line (QUEUE_CHKR) and used to checkpoint the queue region to the section disk file. The subroutine simply changes mode to Kernel (section is only mapped in kernel) and does an update section system service. The calling sequence is: STATUS= UPDATE() Any errors are from the update section system service. .PAGE .HL 1 [MA_Q.CRUPD]SECT_NEW_CHAN.MAR;5 .c ;MODULE .c ;^&SECT_NEW_CHAN\& .HL 2SECT_NEW_CHAN .nf .x SECT_NEW_CHAN>Defined Source:[MA_Q.CRUPD]SECT_NEW_CHAN.MAR;5 TO BECOME PART OF LIBRARY:PRODUCTION Designer :EARL LAKIA Author :EARL LAKIA Date of last update:05-SEP-86 Revision level :1.2 .C ;Formal Parameter List Receives: FAB STRUCTURE FILE ACCESS BLOCK AS PASSED VIA A USER OPEN RAB STRUCTURE RECORD ACESS BLOCK AS PASSED FROM FORTRAN USER OPEN LUN INTEGER*4 LOGICAL UNIT NUMBER OF FILE BEING OPENED Returns: Accesses common(s): .X SECT_NEW_CHAN>Common SECT_NEW_CHAN THIS CONTAINS THE CHANNEL NUMBER INDEXED BY LOGICAL UNIT NUMBER. Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This subroutine is called because of a FORTRAN user open. This subroutine is passed the following: .NOFILL (AP)= number of arguments 4(AP)= address of the FAB 8(AP)= address of the RAB 12(AP)= address of a longword containing the unit number .FILL This subroutine is intended to be used with a caller subroutine which has setup the useropen parameter in its open of a section file. However this subroutine may be used by anyone as long as the common is defined and the logical unit number used is less than 10. The logical unit number is used as an index into the common to store the channel number from the FAB. .PAGE .HL 1 [MA_Q.PRIV]EXPANDED_REGION.MAR;4 .c ;MODULE .c ;^&DISPLAY_REGION\& .HL 2DISPLAY_REGION .nf .x DISPLAY_REGION>Defined Source:[MA_Q.PRIV]EXPANDED_REGION.MAR;4 TO BECOME PART OF LIBRARY:MA_Q:[SUBROUTINES]QUEUE.OLB Designer :PAUL VESTUTO, EARL LAKIA Author :EARL LAKIA, PAUL VESTUTO Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 14-FEB-1987 Revision level :1.1 .C ;Formal Parameter List Receives: Q_BLOCK INTEGER*4(2) Q BLOCK DESCRIPTOR ADDRESS, CONTAINS THE START ADDRESS FOR P0 (Q_BLOCK(1)) AND THE END ADDRESS FOR P0 (Q_BLOCK(2)). PEX_STRUCTURE EXPANDED REGION STRUCTURE THIS PARAMETER IS AN ADDRESS POINTING TO THE STRUCTURE IN THE USER PROGRAM WHICH MAPS THE EXPANDED AREA. Returns: R0 INTEGER*4 THIS IS THE RETURN CODE AS DESCRIBED BY THE VMS STANDARDS AND THE QUESRV STANDARDS. PEX_STRUCTURE EXPANDED REGION STRUCTURE THE STRUCTURE DEFINED IN THE CALLER PROGRAM WILL BE FILLED IN BY THE DATA CONTAINED IN THE EXPANDED REGION. Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This routines returns the data from the expanded region area as defined for the MA_Q routines. This routines expects the parameters to be valid and that the caller has already called the appropriate initialization routines. If any of the above conditions are not met, an appropriate return code is returned to the caller. .nofill INCLUDE 'MA_Q:[DEF]QUECONST.FOR' RECORD /PEXDEF/ EXPANDED_REGION ... STATUS = DISPLAY_REGION( Q_BLOCK, EXPANDED_REGION) .fill .PAGE .HL 1 [MA_Q.PRIV]QUEUE_HEAD.MAR;2 .c ;MODULE .c ;^&DISPLAY_QUEUE_HEAD\& .HL 2DISPLAY_QUEUE_HEAD .nf .x DISPLAY_QUEUE_HEAD>Defined Source:[MA_Q.PRIV]QUEUE_HEAD.MAR;2 TO BECOME PART OF LIBRARY:MA_Q:[SUBROUTINES]QUEUE.OLB Designer :PAUL VESTUTO Author : Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 2-JUL-1986 13:05:40.89 Revision level :1.0 .C ;Formal Parameter List Receives: Q_BLOCK INTEGER*4(2) Q BLOCK DESCRIPTOR ADDRESS, CONTAINS THE START ADDRESS FOR P0 (Q_BLOCK(1)) AND THE END ADDRESS FOR P0 (Q_BLOCK(2)). Q_STRUCTURE QUEUE HEADER STRUCTURE THIS PARAMETER IS AN ADDRESS POINTING TO THE STRUCTURE IN THE USER PROGRAM WHICH MAPS THE AREA OF THE QUEUE HEADER. Returns: R0 INTEGER*4 THIS IS THE RETURN CODE AS DESCRIBED BY THE VMS STANDARDS AND THE QUESRV STANDARDS. Q_STRUCTURE QUEUE HEAD STRUCTURE THE STRUCTURE DEFINED IN THE CALLER PROGRAM WILL BE FILLED IN BY THE DATA CONTAINED IN THE QUEUE HEADER. Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This routines returns the data from the queue header area in the MA_Q GLOBAL SECTION. This routines expects the parameters to be valid and that the caller has already called the appropriate initialization routines. If any of the above conditions are not met, an appropriate return code is returned to the caller. .nofill INCLUDE 'MA_Q$DEF:QUECONST' RECORD /QUEUE_HEADER_STRUCTURE/ QUEUE_HEAD ... STATUS = DISPLAY_QUEUE_HEAD( Q_BLOCK, QUEUE_HEAD) .LIST 1,' ' .LE;QUE_INSFARG - Insufficient arguments .X QUE_INSFARG .LE;QUE_INVARG - Passed arguments are not readable, or corrupt .X QUE_INVARG .LE;QUE_NOTINITIALIZED - The caller has not attached to the queue via the ATTACH_Q service. .X QUE_NOTINITIALIZED .ELS .fill .PAGE .HL 1 [MA_Q.ROUTE]FIND_ROUTE_MSG.MAR;63 .c ;MODULE .c ;^&FIND_ROUTE_MSG\& .HL 2FIND_ROUTE_MSG .nf .x FIND_ROUTE_MSG>Defined Source:[MA_Q.ROUTE]FIND_ROUTE_MSG.MAR;63 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:25-FEB-1987 Revision level :1.5 .C ;Formal Parameter List Receives: Returns: Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON USED TO FIND NETWORK ROUTING DATABASE AND ALSO THE QUEUE WHICH MESSAGES ARE IN. Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG USED TO LOG ERROR MESSAGES (found in library:INLAND) .X OUTPUT_NET>Referenced OUTPUT_NET Does the actual QIO to the network if there is some work. .SK .fill .SK Description: .sk This subroutine is called to scan the NRB's and the QUEUE GLOBAL Section to see if there are any messages that can go out. This subroutine does almost all of its work in Kernal mode such that it can access the global section which is protected except for kernal access. But since we are suppose to write good code, and we are part of the whole queueing function, we are special and therefore have the right. This subroutine uses the following logic when scanning for messages to go out. .list .le; If there are no buffers available, then return. .le;Starting at the last left off place (LAST_NRB) attempt to utilize the buffers for outbound messages. .le;If the NRB shows the logical link is established, then continue, otherwise go to the next NRB. .le;Starting with the last scanned ID within the NRB (NRB$L_LASTID), see if this ID has an QIO currently outstanding, or has an outstanding not acknowleged message, and the message Id sub queue is non-empty. .le;If have a message, then allocate a buffer and do the qio. .els The calling sequence is simply: CALL FIND_ROUTE_MSG .PAGE .HL 1 [MA_Q.ROUTE]GET_NODE_NAME.MAR;13 .c ;MODULE .c ;^&GET_NODE_NAME\& .HL 2GET_NODE_NAME .nf .x GET_NODE_NAME>Defined Source:[MA_Q.ROUTE]GET_NODE_NAME.MAR;13 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:22-AUG-1986 10:20:55.39 Revision level :1.0 .C ;Formal Parameter List Receives: Returns: Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON LOCAL GLOBAL COMMON FOR THE MA_ROUTER Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This subroutine simply reads the node name from the queue header QHD$C_NODE and stores it in OUR_NODE for easy access by the caller. The QHD$C_NODE is protected in KERNEL mode in the queue so therefore we must change mode to KERNEL for the caller to get the information for him. .PAGE .HL 1 [MA_Q.ROUTE]LHD_ADD.MAR;14 .c ;MODULE .c ;^&LHD_ADD\& .HL 2LHD_ADD .nf .x LHD_ADD>Defined Source:[MA_Q.ROUTE]LHD_ADD.MAR;14 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:12-AUG-86 Revision level :1.1 .C ;Formal Parameter List Receives: INDEX INTEGER*4 MESSAGE ID INDEX RETURNED FROM GET_MID_INDEX Returns: LHD_ADD INTEGER*4 INDEX TRANSLATED TO A ADDRESS WITHIN THE GLOBAL QUEUE SECTION. Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON COMMON USED BY THIS PROCESS EVERYWHERE Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This subroutine is a simple calcualtion type subroutine that translates the index passed to a true address within the queue for the specified message id index. It also will modify the queue message id list heads filling in our process id and our mailbox to receive the unsolicited messages (ie: when a message id queue goes from zero to one). The calling sequence is: ADDRESS=LHD_ADD(INDEX) .PAGE .HL 1 [MA_Q.ROUTE]MARK_FULL.MAR;53 .c ;MODULE .c ;^&MARK_FULL\& .HL 2MARK_FULL .nf .x MARK_FULL>Defined Source:[MA_Q.ROUTE]MARK_FULL.MAR;53 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:11-AUG-1986 12:23:50.45 Revision level :1.0 .C ;Formal Parameter List Receives: NRB STRUCTURE/NRBDEF/ NODE NRB THAT THIS MESSAGE HAS COME IN ON BUF STRUCTURE/BUFDEF/ BUFFER CONTAINING MESSAGE AND POINTERS OF RESPONSE MESSAGE RECEIVED. Q_BLOCK INTEGER*4 (2) SEE ATTACH_Q FOR DESCRIPTION OF THIS ARRAY. Returns: Accesses common(s): Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG LOG ERRORS (found in library:INLAND) .SK .fill .SK Description: .sk This subroutine is passed an index for a particular message id listhead. This subroutine is responsible for setting the bit MID$M_RQF in the list head status long word, ie: MID$L_STAT. The calling sequence is: .LITERAL INTEGER*4 Q_BLOCK(2) CALL ATTACH_Q(Q_BLOCK) CALL MARK_FULL(NRB,BUF,Q_BLOCK) .END LITERAL .PAGE .c ;MODULE .c ;^&MARK_IOPENDING\& .HL 2MARK_IOPENDING .nf .x MARK_IOPENDING>Defined Source:[MA_Q.ROUTE]MARK_FULL.MAR;53 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:11-AUG-1986 12:23:50.45 Revision level :1.0 .C ;Formal Parameter List Receives: NRB STRUCTURE/NRBDEF/ NODE NRB THAT THIS MESSAGE HAS COME IN ON BUF STRUCTURE/BUFDEF/ BUFFER CONTAINING MESSAGE AND POINTERS OF RESPONSE MESSAGE RECEIVED. Q_BLOCK INTEGER*4 (2) SEE ATTACH_Q FOR DESCRIPTION OF THIS ARRAY. Returns: Accesses common(s): Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG LOG ERRORS (found in library:INLAND) .SK .fill .SK Description: .sk This subroutine is passed an index for a particular message id listhead. This subroutine is responsible for setting the bit MID$M_IOPND in the list head status long word, ie: MID$L_STAT. The calling sequence is: .LITERAL INTEGER*4 Q_BLOCK(2) CALL ATTACH_Q(Q_BLOCK) CALL MARK_IOPENDING(NRB,BUF,Q_BLOCK) .END LITERAL .PAGE .c ;MODULE .c ;^&MARK_NOFULL\& .HL 2MARK_NOFULL .nf .x MARK_NOFULL>Defined Source:[MA_Q.ROUTE]MARK_FULL.MAR;53 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:11-AUG-1986 12:23:50.45 Revision level :1.0 .C ;Formal Parameter List Receives: NRB STRUCTURE/NRBDEF/ NODE NRB THAT THIS MESSAGE HAS COME IN ON BUF STRUCTURE/BUFDEF/ BUFFER CONTAINING MESSAGE AND POINTERS OF RESPONSE MESSAGE RECEIVED. Q_BLOCK INTEGER*4 Q_BLOCK AS GOTTEN FROM ATTACH Q Returns: Accesses common(s): Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG LOG ERRORS (found in library:INLAND) .SK .fill .SK Description: .sk This subroutine is passed an index for a particular message id listhead. This subroutine is responsible for clearing the bit MID$M_RQF in the list head status long word, ie: MID$L_STAT. The calling sequence is: .LITERAL INTEGER*4 QUEUE(2) CALL MARK_NOFULL(NRB,BUF,Q_BLOCK) .END LITERAL .PAGE .c ;MODULE .c ;^&MARK_NOROUTE\& .HL 2MARK_NOROUTE .nf .x MARK_NOROUTE>Defined Source:[MA_Q.ROUTE]MARK_FULL.MAR;53 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:11-AUG-1986 12:23:50.45 Revision level :1.0 .C ;Formal Parameter List Receives: NRB STRUCTURE/NRBDEF/ NODE NRB THAT THIS MESSAGE HAS COME IN ON BUF STRUCTURE/BUFDEF/ BUFFER CONTAINING MESSAGE AND POINTERS OF RESPONSE MESSAGE RECEIVED. Q_BLOCK INTEGER*4 AS GOTTEN BACK FROM ATTACH_Q Returns: Accesses common(s): Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG LOG ERRORS (found in library:INLAND) .SK .fill .SK Description: .sk This subroutine is passed an index for a particular message id listhead. This subroutine is responsible for setting the bit MID$M_NOROUTE in the list head status long word, ie: MID$L_STAT ( Will also clear IOPEND and ACKPND). The calling sequence is: .LITERAL INTEGER*4 QUEUE(2) CALL MARK_NOROUTE(NRB,BUF,QUEUE) .END LITERAL .PAGE .c ;MODULE .c ;^&MARK_RESP_PENDING\& .HL 2MARK_RESP_PENDING .nf .x MARK_RESP_PENDING>Defined Source:[MA_Q.ROUTE]MARK_FULL.MAR;53 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:11-AUG-1986 12:23:50.45 Revision level :1.0 .C ;Formal Parameter List Receives: NRB STRUCTURE/NRBDEF/ NODE NRB THAT THIS MESSAGE HAS COME IN ON BUF STRUCTURE/BUFDEF/ BUFFER CONTAINING MESSAGE AND POINTERS OF RESPONSE MESSAGE RECEIVED. Q_BLOCK INTEGER*4 AS GOTTEN BACK FROM ATTACH_Q Returns: Accesses common(s): Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG LOG ERRORS (found in library:INLAND) .SK .fill .SK Description: .sk This subroutine is passed an index for a particular message id listhead. This subroutine is responsible for setting the bit MID$M_ACKPND and clearing the MID$M_IOPND in the list head status long word, ie: MID$L_STAT. The calling sequence is: .LITERAL INTEGER*4 QUEUE(2) CALL MARK_RESP_PENDING(NRB,BUF,Q_BLOCK) .END LITERAL .PAGE .c ;MODULE .c ;^&MARK_NOPEND\& .HL 2MARK_NOPEND .nf .x MARK_NOPEND>Defined Source:[MA_Q.ROUTE]MARK_FULL.MAR;53 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:11-AUG-1986 12:23:50.45 Revision level :1.0 .C ;Formal Parameter List Receives: NRB STRUCTURE/NRBDEF/ NODE NRB THAT THIS MESSAGE HAS COME IN ON BUF STRUCTURE/BUFDEF/ BUFFER CONTAINING MESSAGE AND POINTERS OF RESPONSE MESSAGE RECEIVED. Q_BLOCK INTEGER*4 AS GOTTEN BACK FROM ATTACH_Q Returns: Accesses common(s): Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG LOG ERRORS (found in library:INLAND) .SK .fill .SK Description: .sk This subroutine is passed an index for a particular message id listhead. This subroutine is responsible for clearing the MID$M_IOPND bit (outbound I/O is pending for this message id) in the list head status long word, ie: MID$L_STAT. The calling sequence is: .LITERAL INTEGER*4 QUEUE(2) CALL MARK_NOPEND(NRB,BUF,Q_BLOCK) .END LITERAL .PAGE .HL 1 [MA_Q.ROUTE]ROUTE_SECTION_OPEN.MAR;15 .c ;MODULE .c ;^&ROUTE_SECTION_OPEN\& .HL 2ROUTE_SECTION_OPEN .nf .x ROUTE_SECTION_OPEN>Defined Source:[MA_Q.ROUTE]ROUTE_SECTION_OPEN.MAR;15 Designer :EARL LAKIA Author : Date of last update: 9-JUN-1986 14:04:35.94 Revision level :1.0 .C ;Formal Parameter List Receives: SECTION_NAME CHARACTER NAME OF THE SECTION TO CREATE FAB STRUCTURE FAB THAT WAS CALLED FROM THE USER OPEN. RAB STRUCTURE RAB OF FILE THAT WAS CALLED FROM USER OPEN. LUN INTEGER*4 UNIT NUMBER FOR FILE BEING OPENNED. Returns: Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON STORE CHANNEL NUMBER, ETC. FOR OTHER NON KERNAL CODE. Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk .FILL This subroutine is called because of a FORTRAN user open. This subroutine is passed the following: .NOFILL (AP)= number of arguments 4(AP)= address of the FAB 8(AP)= address of the RAB 12(AP)= address of a longword containing the unit number .FILL .PAGE .HL 1 [MA_Q.ROUTE]UNFULL_AST.MAR;13 .c ;MODULE .c ;^&UNFULL_AST\& .HL 2UNFULL_AST .nf .x UNFULL_AST>Defined Source:[MA_Q.ROUTE]UNFULL_AST.MAR;13 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 2/25/87 Revision level :1.2 .C ;Formal Parameter List Receives: ASTPRM UNUSED AST PARAMETER R0 REGISTER SAVED R0 FROM AST R1 REGISTER SAVED R1 FROM AST PC REGISTER SAVED PC FROM AST PSL REGISTER SAVED PSL FROM AST Returns: Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON MA_ROUTER COMMON PARAMETERS SHARED THROUGHTOUT Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG LOG MESSAGE TO CONSOLE (found in library:INLAND) .X PUSH_EVENT_QUE>Referenced PUSH_EVENT_QUE USED TO PUSH CONNECT EVENT INTO THE EVENT QUEUE .SK .fill .SK Description: .sk This subroutine is called when a timer expires after a remote node has told us that its queue is full. This subroutine switches to KERNEL and clears all of the remote node full bits for the message ids that we are connected to. The flag showing that we are active is set to false. We do not want to run unless we actually do have remote nodes with full queue conditions. .PAGE .HL 1 [MA_Q.SUBROUTINES]ENV_KNL_AST.MAR;6 .c ;MODULE .c ;^&ENV_KNL_AST\& .HL 2ENV_KNL_AST .nf .x ENV_KNL_AST>Defined Source:[MA_Q.SUBROUTINES]ENV_KNL_AST.MAR;6 TO BECOME PART OF LIBRARY:INLAND Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:29-JUL-1986 16:38:31.60 Revision level :1.0 .C ;Formal Parameter List Receives: ASTBLK STRUCTURE ARRAY OF ACB ADDRESS, PID (MODIFIED) OF PROCESS, AND AST PENDING FLAG Returns: ENV_KNL_AST INTEGER*4 STATUS Accesses common(s): Accesses file(s): Other modules referenced: .X SCH$QAST>Referenced SCH$QAST QUEUE AN AST TO PROCESS WHOSE PID IS SPECIFIED IN THE ACBBLK (found in library:VMS) .SK .fill .SK Description: .sk This subroutine is called to envoke the kernal ast as setup by the subroutine INIT_KNL_AST. The array ASTBLK should contain the address of the ACB in nonpaged pool, the PID of the process that the AST is to be delivered to, and a flag denoting that an AST is pending. CALLING SEQUENCE: SYS_STATUS=ENV_KNL_AST(ASTBLK) POSSIBLE ERRORS: .LIST 1,' ' .LE;SS$_INTERLOCK- AST PENDING ALREADY .LE;SS$_INSFRAME- ADDRESS FOR ACB IS NOT IN NON PAGED POOL .LE;SS$_NOPRIV- USER DOES NOT HAVE CHANGE MODE TO KERNAL PRIVELEGE .ELS Note: this subroutine must be assembled as follows: MAC ENV_KNL_AST+SYS$LIBRARY:LIB/LIB and will require linkage with the system symbol table. .PAGE .HL 1 [MA_Q.SUBROUTINES]INIT_KNL_AST.MAR;2 . .c ;MODULE .c ;^&INIT_KNL_AST\& .HL 2INIT_KNL_AST .nf .x INIT_KNL_AST>Defined Source:[MA_Q.SUBROUTINES]INIT_KNL_AST.MAR;2 TO BECOME PART OF LIBRARY:INLAND Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:29-JUL-1986 13:59:03.38 Revision level :1.0 .C ;Formal Parameter List Receives: ASTBLK STRUCTURE STRUCTURE TO RECEIVE ACB ADDRESS, PID OF THE CALLING PROCESS, AND AST ACTIVE FLAG. ASTPRM INTEGER*4 AST PARAMETER TO CALL AST ROUTINE WITH ASTADD INTEGER*4 ADDRESS OF AST ROUTINE Returns: INIT_KNL_AST INTEGER*4 STATUS Accesses common(s): Accesses file(s): Other modules referenced: .X EXE$ALONONPAGED>Referenced EXE$ALONONPAGED ALLOCATE NON PAGED POOL (found in library:VMS) .SK .fill .SK Description: .sk This program allocates some non page pool and builds an ACB within it. It also stores the address of the AST routine that is within this module also (KNL_AST). Thereafter, any program that wishes to may queue an ast to us by simply call SCH$QAST with R5= ACB and R2= priority. Since the ACB is also marked as non deletable, the AST can be queued again and again as long as it is only queued once. This subroutine may fault before it changes mode to kernal (to make sure calling arguments are valid). If this should, happen verify the callling arguments are valid. .tp 20 The calling sequence for this subroutine is: .nofill INTEGER*4 SYS_STATUS C STRUCTURE/ACBBLK/ INTEGER*4 ACB ! ADDRESS OF ACB IN NON PAGED POOL INTEGER*4 PID ! PID OF THIS PROCESS INTEGER*4 ASTPND ! AST PENDING FLAG END STRUCTURE C RECORD/ACBBLK/ACBBLK EXTERNAL KNLAST INTEGER*4 KNLAST INTEGER*4 ASTPRM DATA ASTPMR/1/ C C C SYS_STATUS=INIT_KNL_AST(ACBBLK,%VAL(ASTPRM),%VAL(ASTADD)) C IF(.NOT. SYS_STATUS)THEN .... ERROR CHECK FOR PRIVELEGE ENDIF .FILL This subroutine must be assembled with the macro library, ie: MAC/LIS INIT_KNL_AST+SYS$LIBRARY:LIB/LIB .TP 20 KERNAL AST DELIVERED AT USER MODE ACCESS 00(AP)= AST PARAMETER 04(AP)= R0 SAVED FROM AST 08(AP)= R1 SAVED FROM AST 12(AP)= PC SAVED FROM AST 16(AP)= PSL SAVED FROM AST POSSIBLE ERRORS: .LIST 1,' ' .LE;SS$_NOPIV- CALLER DOES NOT HAVE CHANGE MODE TO KERNAL PRIVILEGE .LE;SS$_BADPARAM- USER HAS NOT PASSED SUFFICIENT NUMBER OF ARGUMENTS. .LE;OTHER ERRORS POSSIBLY IF NO AVAILABLE NONPAGED POOL. .ELS .PAGE .HL 1 [MA_Q.SUBROUTINES]OPR_FAO_MSG.MAR;33 .c ;MODULE .c ;^&OPR_FAO_MSG\& .HL 2OPR_FAO_MSG .nf .x OPR_FAO_MSG>Defined Source:[MA_Q.SUBROUTINES]OPR_FAO_MSG.MAR;33 Designer :EARL LAKIA Author :EARL LAKIA Date of last update:20-JUN-1986 09:12:05.86 Revision level :1.0 Copy Right: Inland Steel Co. 3210 Watling St. East Chicago, IN 46312 .C ;Formal Parameter List Receives: STATUS INTEGER*4 SYSTEM OR USER MESSAGE STATUS CODE FAO_ARG SEE FAO ARG. IN MESSAGE THESE ARE THE ARGUMENTS THAT WILL BE ENCODED INTO THE USER OR SYSTEM MESSAGE. TO DETERMINE THE TYPE, THE USER MUST KNOWN FAO PARAMETERS FOR THE MESSAGE. Returns: OPR_FAO_MSG INTEGER*4 RETURN STATUS OF THE CALL, MAY BE FROM FAO, GETMSG, OR SNDOPR. ALSO IF NUMBER OF ARGUMENTS DOES NOT AGREE WITH THE NUMBER IN MESSAGE, MAY CONTAIN A WARNING. Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This subroutine call the system service GETMSG to get the text for the user passed error code and the number of FAO arguments in the message. The subroutine will then take the lesser of the two counts and apply the passed FAO parameters to form a message that will be passed sent via SNDOPR to the operator console. The user and process sending the message will also be sent as part of the message. The FAO arguments are passed by descriptor for character strings, by value for integer*2, byte, and integer*4, and by address for QUAD word. The calling sequence is: .nofill .sk INTEGER*4 SYS_STATUS EXTERNAL USR_BAD ! A SAMPLE BAD STATUS SET UP C WITH THE MESSAGE UTILITY C C SYS_STATUS=OPR_FAO_MSG(USRBAD,'THIS IS A TEST') C C THE FAO ARGUMENT FOR THIS IS MESSAGE WAS !AS C C FOR A SYSTEM SERVICE CALL, C SYS_STATUS=OPR_FAO_MSG(%VAL(SS$_NORMAL)) C C NOTE: THE %VAL MUST BE USED INSTEAD OF BY REFERENCE!!!! C .PAGE .HL 1 [MA_Q.SUBROUTINES]READ_QREC.MAR;8 .c ;MODULE .c ;^&READ_QREC\& .HL 2READ_QREC .nf .x READ_QREC>Defined Source:[MA_Q.SUBROUTINES]READ_QREC.MAR;8 TO BECOME PART OF LIBRARY:QUEUE Designer :EARL LAKIA Author : Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:15-AUG-1986 09:10:32.99 Revision level :1.0 .C ;Formal Parameter List Receives: Q_BLOCK ARRAY(2) INTEGER*4 Q BLOCK AS RECEIVED FROM THE ATTACH_Q ROUTINE MESSAGE_ID CHARACTER*16 MESSAGE ID THAT CALLER WISHES TO READ INDEX INTEGER*2 OPTIONAL INDEX OF THE MESSAGE ID THAT YOU WISH TO READ (WILL BE USED ALONG WITH THE MESSAGE ID TO QUICKLY FIND THE MESSAGE ID LIST HEAD QUEUE) THIS INDEX IS THE ONE THAT WAS RETURNED WHEN THE CONNECT_READ. NOTE: IF NOT SPECIFIED, A PLACE HOLDER MUST STILL BE PRESENT, IE: A COMMA. Returns: RECORD STRUCTURE/HDRDEF/ + USER RECORD DEF USER RECORD BUFFER RNA INTEGER*4 READ NOT ACKNOWLEGED POINTER. READ_QREC INTEGER*4 RETURN STATUS CODE FROM READ_Q Accesses common(s): Accesses file(s): Other modules referenced: .X READ_Q>Referenced READ_Q SUBROUTINE TO READ A RECORD FROM THE QUEUE. (found in QUEUE.OLB) .SK .fill .SK Description: .sk This subroutine allows the user to read a message from the Queue into a record type structure instead of the character type variable. Basically, this subroutine creates the required descriptor for the READ_Q subroutine. The calling sequence is: .TP 30 .literal INTEGER*4 Q_BLOCK(2) ! AS RECEIVED FROM ATTACH_Q INTEGER*2 LENGTH ! LENGTH OF MESSAGE INCLUDE 'MA_Q$DEF:QUEUE.TLB(QUECONST)' INCLUDE 'MA_Q$DEF:QUEUE.TLB(HDRDEF)' STRUCTURE/RECORD/ RECORD/HDRDEF/HDR CHARACTER*100 DUMMY END STRUCTURE RECORD/RECORD/RECORD ! RECORD TO BE WRITTEN INTEGER*4 SYS_STATUS ! STATUS FROM WRITE_Q CHARACTER*16 MESSAGE_ID INTEGER*4 INDEX ! INDEX OF OUR MESSAGE ID C DATA MESSAGE_ID/'STANDARDS'/ DATA MTYPE/0/ DATA LENGTH/100+HDR$K_SIZE/ ! TOTAL SIZE OF BUFFER C SYS_STATUS=ATTACH_Q(Q_BLOCK) ! ATTACH TO THE QUEUE IF(.NOT. SYS_STATUS)THEN ..... ..... ENDIF C SYS_STATUS=CONNECT_READ(Q_BLOCK,MESSAGE_ID,INDEX) C SYS_STATUS=READ_QREC(Q_BLOCK,MESSAGE_ID, 1 RECORD,LENGTH,RNA,) ! INDEX NOT SPECIFIED - O R - SYS_STATUS=READ_QREC(Q_BLOCK,MESSAGE_ID, 1 RECORD,LENGTH,RNA) ! INDEX NOT SPECIFIED - O R - SYS_STATUS=READ_QREC(Q_BLOCK,MESSAGE_ID, 1 RECORD,LENGTH,RNA,INDEX) ! INDEX SPECIFIED C IF(.NOT. SYS_STATUS)THEN ...... ...... ENDIF .END LITERAL .PAGE .HL 1 [MA_Q.SUBROUTINES]SECT_CHAN.MAR;3 .c ;MODULE .c ;^&SECT_CHAN\& .HL 2SECT_CHAN .nf .x SECT_CHAN>Defined Source:[MA_Q.SUBROUTINES]SECT_CHAN.MAR;3 TO BECOME PART OF LIBRARY:PRODUCTION Designer :EARL LAKIA Author : Date of last update:23-JAN-86 Revision level :1.1 .C ;Formal Parameter List Receives: FAB STRUCTURE FILE ACCESS BLOCK AS PASSED VIA A USER OPEN RAB STRUCTURE RECORD ACESS BLOCK AS PASSED FROM FORTRAN USER OPEN LUN INTEGER*4 LOGICAL UNIT NUMBER OF FILE BEING OPENED Returns: Accesses common(s): .X SECT_CHAN>Common SECT_CHAN THIS CONTAINS THE CHANNEL NUMBER INDEXED BY LOGICAL UNIT NUMBER. Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This subroutine is called because of a FORTRAN user open. This subroutine is passed the following: .NOFILL (AP)= number of arguments 4(AP)= address of the FAB 8(AP)= address of the RAB 12(AP)= address of a longword containing the unit number .FILL This subroutine is intended to be used with the MAKE_SECTION subroutine which has setup the useropen parameter in its open of a section file. However this subroutine may be used by anyone as long as the common is defined and the logical unit number used is less than 10. The logical unit number is used as an index into the common to store the channel number from the FAB. .PAGE .HL 1 [MA_Q.SUBROUTINES]WRITE_QREC.MAR;10 .c ;MODULE .c ;^&WRITE_QREC\& .HL 2WRITE_QREC .nf .x WRITE_QREC>Defined Source:[MA_Q.SUBROUTINES]WRITE_QREC.MAR;10 TO BECOME PART OF LIBRARY:QUEUE Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:26-AUG-1986 Revision level :1.2 .C ;Formal Parameter List Receives: Q_BLOCK ARRAY(2) INTEGER*4 Q_BLOCK AS FILLED IN BY ATTACH_Q MESSAGE_ID CHARACTER*16 MESSAGE ID OF QUEUE TO WRITE TO. RECORD RECORD RECORD CONTAINING MESSAGE TO BE WRITTEN TO THE QUEUE. NOTE: PASSED BY REFERENCE AND NOT BY DESCRIPTOR AS WRITE_Q IS. (IE: WHY THIS ROUTINE WAS WRITTEN) LENGTH INTEGER*2 LENGTH OF THE MESAGE TO BE WRITTEN IN BYTES MTYPE INTEGER*2 TYPE OF MESSAGE (0= NORMAL, 1= CAN NOT BE DELETED) INDEX INTEGER*2 OPTIONAL INDEX OF THE MESSAGE ID WITHIN THE QUEUE. SPACE HOLDER MUST BE PRESENT IF NOT SPECIFIED (IE: EXTRA COMMA) Returns: WRITE_QREC INTEGER*4 STATUS FROM WRITE_Q Accesses common(s): Accesses file(s): Other modules referenced: .X WRITE_Q>Referenced WRIT_Q ACTUALLY WRITE MESSAGE TO THE QUEUE AND CALLS THE SYSTEM SERVICE .SK .fill .SK Description: .sk This subroutine allows the caller to call the Q_WRITE subroutine with record type variables. The Q_WRITE only accepts message buffer to be passed by DESCRIPTOR. This routine therefore makes a fake descriptor for the caller. Since this code is written in FORTRAN, all parameters must be specified or placed holder present for the single optional argument (INDEX). CALLING SEQUENCE .TP 30 .literal INCLUDE'MA_Q$DEF:QUEUE.TLB(QUECONST)' INTEGER*4 Q_BLOCK(2) ! AS RECEIVED FROM ATTACH_Q INTEGER*2 LENGTH ! LENGTH OF MESSAGE STRUCTURE/RECORD/ CHARACTER*100 DUMMY END STRUCTURE RECORD/RECORD/RECORD ! RECORD TO BE WRITTEN INTEGER*2 MTYPE ! TYPE OF MESSAGE INTEGER*4 SYS_STATUS ! STATUS FROM WRITE_Q CHARACTER*16 MESSAGE_ID C DATA MESSAGE_ID/'STANDARDS'/ DATA MTYPE/0/ DATA LENGTH/100/ C SYS_STATUS=ATTACH_Q(Q_BLOCK) ! ATTACH TO THE QUEUE IF(.NOT. SYS_STATUS)THEN ..... ..... ENDIF C SYS_STATUS=WRITE_QREC(Q_BLOCK,MESSAGE_ID, 1 RECORD,LENGTH,MTYPE,) ! INDEX NOT SPECIFIED - O R - SYS_STATUS=WRITE_QREC(Q_BLOCK,MESSAGE_ID, 1 RECORD,LENGTH,MTYPE) ! INDEX NOT SPECIFIED - O R - SYS_STATUS=WRITE_QREC(Q_BLOCK,MESSAGE_ID, 1 RECORD,LENGTH,MTYPE,INDEX) ! INDEX SPECIFIED C IF(.NOT. SYS_STATUS)THEN ...... ...... ENDIF .END LITERAL .FILL The return status is from the Q_WRITE except if the user does not pass either four or five arguments. .PAGE .HL 1 [MA_Q.SYSSERV]SSDISP.MAR;81 .c ;MODULE .c ;^&ACK_READ\& .HL 2ACK_READ .nf .x ACK_READ>Defined Source:[MA_Q.SYSSERV]SSDISP.MAR;81 Designer :PAUL VESTUTO, EARL LAKIA Author :PAUL VESTUTO Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 31-JUL-1986 12:00:00.00 Revision level :1.0 .C ;Formal Parameter List Q_BLOCK INTEGER*4(2) Q BLOCK DESCRIPTOR ADDRESS, WILL CONTAIN THE START ADDRESS FOR P0 (Q_BLOCK(1)) AND THE END ADDRESS FOR P0 (Q_BLOCK(2)). MESSAGE_ID CHARACTER*16 MESSAGE ID TO READ FROM. RNA_POINTER INTEGER*4 POINTER TO THE RNA MESSAGE. THIS VALUE WAS RETURNED DURING THE READ OPERATION. IF THIS VALUE DOES NOT MATCH THE VALUES SPCIFIED IN THE MESSAGE ID HEADER, AN APPROPRIATE ERROR MESSAGE WILL BE RETURNED. MIDX INTEGER*2 (OPTIONAL) INDEX OF MESSAGE ID. USED FOR FASTER ACCESS TO THE MESSAGE ID HEADER. IF NOT SPECIFIED, THE MESSAGE ID NAME IS USED. IF SPECIFIED, THE NAME CALCULATED FROM THE INDEX IS COMPARED WITH THE PASSED NAME, AND IF NOT THE SAME, THE PASSED NAME IS USED. Returns: ACK_READ INTEGER*4 THIS IS THE RETURN CODE AS DESCRIBED BY THE VMS STANDARDS AND THE QUESRV STANDARDS. Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This routine acknolwges a message for the specified message ID. The following conditions are checked: the message ID exists the calling process is connected to the specified message ID the message ID does have an RNA message the RNA pointer matches the one stored in the Message ID header If any of the above conditions are not met, an appropriate error message is returned. This routines expects the parameters to be valid, if not an appropriate return code is returned to the caller. .tp 27 .nofill .SKIP INCLUDE 'MA_Q$DEF:QUEUE.TLB(QUECONST)' INTEGER*4 Q_BLOCK(2) CHARACTER MESSAGE_ID*16 MESSAGE_ID = 'STEEL_AVAILABLTY' INTEGER*4 RNA_POINTER INTEGER*2 MIDX ... STATUS = ACK_READ (Q_BLOCK, MESSAGE_ID, RNA_POINTER) or STATUS = ACK_READ (Q_BLOCK, MESSAGE_ID, RNA_POINTER, MIDX) POSSIBLE ERRORS: .SK .list 1,' ' .LE;QUE_INSFARG - Insufficient arguments .X QUE_INSFARG .LE;QUE_INVARG - Invalid arguments .X QUE_INVARG .LE;QUE_NOTINITIALIZED - Queueing functions have not been initialized .X QUE_NOTINITIALIZED .LE;QUE_INVIDX - MID index is not consistant with MID name .X QUE_INVIDX .LE;QUE_IDXOOR - MID index is out of range .X QUE_IDXOOR .LE;QUE_MIDNOTFOUND - Message ID not found in list .X QUE_MIDNOTFOUND .LE;QUE_NORNAMESS - There is no outstanding read-not-acknowleged mesage .X QUE_NORNAMESS .LE;QUE_INVRNA - Invalid read-not-acknowleged pointer .X QUE_INVRNA .LE;QUE_MIDNOTATT - Message ID is not attached .X QUE_MIDNOTATT .LE;QUE_NOCHK - Checkpoint process is not available .X QUE_NOCHK .ELS .fill .PAGE .c ;MODULE .c ;^&ADD_MESSAGE_ID\& .nf .x ADD_MESSAGE_ID>Defined Source:[MA_Q.SYSSERV]SSDISP.MAR;81 Designer :EARL LAKIA Author :Earl Lakia, Paul Vestudo Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:19-FEB-1987 Revision level :1.0 .C ;Formal Parameter List Receives: Q_BLOCK INTEGER*4 (2) Q BLOCK DESCRIPTOR AS RETURNED FROM THE ATTACH_Q SERVICE. THE ADDITION OF AN ID APPLIES TO THIS QUEUE ONLY. MESSAG_ID CHARACTER*16 MESSAGE ID THAT IS TO BE ADDED. MAXCNT INTEGER*4 MAXIMUM NUMBER OF MESSAGES TO BE ALLOWED FOR THIS MESSAGE ID. Returns: ADD_MESSAGE_ID INTEGER*4 RETURN STATUS Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This system service allows the caller to add a message id to the queue. The caller must have sufficient privelege (SYSNAM). .sk CALL SEQUENCE INTEGER*4 SYS_STATUS INTEGER*4 ADD_MESSAGE_ID ! SYS. SERV. CALL CHARACTER*16 MESSAGE_ID !MESSAGE ID TO ADD INTEGER*4 Q_BLOCK(2) ! FROM ATTACH Q INTEGER*4 MAXMSG ! MAX NUMBER MESSAGES DATA MAXMSG/100/ DATA MESSAGE_ID/'MESSAGE ONE'/ C SYS_STATUS=ATTACH_Q(Q_BLOCK) IF(.NOT. SYS_STATUS)THEN CALL SSYS$EXIT(%VAL(SYS_STATUS)) ENDIF C SYS_STATUS=ADD_MESSAGE_ID( 1 Q_BLOCK, 1 MESSAGE_ID, 1 MAXMSG) C IF(.NOT. SYS_STATUS)THEN CALL SYS$EXIT(%VAL(SYS_STATUS)) ENDIF END .FILL .SK POSSSBILE ERROR CODES (Can also be system service errors): .LIST 1,' ' .LE;QUE_INSFARG- Insufficient number of arguments .X QUE_INSFARG .LE;QUE_INVARG- Invalid argument (one of the parameters is not valid, make sure Q_BLOCK is correctly dimentsioned, MESSAGE_ID is of sufficient dimension, etc. .X QUE_INVARG .LE;QUE_NOTINITIALIZED- The Q_BLOCK passed is either zero, or does not contain valid information. .x QUE_NOTINITIALIZED .LE;QUE_MIDTNOTUNIQUE- A request to add a message id that already exists. .X QUE_MIDNOTUNIQUE .LE;QUE_MIDLISTFULL- There is insufficient room left in the queue to allow the addition of the message id. The queue must be recreated and reinstalled with a larger allocation for the message id list heads. .x QUE_MIDLISTFULL .LE;QUE_NOPRIV- Calling process does not have sufficient privelege to add the message id to the queue. SYSPRV is required. .x QUE_NOPRIV .x SYSPRV .ELS .PAGE .c ;MODULE .c ;^&ATTACH_Q\& .HL 2ATTACH_Q .nf .x ATTACH_Q>Defined Source:[MA_Q.SYSSERV]SSDISP.MAR;81 Designer :PAUL VESTUTO, EARL LAKIA Author :PAUL VESTUTO Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 29-JUL-1986 12:00:00.00 Revision level :1.0 .C ;Formal Parameter List Q_BLOCK INTEGER*4(2) Q BLOCK DESCRIPTOR ADDRESS, WILL CONTAIN THE START ADDRESS FOR P0 (Q_BLOCK(1)) AND THE END ADDRESS FOR P0 (Q_BLOCK(2)). Q_NAME CHARACTER*16 GLOBAL SECTION NAME (OPTIONAL). This parameter IF SPECIFIED, IDENTIFIES THE GLOBAL SECTION TO BE ATTACHED. IF NOT SPECIFIED, THE DEFAULT GLOBAL SECTION IS ATTACHED AS SPECIFIED BY EITHER THE NAME "MA_Q_NAME" OR THE LOGICAL NAME "GBL$MA_Q_NAME". MID_COUNT INTEGER*2 (OPTIONAL) MAXIMUM NUMBER OF MESSAGE IDS THE CALLER WILL ATTTACH TO. IF NOT SPECIFIED, THE DEFAULT IS USED. Returns: ATTACH_Q INTEGER*4 THIS IS THE RETURN CODE AS DESCRIBED BY THE VMS STANDARDS AND THE QUESRV STANDARDS. Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This routine expands P0 space to get a working area. The global section is then attached, with the information being stored in the P0 work space. A null lock is created to be used for accessing the global section. Some Process information is obtained and stored in the working area. An exit handler is setup. This routines expects the parameters to be valid, if not an appropriate return code is returned to the caller. .tp 27 .nofill .SKIP INCLUDE 'MA_Q$DEF:QUEUE.TLB(QUECONST)' INTEGER*4 Q_BLOCK(2) INTEGER*2 MID_COUNT CHARACTER Q_NAME*(*) PARAMETER (Q_NAME = 'MY_OWN_QUEUE') MID_COUNT = 7 ... STATUS = ATTACH_Q (Q_BLOCK) OR STATUS = ATTACH_Q (Q_BLOCK, Q_NAME) OR STATUS = ATTACH_Q (Q_BLOCK, Q_NAME, MID_COUNT) OR STATUS = ATTACH_Q (Q_BLOCK, , MID_COUNT) POSSIBLE ERRORS: .SK .list 1,' ' .LE;QUE_INSFARG - Insufficient arguments .X QUE_INSFARG .LE;QUE_INVARG - Invalid arguments .X QUE_INVARG .LE;QUE_GTRMAX - Number specified is greater than allowed maximum number of MIDs .X QUE_GTRMAX .LE;QUE_NOCHK - Checkpoint process is not available .X QUE_NOCHK .LE;QUE_ALRATT- Queue already attached .x QUE_ALRATT .ELS .fill .PAGE .c ;MODULE .c ;^&ATTACH_QE\& .HL 2ATTACH_QE .nf .x ATTACH_QE>Defined Source:[MA_Q.SYSSERV]SSDISP.MAR;81 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 19-FEB-1987 Revision level :1.0 .C ;Formal Parameter List QBX RECORD/QEXDEF/ QBX WILL CONTAIN THE START ADDRESS FOR P0 (QBX.Q_BLOCK(1)), THE ENDING ADDRESS FOR P0 (QBX.Q_BLOCK(2)), AND THE EXIT HANDLER BLOCK (QBX.EXIT). Q_NAME CHARACTER*16 GLOBAL SECTION NAME (OPTIONAL). This parameter IF SPECIFIED, IDENTIFIES THE GLOBAL SECTION TO BE ATTACHED. IF NOT SPECIFIED, THE DEFAULT GLOBAL SECTION IS ATTACHED AS SPECIFIED BY EITHER THE NAME "MA_Q_NAME" OR THE LOGICAL NAME "GBL$MA_Q_NAME". MID_COUNT INTEGER*2 (OPTIONAL) MAXIMUM NUMBER OF MESSAGE IDS THE CALLER WILL ATTTACH TO. IF NOT SPECIFIED, THE DEFAULT IS USED. Returns: ATTACH_QE INTEGER*4 THIS IS THE RETURN CODE AS DESCRIBED BY THE VMS STANDARDS AND THE QUESRV STANDARDS. Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This routine expands P0 space to get a working area. The global section is then attached, with the information being stored in the P0 work space. A null lock is created to be used for accessing the global section. Some Process information is obtained and stored in the working area. An exit handler is setup in supervisor mode. This entry is different from the ATTACH_Q entry in that it will also set up a user mode exit handler (pointing to within this service) that will attempt to do a DETACH_Q for the caller. This is important when a process is ran via DCL as the process rundown will not occurr (and therefore the supervisor mode exit handler). If the supervisor mode exit handler does not get executed, the queue will not be detached nor will the message ids be disconnected. Subsequent runs of the process will return the error code QUE_ALRATT or QUE_MIDATTACHED. Note: Since this subroutine stores a exit block for the caller, any destruction of the QBX structure may result in strange exits and faults. This routines expects the parameters to be valid, if not an appropriate return code is returned to the caller. .tp 27 .nofill .SKIP INCLUDE 'MA_Q$DEF:QUEUE.TLB(QUECONST)' INCLUDE 'MA_Q$DEF:QUEUE.TLB(QEXDEF)' RECORD/QBXDEF/QBX INTEGER*2 MID_COUNT CHARACTER Q_NAME*(*) PARAMETER (Q_NAME = 'MY_OWN_QUEUE') MID_COUNT = 7 ... STATUS = ATTACH_QE (QBX) OR STATUS = ATTACH_QE (QBX, Q_NAME) OR STATUS = ATTACH_QE (QBX, Q_NAME, MID_COUNT) OR STATUS = ATTACH_QE (QBX, , MID_COUNT) NOTE: When calling the subsequent routines, the parameter for the Q_BLOCK is simply: QBX.Q_BLOCK. POSSIBLE ERRORS: .SK .list 1,' ' .LE;QUE_INSFARG - Insufficient arguments .X QUE_INSFARG .LE;QUE_INVARG - Invalid arguments .X QUE_INVARG .LE;QUE_GTRMAX - Number specified is greater than allowed maximum number of MIDs .X QUE_GTRMAX .LE;QUE_NOCHK - Checkpoint process is not available .X QUE_NOCHK .LE;QUE_ALRATT- Queue already attached .x QUE_ALRATT .ELS .fill .PAGE .c ;MODULE .c ;^&BACKUP_RNA\& .HL 2BACKUP_RNA .nf .x BACKUP_RNA>Defined Source:[MA_Q.SYSSERV]SSDISP.MAR;81 Designer :PAUL VESTUTO, EARL LAKIA Author :PAUL VESTUTO Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 15-Aug-1986 12:00:00.00 Revision level :1.0 .C ;Formal Parameter List Q_BLOCK INTEGER*4(2) Q BLOCK DESCRIPTOR ADDRESS, WILL CONTAIN THE START ADDRESS FOR P0 (Q_BLOCK(1)) AND THE END ADDRESS FOR P0 (Q_BLOCK(2)). MESSAGE_ID CHARACTER*16 MESSAGE ID TO READ FROM. RNA_POINTER INTEGER*4 POINTER TO THE RNA MESSAGE. THIS VALUE WAS RETURNED DURING THE READ OPERATION. IF THIS VALUE DOES NOT MATCH THE VALUES SPCIFIED IN THE MESSAGE ID HEADER, AN APPROPRIATE ERROR MESSAGE WILL BE RETURNED. MIDX INTEGER*2 (OPTIONAL) INDEX OF MESSAGE ID. USED FOR FASTER ACCESS TO THE MESSAGE ID HEADER. IF NOT SPECIFIED, THE MESSAGE ID NAME IS USED. IF SPECIFIED, THE NAME CALCULATED FROM THE INDEX IS COMPARED WITH THE PASSED NAME, AND IF NOT THE SAME, THE PASSED NAME IS USED. Returns: BACKUP_RNA INTEGER*4 THIS IS THE RETURN CODE AS DESCRIBED BY THE VMS STANDARDS AND THE QUESRV STANDARDS. Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This routine returns an RNA message to the head of the Message ID queue. The following conditions are checked: the message ID exists the calling process is connected to the specified message ID the message ID does have an RNA message the RNA pointer matches the one stored in the Message ID header If any of the above conditions are not met, an appropriate error message is returned. This routines expects the parameters to be valid, if not an appropriate return code is returned to the caller. .tp 27 .nofill .SKIP INCLUDE 'MA_Q$DEF:QUEUE.TLB(QUECONST)' INTEGER*4 Q_BLOCK(2) CHARACTER MESSAGE_ID*16 MESSAGE_ID = 'STEEL_AVAILABLTY' INTEGER*4 RNA_POINTER INTEGER*2 MIDX ... STATUS = BACKUP_RNA (Q_BLOCK, MESSAGE_ID, RNA_POINTER) or STATUS = BACKUP_RNA (Q_BLOCK, MESSAGE_ID, RNA_POINTER, MIDX) POSSIBLE ERRORS: .SK .list 1,' ' .LE;QUE_INSFARG - Insufficient arguments .X QUE_INSFARG .LE;QUE_INVARG - Invalid arguments .X QUE_INVARG .LE;QUE_NOTINITIALIZED - Queueing functions have not been initialized .X QUE_NOTINITIALIZED .LE;QUE_INVIDX - MID index is not consistant with MID name .X QUE_INVIDX .LE;QUE_IDXOOR - MID index is out of range .X QUE_IDXOOR .LE;QUE_MIDNOTFOUND - Message ID not found in list .X QUE_MIDNOTFOUND .LE;QUE_NORNAMESS - There is no outstanding read-not-acknowleged mesage .X QUE_NORNAMESS .LE;QUE_INVRNA - Invalid read-not-acknowleged pointer .X QUE_INVRNA .LE;QUE_MIDNOTATT - Message ID is not attached .X QUE_MIDNOTATT .LE;QUE_HEADNOTREM - Message header unable to be removed from Message ID list .X QUE_HEADNOTREM .ELS .fill .PAGE .c ;MODULE .c ;^&CHANGE_MESSAGE_ID\& .HL 2CHANGE_MESSAGE_ID .nf .x CHANGE_MESSAGE_ID>Defined Source:[MA_Q.SYSSERV]SSDISP.MAR;81 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:18-FEB-1987 07:51:10.64 Revision level :1.0 .C ;Formal Parameter List Receives: Q_BLOCK INTEGER*4 (2) Q-BLOCK AS RETURNED FROM ATTACH Q MESSAGE_ID CHARACTER*16 MESSAGE ID THAT CHANGE IS TO EFFECT NEWCOUNT INTEGER84 NEW MAXIMUM NUMBER OF MESSAGES FOR THIS MESSAGE ID Returns: CHANGE_MESSAGE_ID INTEGER*4 RETURN STATUS Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This subroutine allows the caller to modify the maximum number of messages allowed for a message id. This is the only parameter that has any meaning to be modified. .sk CALLING SEQUENCE INTEGER*4 SYS_STATUS INTEGER*4 CHANGE_MESSAGE_ID ! SYS. SERV. CALL CHARACTER*16 MESSAGE_ID !MESSAGE ID TO ADD INTEGER*4 Q_BLOCK(2) ! FROM ATTACH Q INTEGER*4 MAXMSG ! MAX NUMBER MESSAGES DATA MAXMSG/100/ DATA MESSAGE_ID/'MESSAGE ONE'/ C SYS_STATUS=ATTACH_Q(Q_BLOCK) IF(.NOT. SYS_STATUS)THEN CALL SSYS$EXIT(%VAL(SYS_STATUS)) ENDIF C SYS_STATUS=CHANGE_MESSAGE_ID( 1 Q_BLOCK, 1 MESSAGE_ID, 1 MAXMSG) C IF(.NOT. SYS_STATUS)THEN CALL SYS$EXIT(%VAL(SYS_STATUS)) ENDIF END .FILL .SK POSSSBILE ERROR CODES (Can also be system service errors): .LIST 1,' ' .LE;QUE_INSFARG- Insufficient number of arguments .X QUE_INSFARG .LE;QUE_INVARG- Invalid argument (one of the parameters is not valid, make sure Q_BLOCK is correctly dimentsioned, MESSAGE_ID is of sufficient dimension, etc. .X QUE_INVARG .LE;QUE_NOTINITIALIZED- The Q_BLOCK passed is either zero, or does not contain valid information. .x QUE_NOTINITIALIZED .LE;QUE_NOPRIV- The calling process does not have sufficient privelege to change a message id. The privelege SYSPRIV is required. .X QUE_NOPRIV .ELS .PAGE .c ;MODULE .c ;^&CONNECT_READ\& .HL 2CONNECT_READ .nf .x CONNECT_READ>Defined Source:[MA_Q.SYSSERV]SSDISP.MAR;81 Designer :PAUL VESTUTO, EARL LAKIA Author :PAUL VESTUTO Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 25-AUG-1986 12:00:00.00 Revision level :1.0 .C ;Formal Parameter List Receives: Q_BLOCK INTEGER*4(2) Q BLOCK DESCRIPTOR ADDRESS, CONTAINS THE START ADDRESS FOR P0 (Q_BLOCK(1)) AND THE END ADDRESS FOR P0 (Q_BLOCK(2)). MESSAGE_ID CHARACTER*16 MESSAGE_ID TO CONNECT TO EFN INTEGER*2 EVENT FLAG TO SET WHEN THIS MESSAGE IDS COUNT GOES NON-ZERO. Returns: CONNECT_READ INTEGER*4 THIS IS THE RETURN CODE AS DESCRIBED BY THE VMS STANDARDS AND THE QUESRV STANDARDS. INDEX INTEGER*2 INDEX OF MESSAGE ID IN MID LIST. Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This routine establishes the caller as the reader of the specified message IDs. The queue does not get checkpointed because the connect information is considered to be volatile. This routines expects the parameters to be valid and that the caller has already called the appropriate initialization routines. If any of the above conditions are not met, an appropriate return code is returned to the caller. .TP 25 .nofill .SKIP INCLUDE 'MA_Q$DEF:QUEUE.TLB(QUECONST)' INTEGER*4 Q_BLOCK(2) INTEGER*2 EFN, INDEX CHARACTER*16 MESSAGE_ID ... MESSAGE_ID = 'STEEL_AVAILABLTY' EFN = 1 STATUS = CONNECT_READ (Q_BLOCK, MESSAGE_ID, EFN, INDEX) POSSIBLE ERRORS: .SK .list 1,' ' .LE;QUE_INSFARG - Insufficient arguments .X QUE_INSFARG .LE;QUE_INVARG - Invalid arguments .X QUE_INVARG .LE;QUE_NOTINITIALIZED - Queueing functions have not been initialized .X QUE_NOTINITIALIZED .LE;QUE_MIDNOTFOUND - Message ID not found in list .X QUE_MIDNOTFOUND .LE;QUE_MIDATTACHED - Message ID is already attached .X QUE_MIDATTACHED .LE;QUE_MAXMID - Caller is connected to maximum number of Message IDs .X QUE_MAXMID .LE;QUE_HEADNOTREM - Message header unable to be removed from Message ID list .X QUE_HEADNOTREM .ELS .fill .PAGE .c ;MODULE .c ;^&DELETE_MESSAGE_ID\& .HL 2DELETE_MESSAGE_ID .nf .x DELETE_MESSAGE_ID>Defined Source:[MA_Q.SYSSERV]SSDISP.MAR;81 Designer :EARL LAKIA Author : Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:18-FEB-1987 07:54:35.26 Revision level :1.0 .C ;Formal Parameter List Receives: Q_BLOCK INTEGER*4 (2) Q_BLOCK AS RETURNED FROM ATTACH Q MESSAGE_ID CHARACTER*16 MESSAGE ID THAT IS TO BE DELETED FROM THE QUEUE Returns: DELETE_MESSAGE_ID INTEGER*4 RETURN STATUS Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This subroutine allows the caller to mark a message Id as nolonger in the queue. The message id can not have any messages in the queue. .sk CALLING SEQUENCE INTEGER*4 SYS_STATUS INTEGER*4 DELETE_MESSAGE_ID ! SYS. SERV. CALL CHARACTER*16 MESSAGE_ID !MESSAGE ID TO DELETE INTEGER*4 Q_BLOCK(2) ! FROM ATTACH Q INTEGER*4 MAXMSG ! MAX NUMBER MESSAGES DATA MAXMSG/100/ DATA MESSAGE_ID/'MESSAGE ONE'/ C SYS_STATUS=ATTACH_Q(Q_BLOCK) IF(.NOT. SYS_STATUS)THEN CALL SSYS$EXIT(%VAL(SYS_STATUS)) ENDIF C SYS_STATUS=DELETE_MESSAGE_ID( 1 Q_BLOCK, 1 MESSAGE_ID) C IF(.NOT. SYS_STATUS)THEN CALL SYS$EXIT(%VAL(SYS_STATUS)) ENDIF END .FILL .SK POSSSBILE ERROR CODES (Can also be system service errors): .LIST 1,' ' .LE;QUE_INSFARG- Insufficient number of arguments .X QUE_INSFARG .LE;QUE_INVARG- Invalid argument (one of the parameters is not valid, make sure Q_BLOCK is correctly dimentsioned, MESSAGE_ID is of sufficient dimension, etc. .X QUE_INVARG .LE;QUE_NOTINITIALIZED- The Q_BLOCK passed is either zero, or does not contain valid information. .x QUE_NOTINITIALIZED .le;QUE_MIDDELETED- The requested message id has been marked for delete .x QUE_MIDDELETED .LE;QUE_MIDNOTFOUND- The desired message id is not in the queue. .x QUE_MIDNOTFOUND .le;QUE_NOPRIV- Calling process does not have sufficient privilege to delete the message id. The privelege SYSPRV is required. .x QUE_NOPRIV .ELS .PAGE .c ;MODULE .c ;^&DETACH_Q\& .HL 2DETACH_Q .nf .x DETACH_Q>Defined Source:[MA_Q.SYSSERV]SSDISP.MAR;81 Designer :PAUL VESTUTO, EARL LAKIA Author :PAUL VESTUTO Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 12-Aug-1986 12:00:00.00 Revision level :1.0 .C ;Formal Parameter List Receives: Q_BLOCK INTEGER*4(2) Q BLOCK DESCRIPTOR ADDRESS, CONTAINS THE START ADDRESS FOR P0 (Q_BLOCK(1)) AND THE END ADDRESS FOR P0 (Q_BLOCK(2)). Returns: DETACH_Q INTEGER*4 THIS IS THE RETURN CODE AS DESCRIBED BY THE VMS STANDARDS AND THE QUESRV STANDARDS. Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This routine detaches the caller from the specified queue. This routines expects the parameter to be valid and that the caller has already called the appropriate initialization routines. If any of the above conditions are not met, an appropriate return code is returned to the caller. .tp 10 .nofill .SKIP INCLUDE 'MA_Q$DEF:QUEUE.TLB(QUECONST)' INTEGER*4 Q_BLOCK(2) ... STATUS = DETACH_Q (Q_BLOCK) .fill .PAGE .c ;MODULE .c ;^&DISPLAY_MESSAGE_ID\& .HL 2DISPLAY_MESSAGE_ID .nf .x DISPLAY_MESSAGE_ID>Defined Source:[MA_Q.SYSSERV]SSDISP.MAR;81 Designer :EARL LAKIA Author :EARL LAKIA, PAUL VESTUDO Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:18-FEB-1987 07:59:02.07 Revision level :1.0 .C ;Formal Parameter List Receives: Q_BLOCK INTEGER*4 (2) Q_BLOCK AS RETURNED FROM ATTACH Q MESSAGE_ID CHARACTER*15 MESSAGE ID LIST HEAD THAT CALLER DESIRES MHD RECORD/MIDDEF/ STRUCTURE TO RECIEVE THE MESSAGE ID LIST HEAD Returns: DISPLAY_MESSAGE_ID INTEGER*4 RETURN STATUS Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This system service allows the caller to add a message id to the queue. The caller must have sufficient privelege (SYSNAM). .sk CALL SEQUENCE INTEGER*4 SYS_STATUS INTEGER*4 DISPLAY_MESSAGE_ID ! SYS. SERV. CALL CHARACTER*16 MESSAGE_ID !MESSAGE ID TO ADD INTEGER*4 Q_BLOCK(2) ! FROM ATTACH Q INCLUDE 'MA_Q$DEF:QUEUE.TLB(QUEDEF)' RECORD/MIDDEF/MHD DATA MAXMSG/100/ DATA MESSAGE_ID/'MESSAGE ONE'/ C SYS_STATUS=ATTACH_Q(Q_BLOCK) IF(.NOT. SYS_STATUS)THEN CALL SSYS$EXIT(%VAL(SYS_STATUS)) ENDIF C SYS_STATUS=DISPLAY_MESSAGE_ID( 1 Q_BLOCK, 1 MESSAGE_ID, 1 MHD) C IF(.NOT. SYS_STATUS)THEN CALL SYS$EXIT(%VAL(SYS_STATUS)) ENDIF END .FILL .SK POSSSBILE ERROR CODES (Can also be system service errors): .LIST 1,' ' .LE;QUE_INSFARG- Insufficient number of arguments .X QUE_INSFARG .LE;QUE_INVARG- Invalid argument (one of the parameters is not valid, make sure Q_BLOCK is correctly dimentsioned, MESSAGE_ID is of sufficient dimension, etc. If the program has not been recompiled since a new release, the size of the message id list head may have changed. .X QUE_INVARG .LE;QUE_NOTINITIALIZED- The Q_BLOCK passed is either zero, or does not contain valid information. .x QUE_NOTINITIALIZED .LE;QUE_MIDNOTFOUND- The desired message id is not in the queue. .x QUE_MIDNOTFOUND .ELS .PAGE .c ;MODULE .c ;^&DISPLAY_QUEUE_HEAD\& .HL 2DISPLAY_QUEUE_HEAD .nf .x DISPLAY_QUEUE_HEAD>Defined Source:[MA_Q.SYSSERV]SSDISP.MAR;81 TO BECOME PART OF LIBRARY:MA_Q:[SUBROUTINES]QUEUE.OLB Designer :PAUL VESTUTO Author : Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 2-JUL-1986 13:05:40.89 Revision level :1.0 .C ;Formal Parameter List Receives: Q_BLOCK INTEGER*4(2) Q BLOCK DESCRIPTOR ADDRESS, CONTAINS THE START ADDRESS FOR P0 (Q_BLOCK(1)) AND THE END ADDRESS FOR P0 (Q_BLOCK(2)). Q_STRUCTURE QUEUE HEADER STRUCTURE THIS PARAMETER IS AN ADDRESS POINTING TO THE STRUCTURE IN THE USER PROGRAM WHICH MAPS THE AREA OF THE QUEUE HEADER. Returns: R0 INTEGER*4 THIS IS THE RETURN CODE AS DESCRIBED BY THE VMS STANDARDS AND THE QUESRV STANDARDS. Q_STRUCTURE RECORD/QUEHED/ THE STRUCTURE DEFINED IN THE CALLER PROGRAM WILL BE FILLED IN BY THE DATA CONTAINED IN THE QUEUE HEADER. Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This routines returns the data from the queue header area in the MA_Q GLOBAL SECTION. This routines expects the parameters to be valid and that the caller has already called the appropriate initialization routines. If any of the above conditions are not met, an appropriate return code is returned to the caller. .nofill INCLUDE 'MA_Q$DEF:QUECONST' RECORD /QHDDEF/ QUEUE_HEAD ... STATUS = DISPLAY_QUEUE_HEAD( Q_BLOCK, QUEUE_HEAD) .sk POSSSBILE ERROR CODES (Can also be system service errors): .LIST 1,' ' .LE;QUE_INSFARG - Insufficient arguments .X QUE_INSFARG .LE;QUE_INVARG - Passed arguments are not readable/writeabl, or corrupt. If a new release of the queue software has been installed, then possibly, the size of the QHDDEF record may be of a new larger size. .X QUE_INVARG .LE;QUE_NOTINITIALIZED - The caller has not attached to the queue via the ATTACH_Q service. .X QUE_NOTINITIALIZED .ELS .fill .PAGE .c ;MODULE .c ;^&GET_MID_INDEX\& .HL 2GET_MID_INDEX .nf .x GET_MID_INDEX>Defined Source:[MA_Q.SYSSERV]SSDISP.MAR;81 Designer :PAUL VESTUTO, EARL LAKIA Author :PAUL VESTUTO Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 29-JUL-1986 12:00:00.00 Revision level :1.0 .C ;Formal Parameter List Receives: Q_BLOCK INTEGER*4(2) Q BLOCK DESCRIPTOR ADDRESS, CONTAINS THE START ADDRESS FOR P0 (Q_BLOCK(1)) AND THE END ADDRESS FOR P0 (Q_BLOCK(2)). MESSAGE_ID CHARACTER*16 MESSAGE ID DESCRIPTOR BLOCK Returns: GET_MID_INDEX INTEGER*4 THIS IS THE RETURN CODE AS DESCRIBED BY THE VMS STANDARDS AND THE QUESRV STANDARDS. INDEX INTEGER*2 INDEX INTO MID LIST IN THE GLOBAL SECTION Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This routine finds the specified message ID in the MID list and returns the index into the list. This routines expects the parameters to be valid and that the caller has already called the appropriate initialization routines. If any of the above conditions are not met, an appropriate return code is returned to the caller. .tp 20 .nofill .SKIP INCLUDE 'MA_Q$DEF:QUEUE.TLB(QUECONST)' INTEGER*4 Q_BLOCK(2) INTEGER*2 INDEX CHARACTER*16 MESSAGE_ID MESSAGE_ID = 'STEEL_AVAILABLTY' ... STATUS = GET_MID_INDEX (Q_BLOCK, MESSAGE_ID, INDEX) POSSIBLE ERRORS: .SK .list 1,' ' .LE;QUE_INSFARG - Insufficient arguments .X QUE_INSFARG .LE;QUE_INVARG - Invalid arguments .X QUE_INVARG .LE;QUE_NOTINITIALIZED - Queueing functions have not been initialized .X QUE_NOTINITIALIZED .LE;QUE_MIDNOTFOUND - Message ID not found in list .X QUE_MIDNOTFOUND .ELS .fill .PAGE .c ;MODULE .c ;^&READ_Q\& .HL 2READ_Q .nf .x READ_Q>Defined Source:[MA_Q.SYSSERV]SSDISP.MAR;81 Designer :PAUL VESTUTO, EARL LAKIA Author :PAUL VESTUTO Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 31-JUL-1986 12:00:00.00 Revision level :1.0 .C ;Formal Parameter List Q_BLOCK INTEGER*4(2) Q BLOCK DESCRIPTOR ADDRESS, WILL CONTAIN THE START ADDRESS FOR P0 (Q_BLOCK(1)) AND THE END ADDRESS FOR P0 (Q_BLOCK(2)). MESSAGE_ID CHARACTER*16 MESSAGE ID TO READ FROM. MIDX INTEGER*2 (OPTIONAL) INDEX OF MESSAGE ID. USED FOR FASTER ACCESS TO THE MESSAGE ID HEADER. IF NOT SPECIFIED, THE MESSAGE ID NAME IS USED. IF SPECIFIED, THE NAME CALCULATED FROM THE INDEX IS COMPARED WITH THE PASSED NAME, AND IF NOT THE SAME, THE PASSED NAME IS USED. Returns: MESSAGE_BUFFER CHARACTER*(LENGTH) BUFFER TO READ INTO. THE SPECIFIED LENGTH MUST BE LARGE ENOUGH TO HOLD THE LARGEST POSSIBLE MESSAGE PLUS THE MESSAGE HEADER. FOR EXAMPLE: IF A MESSAGE WAS WRITTEN AS 230 BYTES, THE READER MUST HAVE A BUFFER LARGE ENOUGH TO HOLD THE 230 TEXT BYTES, PLUS HDR$K_SIZ BYTES FOR THE MESSAGE HEADER. IF NOT LARGE ENOUGH, AN APPROPRIATE ERROR MESSAGE WILL BE RETURNED. RNA_POINTER INTEGER*4 POINTER TO THIS MESSAGE, WHICH HAS JUST BECOME THE NEW RNA MESSAGE. THIS VALUE IS USED FOR ACKNOWLEGING READING A MESSAGE. READ_Q INTEGER*4 THIS IS THE RETURN CODE AS DESCRIBED BY THE VMS STANDARDS AND THE QUESRV STANDARDS. Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This routine reads a message from the specified message ID. The following conditions are checked: .LIST 1,' ' .LE;the message ID exists .LE;the message ID does not have an RNA message .LE;the message ID does have an unread message .LE;the calling process is connected to the specified message ID .LE;the user buffer is large enough to hold the next message .ELS If any of the above conditions are not met, an appropriate error message is returned. The queue does not get checkpointed because the read information is considered to be volatile. This routines expects the parameters to be valid, if not an appropriate return code is returned to the caller. .tp 27 .nofill .SKIP INCLUDE 'MA_Q$DEF:QUEUE.TLB(QUECONST)' INCLUDE 'MA_Q$DEF:QUEUE.TLB(HDRDEF)' INTEGER*4 Q_BLOCK(2) INTEGER*4 RNA_POINTER INTEGER*2 MIDX CHARACTER MESSAGE_ID*16 MESSAGE_ID = 'STEEL_AVAILABLTY' CHARACTER MESSAGE_BUFFER*512 C C Define the message header and the rest of the read message packet C C NOTE: This structure is used to define both sections of the message C coming back from the queue, the message header and the message C body. The UNION is used to allow the caller to pass a buffer C large enough to read the entire message. That is, if just the C MESBUFHDR sub-structure was passed, the system service would C reject the call due to the buffer being too small (if the C message had a non-zero length) since the buffer is passed c by descriptor. C STRUCTURE /MESBUF/ UNION MAP CHARACTER MESSAGE_ALL*(1024) END MAP MAP RECORD /HDRDEF/ MESBUFHDR CHARACTER MESSAGE_BUF*(512) END MAP END UNION END STRUCTURE RECORD /MESBUF/ MESSAGE ... STATUS = READ_Q (Q_BLOCK, MESSAGE_ID, MESSAGE.MESSAGE_ALL, RNA_POINTER) or STATUS = READ_Q (Q_BLOCK, MESSAGE_ID, MESSAGE.MESSAGE_ALL, RNA_POINTER, MIDX) POSSIBLE ERRORS: .SK .list 1,' ' .LE;QUE_INSFARG - Insufficient arguments .X QUE_INSFARG .LE;QUE_INVARG - Invalid arguments .X QUE_INVARG .LE;QUE_NOTINITIALIZED - Queueing functions have not been initialized .X QUE_NOTINITIALIZED .LE;QUE_NOMESS - No message for the specified message ID .X QUE_NOMESS .LE;QUE_INVIDX - MID index is not consistant with MID name .X QUE_INVIDX .LE;QUE_IDXOOR - MID index is out of range .X QUE_IDXOOR .LE;QUE_MIDNOTFOUND - Message ID not found in list .X QUE_MIDNOTFOUND .LE;QUE_BUFTOOSMALL - User buffer is too small for message .X QUE_BUFTOOSMALL .LE;QUE_RNAMESS - There is an outstanding read-not-acknowleged mesage .X QUE_RNAMESS .LE;QUE_MIDNOTATT - Message ID is not attached .X QUE_MIDNOTATT .LE;QUE_HEADNOTREM - Message header unable to be removed from Message ID list .X QUE_HEADNOTREM .ELS .fill .PAGE .c ;MODULE .c ;^&RTR_WRITE_Q\& .HL 2RTR_WRITE_Q .nf .x RTR_WRITE_Q>Defined Source:[MA_Q.SYSSERV]SSDISP.MAR;81 Designer :PAUL VESTUTO, EARL LAKIA Author :PAUL VESTUTO Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 30-JUL-1986 12:00:00.00 Revision level :1.0 .C ;Formal Parameter List Q_BLOCK INTEGER*4(2) Q BLOCK DESCRIPTOR ADDRESS, WILL CONTAIN THE START ADDRESS FOR P0 (Q_BLOCK(1)) AND THE END ADDRESS FOR P0 (Q_BLOCK(2)). MESSAGE_ID CHARACTER*16 MESSAGE ID MESSAGE_BUF CHARACTER*(x) BUFFER CONTAINING TEXT OF MESSAGE TO ADD TO QUEUE. MESSAGE_LENGTH INTEGER*2 LENGTH OF MESSAGE. MESAGE_TYPE INTEGER*2 TYPE OF MESSAGE MIDX INTEGER*2 (OPTIONAL) INDEX OF MESSAGE ID. USED FOR FASTER ACCESS TO THE MESSAGE ID HEADER. IF NOT SPECIFIED, THE MESSAGE ID NAME IS USED. IF SPECIFIED, THE NAME CALCULATED FROM THE INDEX IS COMPARED WITH THE PASSED NAME, AND IF NOT THE SAME, THE PASSED NAME IS USED. Returns: RTR_WRITE_Q INTEGER*4 THIS IS THE RETURN CODE AS DESCRIBED BY THE VMS STANDARDS AND THE QUESRV STANDARDS. Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This routine adds a message to the specified Message ID. The only difference between this routine and WRITE_Q is that the header does not get added to the front of the text in this routine. The MAQ router uses this routine to bypass adding the header since it already precedes the data. This routines expects the parameters to be valid, if not an appropriate return code is returned to the caller. .tp 30 .nofill .SKIP INCLUDE 'MA_Q$DEF:QUEUE.TLB(QUECONST)' INTEGER*4 STATUS ! System service return status INTEGER*4 Q_BLOCK(2) ! from ATTACH_Q CHARACTER MESSAGE_ID*16 ! Id we will be writing CHARACTER MESSAGE*512 ! message buffer (passed by descp.) INTEGER*2 LENGTH ! size of messasge (note: word) INTEGER*2 MTYPE ! type: deletable or not (note: word) INTEGER*2 MIDX ! Index of Message ID MESSAGE_ID = 'STEEL_AVAILABLTY' MESSAGE = 'BOF OXYGEN ON, HEAT=60010, TIME=30-JUL-1986 10:44:55.37' LENGTH = 55 MTYPE = 0 ... STATUS = RTR_WRITE_Q (Q_BLOCK, MESSAGE_ID, MESSAGE, LENGTH, MTYPE) or STATUS = RTR_WRITE_Q (Q_BLOCK, MESSAGE_ID, MESSAGE, LENGTH, MTYPE, MIDX) IF (STATUS .NE. %LOC(QUE_SUCCESS))THEN ... ERROR ... ENDIF POSSIBLE ERRORS: .SK .list 1,' ' .LE;QUE_INVIDX - MID index is not consistant with MID name .X QUE_INVIDX .LE;QUE_IDXOOR - MID index is out of range .X QUE_IDXOOR .LE;QUE_MIDNOTFOUND - Message ID not found in list .X QUE_MIDNOTFOUND .LE;QUE_INSFARG - Insufficient arguments .X QUE_INSFARG .LE;QUE_INVARG - Invalid arguments .X QUE_INVARG .LE;QUE_NOTINITIALIZED - Queueing functions have not been initialized .X QUE_NOTINITIALIZED .LE;QUE_INSFREE - Insufficient number of free blocks .X QUE_INSFREE .LE;QUE_MIDMAX - Message ID is at maximum allowed messages .X QUE_MIDMAX .LE;QUE_NOCHK - Checkpoint process is not available .X QUE_NOCHK .ELS .fill .PAGE .c ;MODULE .c ;^&WRITE_Q\& .HL 2WRITE_Q .nf .x WRITE_Q>Defined Source:[MA_Q.SYSSERV]SSDISP.MAR;81 Designer :PAUL VESTUTO, EARL LAKIA Author :PAUL VESTUTO Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 30-JUL-1986 12:00:00.00 Revision level :1.0 .C ;Formal Parameter List Q_BLOCK INTEGER*4(2) Q BLOCK DESCRIPTOR ADDRESS, WILL CONTAIN THE START ADDRESS FOR P0 (Q_BLOCK(1)) AND THE END ADDRESS FOR P0 (Q_BLOCK(2)). MESSAGE_ID CHARACTER*16 MESSAGE ID MESSAGE_BUF CHARACTER*(x) BUFFER CONTAINING TEXT OF MESSAGE TO ADD TO QUEUE. MESSAGE_LENGTH INTEGER*2 LENGTH OF MESSAGE. MESAGE_TYPE INTEGER*2 TYPE OF MESSAGE MIDX INTEGER*2 (OPTIONAL) INDEX OF MESSAGE ID. USED FOR FASTER ACCESS TO THE MESSAGE ID HEADER. IF NOT SPECIFIED, THE MESSAGE ID NAME IS USED. IF SPECIFIED, THE NAME CALCULATED FROM THE INDEX IS COMPARED WITH THE PASSED NAME, AND IF NOT THE SAME, THE PASSED NAME IS USED. Returns: WRITE_Q INTEGER*4 THIS IS THE RETURN CODE AS DESCRIBED BY THE VMS STANDARDS AND THE QUESRV STANDARDS. Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This routine adds a message to the specified Message ID. This routines expects the parameters to be valid, if not an appropriate return code is returned to the caller. .tp 35 .nofill .SKIP INCLUDE 'MA_Q$DEF:QUEUE.TLB(QUECONST)' INTEGER*4 STATUS ! System service return status INTEGER*4 Q_BLOCK(2) ! from ATTACH_Q CHARACTER MESSAGE_ID*16 ! Id we will be writing CHARACTER MESSAGE*512 ! message buffer (passed by descp.) INTEGER*2 LENGTH ! size of messasge (note: word) INTEGER*2 MTYPE ! type: deletable or not (note: word) INTEGER*2 MIDX ! Index of Message ID MESSAGE_ID = 'STEEL_AVAILABLTY' MESSAGE = 'BOF OXYGEN ON, HEAT=60010, TIME=30-JUL-1986 10:44:55.37' LENGTH = 55 MTYPE = 0 ... STATUS = WRITE_Q (Q_BLOCK, MESSAGE_ID, MESSAGE, LENGTH, MTYPE) or STATUS = WRITE_Q (Q_BLOCK, MESSAGE_ID, MESSAGE, LENGTH, MTYPE, MIDX) IF (STATUS .NE. %LOC(QUE_SUCCESS))THEN ... ERROR ... ENDIF POSSIBLE ERRORS: .SK .list 1,' ' .LE;QUE_INVIDX - MID index is not consistant with MID name .X QUE_INVIDX .LE;QUE_IDXOOR - MID index is out of range .X QUE_IDXOOR .LE;QUE_MIDNOTFOUND - Message ID not found in list .X QUE_MIDNOTFOUND .LE;QUE_INSFARG - Insufficient arguments .X QUE_INSFARG .LE;QUE_INVARG - Invalid arguments .X QUE_INVARG .LE;QUE_NOTINITIALIZED - Queueing functions have not been initialized .X QUE_NOTINITIALIZED .LE;QUE_MIDATTACHED - Message ID is already attached .X QUE_MIDATTACHED .LE;QUE_INSFREE - Insufficient number of free blocks .X QUE_INSFREE .LE;QUE_MIDMAX - Message ID is at maximum allowed messages .X QUE_MIDMAX .LE;QUE_NOCHK - Checkpoint process is not available .X QUE_NOCHK .ELS .fill .PAGE .HL 1 [MA_Q.ROUTE]ACK_LAST_WRITE.FOR;16 .c ;MODULE .c ;^&ACK_LAST_WRITE\& .HL 2ACK_LAST_WRITE .nf .x ACK_LAST_WRITE>Defined Source:[MA_Q.ROUTE]ACK_LAST_WRITE.FOR;16 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:10-SEP-86 Revision level :1.1 .C ;Formal Parameter List Receives: NRB STRUCTURE/NRBDEF/ NRB OF NODE WHICH THIS MESSAGE WAS RECEIVED ON. BUF STRUCTURE/BUFDEF/ ACTUAL BUFFER RECEIVED NRBID STRUCTURE/NRBID/ NRB MESSAGE ID'S Returns: Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON MA_ROUTER LOCAL COMMON Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG LOG ERROR MESSAGE (found in library:INLAND) .X ACK_READ>Referenced ACK_READ ACKNOWLEGE MESSAGE TO QUEUE SYSTEM SERVICE (found in library:QUEUE) .X MARK_NOPEND>Referenced MARK_NOPEND CLEAR RESPONSE PENDING BIT IN MID WHEN ALL DONE .SK .fill .SK Description: .sk This subroutine is called to acknowlege the last written message read from the queue and which the response message is in "BUF". The subroutine does some verifications to make sure all is good (such as the index) and simply calls the ACK_READ system service. After acknowleging the message in the queue, the response pending bit in the Message ID list head status word is cleared. Also since more messages may have come in, set our wake up event flag if there are free buffers. .literal CALLING SEQUENCE: CALL ACK_LAST_WRITE(NRB,BUF,NRBID) .END LITERAL .PAGE .HL 1 [MA_Q.ROUTE]ALC_OUT_BUF.FOR;5 .c ;MODULE .c ;^&ALC_OUT_BUF\& .HL 2ALC_OUT_BUF .nf .x ALC_OUT_BUF>Defined Source:[MA_Q.ROUTE]ALC_OUT_BUF.FOR;5 Designer :EARL LAKIA Author : Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:15-JUL-1986 13:47:28.85 Revision level :1.0 .C ;Formal Parameter List Receives: NRB STRUCTURE/NRBDEF/ NRB FOR NODE THAT NEEDS A RESPONSE BUFFER USE LIST OF IN USE FLAGS (0= FREE, 1= NOT FREE) ADD LIST OF ADDRESSES OF AVAILABLE RESPONSE BUFFERS Returns: OUT_BUF_ADDR INTEGER*4 ADDRESS OF THE RESPONSE BUFFER Accesses common(s): MA_ROUTER_COMMON GLOBAL COMMON FOR MA_ROUTER Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG ERROR MESSAGES (found in library:INLAND) .SK .fill .SK Description: .sk This subroutine is called to allocate an output buffer from the available buffers. If there are no buffers available, then a message is output to the console and a status of RTR_NORSPBUF is returned to the caller. The callling sequence is: .nofill record/nrbdef/nrb sys_status=ALC_OUT_BUF(nrb,USE,ADD,BUF_ADDR) .PAGE .HL 1 [MA_Q.ROUTE]ALC_RESP_BUF.FOR;10 .c ;MODULE .c ;^&ALC_RESP_BUF\& .HL 2ALC_RESP_BUF .nf .x ALC_RESP_BUF>Defined Source:[MA_Q.ROUTE]ALC_RESP_BUF.FOR;10 Designer :EARL LAKIA Author : Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:15-JUL-1986 13:47:28.85 Revision level :1.0 .C ;Formal Parameter List Receives: NRB STRUCTURE/NRBDEF/ NRB FOR NODE THAT NEEDS A RESPONSE BUFFER USE LIST OF IN USE FLAGS (0= FREE, 1= NOT FREE) ADD LIST OF ADDRESSES OF AVAILABLE RESPONSE BUFFERS Returns: RESP_BUF_ADDR INTEGER*4 ADDRESS OF THE RESPONSE BUFFER Accesses common(s): MA_ROUTER_COMMON GLOBAL COMMON FOR MA_ROUTER Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG ERROR MESSAGES (found in library:INLAND) .SK .fill .SK Description: .sk This subroutine is called to allocate a response buffer from the available buffers. If there are no buffers available, then a message is output to the console and a status of RTR_NORSPBUF is returned to the caller. The callling sequence is: .nofill record/nrbdef/nrb sys_status=alc_resp_buffer(nrb,USE,ADD,RESP_BUF_ADDR) .PAGE .HL 1 [MA_Q.ROUTE]BUILD_REMOTE_CONNECT_NCB.FOR;5 .c ;MODULE .c ;^&BUILD_REMOTE_CONNECT_NCB\& .HL 2BUILD_REMOTE_CONNECT .nf .x BUILD_REMOTE_CONNECT_NCB>Defined Source:[MA_Q.ROUTE]BUILD_REMOTE_CONNECT_NCB.FOR;5 Designer :EARL LAKIA Author : Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 8-JUL-1986 14:53:24.62 Revision level :1.0 .C ;Formal Parameter List Receives: ACC_STRING COUNTED STRING ACCESS CONTROL FROM NETWORK MESSAGE NRB STRUCTURE MATCHING NODE NAME FOR THE REMOTE CONNECT REQ. Returns: BUILD_REMOTE_CONNECT_NCB INTEGER*4 RETURN STATUS Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This subroutine is called to set up the NRB for a remote node which is requesting a connection. The bit NRB$M_RNRQC is set such that a connect will be attempted with this access control string in stead of the normal access control string. Calling sequence: .nofill .sk SYS_STATUS=BUILD_REMOTE_CONNECT_NCB(ACC_STRING,NRB) .PAGE .HL 1 [MA_Q.ROUTE]BUILD_RESP.FOR;28 .c ;MODULE .c ;^&BUILD_RESP\& .HL 2BUILD_RESP .nf .x BUILD_RESP>Defined Source:[MA_Q.ROUTE]BUILD_RESP.FOR;28 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:14-AUG-86 Revision level :1.4 .C ;Formal Parameter List Receives: STATUS INTEGER*4 CONTAINS STATUS AS RETURNED FROM THE WRITE_Q SUBROUTINE. MSG STRUCTURE/MGHDEF/ MESSAGE THAT WAS READ, REMOVE MESSAGE ID, ETC. RESP_BUF STRUCTURE/RSPDEF/ BUFFER, I/O STATUS AND LINKS FOR THE RESPONSE NRB STRUCTURE/NRBDEF/ NRB OF NODE GETTING THE RESPONSE Returns: Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON MAIN COMMON Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG ERROR MESSAGS (found in library:INLAND) .X NET_READ_RESP_AST>Referenced NET_READ_RESP_AST Called via the QIO when response we are queueing is complete .x DEA_RESP_BUF>Referenced DEA_RESP_BUF In the event that the QIO can not be performed, then the buffer must be released. .SK .fill .SK Description: .sk This subroutine is called after the write_q subroutine is called. This subroutine will build one of three messages into the response buffer provided and do the Qio to the remote network. If there is a system service error (node no longer reachable, etc., channel number is now zero), then the buffer is deallocated. This subroutine will complete successfully and handle all errors encountered. This subroutine will store the address of the NRB into the RESP_BUF. Calling Sequence: .nofill .sk CALL BUILD_RESP(STATUS,NRB,MESG,RESP_BUF) .PAGE .HL 1 [MA_Q.ROUTE]BUILD_ROUTE_TABLE.FOR;24 .c ;MODULE .c ;^&BUILD_ROUTE_TABLE\& .HL 2BUILD_ROUTE_TABLE .nf .x BUILD_ROUTE_TABLE>Defined Source:[MA_Q.ROUTE]BUILD_ROUTE_TABLE.FOR;24 Designer :EARL LAKIA Author : Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 2/23/87 Revision level :1.3 .C ;Formal Parameter List Receives: R_DBS STRUCTURE/NRBDEF/ ROUTING DATABASE SINGLE NODE ROUTING BLOCK Returns: BUILD_ROUTE_TABLE INTEGER*4 RETURN STATUS FROM THIS SUBROUTINE Accesses common(s): .X ROUTE_DBS>Common ROUTE_DBS ROUTING DATABASE .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON COMMON FOR ALL OF MA_ROUTER Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG OPERATOR CONSOLE MESSAGES (found in library:INLAND) .X LINK_ID_LST>Referenced LINK_ID_LST LINKS THE MESSAGE ID LIST TO THE ID LIST HEAD IN THE QUEUE .SK .fill .SK Description: .sk This subroutine initializes the new routing database. It creates descriptors, and relocaates any needed addresses. Threads are made between message ids defined in the routing database and the actual message id list heads in the queue. .PAGE .HL 1 [MA_Q.ROUTE]CHK_LNK_SEQ.FOR;14 .c ;MODULE .c ;^&CHK_LNK_SEQ\& .HL 2CHK_LNK_SEQ .nf .x CHK_LNK_SEQ>Defined Source:[MA_Q.ROUTE]CHK_LNK_SEQ.FOR;14 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 08-DEC-1986 Revision level :1.1 .C ;Formal Parameter List Receives: BUF STRUCTURE/BUFDEF/ MESSAGE AND STATUS BLOCK OF MESSAGE READ NRB STRUCTURE/NRBDEF/ NRB FOR THE LINK WHICH THE DATA WAS READ ON Returns: Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This subroutine simply logs an error if the link sequence numbers are not sequentially incrementing and then resets the link sequence number to that in the message. CALLING SEQUENCE .SK CALL CHK_LNK_SEQ(BUF,NRB) .PAGE .HL 1 [MA_Q.ROUTE]CMP_NAME.FOR;16 .c ;MODULE .c ;^&CMP_NAME\& .HL 2CMP_NAME .nf .x CMP_NAME>Defined Source:[MA_Q.ROUTE]CMP_NAME.FOR;16 Designer :EARL LAKIA Author : Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 7-JUL-1986 15:47:03.60 Revision level :1.0 .C ;Formal Parameter List Receives: NODE STRUCTURE CHARACTER*6 NODE NAME ARRAY TO COMPARE NRB STRUCTURE NODE ROUTING BLOCK Returns: CMP_NAME LOGICAL .TRUE. IF NODE MATCHES, ELSE .FALSE. FLAGS INTEGER*4 FLAG LONG WORD FROM THE NRB Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This subroutine is passed a node name and also the NRB for some node. If the passed node name equells either the primary or the secondary node name, then it is considered a match. The current value of the flag word is also returned. .nofill Calling/use: IF( CMP_NAME(NODE,%VAL(NRBADDRESS),FLAGS))THEN ----- GOT A MATCH OF NODE NAMES ------ ENDIF .fill If the matching node name is the secondary node name the approiate bit is set in the nrb flag word, otherwise it is cleared denoting the primary. .PAGE .HL 1 [MA_Q.ROUTE]CONNECT_NODE.FOR;52 .c ;MODULE .c ;^&CONNECT_NODE\& .HL 2CONNECT_NODE .nf .x CONNECT_NODE>Defined Source:[MA_Q.ROUTE]CONNECT_NODE.FOR;52 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:27-FEB-1987 Revision level :1.4 .C ;Formal Parameter List Receives: NRB STRUCTURE ROUTING DATABASE NODE ROUTING BLOCK Returns: CONNECT_NODE INTEGER*4 STATUS RETURN FOR THIS SUBROUTINE Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON MA_ROUTER COMMON PARAMETERS SHARED THROUGHTOUT .X ROUTE_DBS>Common ROUTE_DBS ROUTING DATABASE, HOWEVER, ITS ADDRESSES IS PASSED AS A PARAMETER Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG USED TO WRITE TO CONSOLE (found in library:INLAND) .X DISCONNECT_NODE>Referenced DISCONNECT_NODE IF CONNECT FAILS, CALL TO DISCONNECT AND START RETRY TIMERS .X NON_BLANK_LEN>Referenced STRING LENGTH WITHOUT BLANKS (found in library:INLAND) .SK .fill .SK Description: .sk This subroutine is responsible for doing the initial connection attempts to a remote node. To do this, the subroutine must build NCBs and request connection. The AST will handle the actual completion of the connection. The channel number will also be stored in the routing database. CALLING SEQUENCE SYS_STATUS=CONNECT_NODE(NRB) .PAGE .HL 1 [MA_Q.ROUTE]CONNECT_NODE_AST.FOR;34 .c ;MODULE .c ;^&CONNECT_NODE_AST\& .HL 2CONNECT_NODE_AST .nf .x CONNECT_NODE_AST>Defined Source:[MA_Q.ROUTE]CONNECT_NODE_AST.FOR;34 Designer :EARL LAKIA Author : Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 24-FEB-1987 Revision level :1.1 .C ;Formal Parameter List Receives: NRB STRUCTURE NODE ROUTING BLOCK (STATUS ABOUT A PARTICULAR NODE. R0 INTEGER*4 SAVED R0 FROM AST R1 INTEGER*4 SAVED R1 FROM AST PC INTEGER*4 SAVED PC FROM AST PSL INTEGER*4 SAVED PSL FROM AST Returns: Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON MA_ROUTER COMMON PARAMETERS SHARED THROUGHTOUT .X EVENT_Q>Common EVENT_Q EVENT QUEUE Accesses file(s): Other modules referenced: .X DISCONNECT_NODE>Referenced DISCONNECT_NODE IF CONNECT ERROR, CALL TO DISCONNECT AND START RETRY TIMER .X OPR_FAO_MSG>Referenced OPR_FAO_MSG LOG MESSAGE TO CONSOLE (found in library:INLAND) .X WRITE_QREC>Referenced WRITE_QREC WRITE NETWORK STATUS MESSAGE TO QUEUE (found in library: QUEUE) .X PUSH_EVENT_QUE>Referenced PUSH_EVENT_QUE USED TO PUSH CONNECT EVENT INTO THE EVENT QUEUE .SK .fill .SK Description: .sk This subroutine is called by the system AST services when a QIO was requested to connect a node with a remote node. If the status was successful (status block in NRB) then the node is marked as reachable and useable. Otherwise, a retry timer is started, the node is marked as down, and the network channel is deassigned. Calling Sequence (VIA QIO): .nofill SYS_STATUS=SYS$QIO(...%VAL(IO$_ACCESS),...,CONNECT_NODE_AST,NRB,....) .PAGE .HL 1 [MA_Q.ROUTE]CON_TIMER_AST.FOR;13 .c ;MODULE .c ;^&CON_TIMER_AST\& .HL 2CON_TIMER_AST .nf .x CON_TIMER_AST>Defined Source:[MA_Q.ROUTE]CON_TIMER_AST.FOR;13 Designer :EARL LAKIA Author : Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 7-JUL-1986 09:41:08.95 Revision level :1.0 .C ;Formal Parameter List Receives: NRB STRUCTURE/NRBDEF/ NODE REQUEST BLOCK OF NODE CONNECTION TIMEOUT OCCURRED ON. R0 INTEGER*4 SAVED R0 FROM AST R1 INTEGER*4 SAVED R1 FROM AST PC INTEGER*4 SAVED PC FROM AST PSL INTEGER*4 SAVED PSL FROM AST Returns: Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON MA_ROUTER COMMON PARAMETERS SHARED THROUGHTOUT Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG LOG MESSAGE TO CONSOLE (found in library:INLAND) .X PUSH_EVENT_QUE>Referenced PUSH_EVENT_QUE USED TO PUSH CONNECT EVENT INTO THE EVENT QUEUE .SK .fill .SK Description: .sk This subroutine is called when a timer expires while attempting to connect to a remote node. The NRB is passed of the node that the timer expired for. This is not the DECNET connect timeout but rather one that we set for ourselves. This routine will deassign the channel number if present (may not be present if inital attemp also failed). Push event so that mainline will attempt to reconnect in an orderly fashion. The calling sequence is via the SETIMR system service call where the AST address is us, and the NRB is the REQID. .PAGE .HL 1 [MA_Q.ROUTE]DEA_OUT_BUF.FOR;7 .c ;MODULE .c ;^&DEA_OUT_BUFFER\& .HL 2DEA_OUT_BUFFER .nf .x DEA_OUT_BUFFER>Defined Source:[MA_Q.ROUTE]DEA_OUT_BUF.FOR;7 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:10-NOV-1986 Revision level :1.1 .C ;Formal Parameter List Receives: ADDR INTEGER*4 ADDR OF RESPONSE BUFFER TO DEALLOCATE USE BYTE ARRAY ARRAY OF IN USE FLAGS Returns: Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON MA_ROUTER COMMON Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG LOG MESSAGES (found in library:INLAND) .X AT_ADD>Referenced AT_ADD Get value at the given address. (found in library: INLAND) .SK .fill .SK Description: .sk This subroutine is called to deallocate an output buffer. Since there may be messages to be routed but were held up because there were no buffers available, set the wakeup event flag if it goes from zero to one. There is no way that this subroutine should fail. The OUTBUF contains links to the response buffer list head such that the entry can freed. Calling sequence: CALL DEA_OUT_BUF(ADDR,USE) .PAGE .HL 1 [MA_Q.ROUTE]DEA_RESP_BUF.FOR;14 .c ;MODULE .c ;^&DEA_RESP_BUFFER\& .HL 2DEA_RESP_BUFFER .nf .x DEA_RESP_BUFFER>Defined Source:[MA_Q.ROUTE]DEA_RESP_BUF.FOR;14 Designer :EARL LAKIA Author : Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:15-JUL-1986 13:59:27.33 Revision level :1.0 .C ;Formal Parameter List Receives: ADDR INTEGER*4 ADDR OF RESPONSE BUFFER TO DEALLOCATE USE BYTE ARRAY ARRAY OF IN USE FLAGS Returns: Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON MA_ROUTER COMMON Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG LOG MESSAGES (found in library:INLAND) .X AT_ADD>Referenced AT_ADD Get value at the given address. (found in library: INLAND) .SK .fill .SK Description: .sk This subroutine is called to deallocate a response buffer. There is no way that this should fail. The RSPBUF contains links to the response buffer list head such that the entry can freed. Calling sequence: CALL DEA_RESP_BUF(ADDR,USE) .PAGE .HL 1 [MA_Q.ROUTE]DISCONNECT_NODE.FOR;19 .c ;MODULE .c ;^&DISCONNECT_NODE\& .HL 2DISCONNECT_NODE .nf .x DISCONNECT_NODE>Defined Source:[MA_Q.ROUTE]DISCONNECT_NODE.FOR;19 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 24-FEB-1987 Revision level :1.2 .C ;Formal Parameter List Receives: NRB STRUCTURE/NRBDEF/ NRB OF NODE THAT IS TO BE DISCONNECTED Returns: Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON GLOBAL COMMON USED BY THE MA_ROUER Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG USED TO LOG ERROR MESSAGES (found in library:INLAND) .X WRITE_QREC>Referenced WRITE_QREC Write message to queue service. (found in library: QUEUE) .SK .fill .SK Description: .sk This subroutine is called to disconnect the logical link with a remote node. This routine does it not so gracefully as this routine is called because an error has occurred. .sk .nofill CALL DISCONNECT_NODE(NRB) .PAGE .HL 1 [MA_Q.ROUTE]DUMPNRBDBS.FOR;1 .c ;MODULE .c ;^&DUMPNRBDBS\& .HL 2DUMPNRBDBS .nf .x DUMPNRBDBS>Defined Source:[MA_Q.ROUTE]DUMPNRBDBS.FOR;1 Designer :EARL LAKIA Author : Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:11-NOV-1986 10:00:52.18 Revision level :1.0 .C ;Formal Parameter List Receives: I INTEGER*4 ARRAY ARRAY TO BE DUMPED ISIZ INTEGER*4 NUMBER OF DISK BLOCKS IN ARRAY Returns: Accesses common(s): Accesses file(s): SYS$DISK:ROUTEDBS.DMP WRITE/CREATE .X SYS$DISK:ROUTEDBS.DMP>WRITE/CREATE Other modules referenced: .SK .fill .SK Description: .sk (PLEASE ENTER A DESCRIPTION OF THE MODULE HERE - INCLUDING CALLING SEQUENCE) .PAGE .HL 1 [MA_Q.ROUTE]FIND_SERVICE.FOR;32 .c ;MODULE .c ;^&FIND_SERVICE\& .HL 2FIND_SERVICE .nf .x FIND_SERVICE>Defined Source:[MA_Q.ROUTE]FIND_SERVICE.FOR;32 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:24-FEB-1987 09:21 Revision level :1.0 .C ;Formal Parameter List Receives: Returns: Accesses common(s): .X ROUTE_DATABASE>Common ROUTE_DATABASE MA-ROUTER DATABASE Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG LOG MESSAGES/ERRORS (found in library:INLAND) .X GET_SERVICE>Referenced GET_SERVICE CALLED TO ACTUALLY FIND THE SERVICE ON REMOTE NODE. (USE SUBR. SO CAN PASS GLOBAL SECTION ADDRESS). .SK .fill .SK Description: .sk This program is requested by a create process from the MA_ROUTER program. When this process is started, it maps to the MA_ROUTER's routing database and scans for any NRBs (nodes) that show that the primary node is a Logical node name and that a logical connection is not present. The process then calls SYCLU2::TASK=SERVICE with the desired logical name to find what node the service is currently on. If this is successful, the NRB for this node is modified to point to this node. IE: if the logical name is "PROD ", and after calling the service on SYCLU2, the node that is performing this is SY880A, then the NRB$C_SECNODE will be filled in with the SY880A node name. This process must run at the same uic as the MA_Router as the global section is only group global. .PAGE .HL 1 [MA_Q.ROUTE]GET_OUT_MESG.FOR;32 .c ;MODULE .c ;^&GET_OUT_MESG\& .HL 2GET_OUT_MESG .nf .x GET_OUT_MESG>Defined Source:[MA_Q.ROUTE]GET_OUT_MESG.FOR;32 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:12-SEP-86 Revision level :1.2 .C ;Formal Parameter List Receives: BUF STRUCTURE/BUFDEF/ BUFFER THAT IS TO RECIEVE THE MESSAGE FROM QUEUE NRB STRUCTURE/NRBDEF/ NRB THAT THIS MESSAGE IS BEING ROUTED TO NRBID STRUCTURE/NRBID/ NRBID MESSAGE ID ROUTING ENTRY IN NRB Returns: Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON MA ROUTET LOCAL GLOBAL COMMON Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG LOG ERRORS TO OPERATOR CONSOLE (found in library:INLAND) .X READ_Q>Referenced READ_Q GET A MESSAGE FROM THE QUEUE (found in library:QUEUE) .SK .fill .SK Description: .sk This subroutine is called to fill in a buffer allocated from the output buffer pool of buffers. This subroutine simply gets the message from the queue (message id comes from NRBID$C_MSGID) into the message buffer and fills in all the poop needed to do the QIO. The subroutine then actually does the QIO. .literal CALLING SEQUENCE INTEGER*4 GET_OUT_MSG INTEGER*4 SYS_STATUS SYS_STATUS=GET_OUT_MSG(%VAL(BUF_ADDR),NRB,NRBID) .end literal If the status returned is not valid, then the buffer should be deallocated by the calling routine as we could not get a message from the queue. NOTE: THIS SUBROUTINE MUST BE CALLED WITH AST'S LOCKED OUT AS THE OUTPUT LINK SEQUENCE NUMBER IS MODIFIED BY THIS ROUTINE. .PAGE .HL 1 [MA_Q.ROUTE]GET_Q_EVENT.FOR;18 .c ;MODULE .c ;^&GET_Q_EVENT\& .HL 2GET_Q_EVENT .nf .x GET_Q_EVENT>Defined Source:[MA_Q.ROUTE]GET_Q_EVENT.FOR;18 Designer :EARL LAKIA Author :EARL LAKIA Date of last update:27-JUN-86 Revision level :1.0 .C ;Formal Parameter List Receives: Returns: GET_Q_EVENT INTEGER*4 STATUS OF GETTING AN ENTRY SS$_NORMAL, GOT ONE ELSE SS$_ENDOFILE OR 0 IF EVENT QUEUE IS EMPTY INDEX INTEGER*4 INDEX TO THE EVENT STRUCTURE FOR THIS EVENT EVENT_NUMBER INTEGER*4 EVENT NUMBER FROM EVENT RECORD Accesses common(s): EVENT_Q EVENT COMMON USED TO STORE EVENTS .X EVENT_Q>REFERENCED Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk .FILL This function subroutine will look at the queued events that have been queued and return the next available entry and update any queue pointers. If there are no more entries in the queue, then "SS$_ENDOFILE" is return otherwise: "SS$_NORMAL". .nofill CALLING SEQUENCE: sys_status=GET_Q_EVENT(EVENT_NUMBER,INDEX) .fill .PAGE .c ;MODULE .c ;^&PUSH_EVENT_QUE\& .HL 2PUSH_EVENT_QUE .nf .x PUSH_EVENT_QUE>Defined Source:[MA_Q.ROUTE]GET_Q_EVENT.FOR;18 Designer :EARL LAKIA Author :EARL LAKIA Date of last update: 06-JUL-86 Revision level :1.0 .C ;Formal Parameter List Receives: EVENT STRUCTURE EVENT TO BE PUSHED ONTO THE EVENT STACK Returns: PUSH_EVENT_QUE INTEGER*4 SS$_NORMAL IF SUCESSFUL OR SS$_MBFULL IF EVENT QUEUE FULL. Accesses common(s): .X EVENT_Q>Common EVENT_Q EVENT COMMON TO STORE QUEUED EVENTS Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This module will take an event and push it onto the the fifo stack of events to be serviced by the main line program. If there are too many events, then the subroutine will return full status. The pointers to the queue are updated on successful updates. The wake up event flag is then set to wake up the mainline code. .nofill CALLING SEQUENCE: sys_status= PUSH_EVENT_QUE(EVENT) .FILL .PAGE .HL 1 [MA_Q.ROUTE]LOUT.FOR;2 .c ;MODULE .c ;^&LOUT\& .HL 2LOUT .nf .x LOUT>Defined Source:[MA_Q.ROUTE]LOUT.FOR;2 Designer :EARL LAKIA Author : Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:25-AUG-1986 12:49:19.71 Revision level :1.0 .C ;Formal Parameter List Receives: Returns: Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This is a simple program that is used to communicate with the MA_ROUTER process. It basically, defines itself to DECNET as a known object and is used to test messages from the MA_ROUTER process to us (IE: we are a fake remote MA_ROUTER). This program will need SYSNAM privelege to define itself to DECNET. .PAGE .HL 1 [MA_Q.ROUTE]MAP_IDS.FOR;24 .c ;MODULE .c ;^&MAP_IDS\& .HL 2MAP_IDS .nf .x MAP_IDS>Defined Source:[MA_Q.ROUTE]MAP_IDS.FOR;24 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:23-SEP-86 Revision level :1.4 .C ;Formal Parameter List Receives: NRB STRUCTURE NODE ROUTING BLOCK STRUCTURE MSG_ID_LIST STRUCTURE A STRUCTURE LIST CONTAINING MESSAGE ID AND A LONG WORD TO BE FILLED IN WITH INDEX INTO THE QUEUE REGION FOR THE MESSAGE ID LISTHEAD. Returns: MAP_IDS INTEGER*4 STATUS Accesses common(s): Accesses file(s): Other modules referenced: .SK .X OPR_FAO_MSG>Referenced OPR_FAO_MSG USED TO LOG MESSAGE TO OPERATOR CONSOLE (found in library:INLAND) .X CONNECT_READ>Referenced CONNECT_READ USED TO GET THE MESSAGE ID INDEX AND TO CONNECT US IN AS THE READER OF THIS MESSAGE ID. (found in library: QUEUE) .X LHD_ADD>Referenced LHD_ADD Kernal subroutine used to get the actual address from the index passed by the GET_MID_INDEX. .fill .SK Description: .sk This subroutine is passed the tail end part of a NRB within the Route_dbs. This subroutine simply takes each message id and finds it in the queue. If found, the index to the message id list head is stored in the long word following the message id. If it can not be found, then an error message is printed and the entry is left zero to denote that it was not found. Calling sequence: SYS_STATUS=MAP_IDS(NRB,MSG_ID_LIST) .PAGE .HL 1 [MA_Q.ROUTE]MA_MBX_AST.FOR;14 .c ;MODULE .c ;^&MA_MBX_AST\& .HL 2MA_MBX_AST .nf .x MA_MBX_AST>Defined Source:[MA_Q.ROUTE]MA_MBX_AST.FOR;14 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:26-aug-86 Revision level :1.1 .C ;Formal Parameter List Receives: AST_PRM INTEGER*4 AST PARAMETER FROM THE QIO (=0) R0 REGISTER SAVED R0 PRIOR TO AST DELIVERY R1 REGISTER SAVED R1 PRIOR TO AST DELIVERY PC REGISTER SAVED PC PRIOR TO AST DELIVERY PSL REGISTER PROCESSOR STATUS LONG WORD PRIOR TO AST Returns: Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON THE BUFFER FOR THE MAILBOX READ AND THE STATUS BLOCK ARE CONTAINED. Accesses file(s): Other modules referenced: .X PUSH_EVENT_QUE>Referenced PUSH_EVENT_QUE USED TO PUSH THE EVENT ONTO THE FIFO EVENT QUEUE .X OPR_FAO_MSG>Referenced OPR_FAO_MSG USED TO LOG MESSAGES TO OPERATOR CONSOLE (found in library:INLAND) .SK .fill .SK Description: .sk This subroutine is called when the QIO on the our ROUTING mailbox has completed. The I/O status block and the buffer are in the common. If status is successful, then store the event into the event queue, otherwise, log the error for later program fixing and ignore the message. .PAGE .HL 1 [MA_Q.ROUTE]MA_ROUTER.FOR;47 .c ;MODULE .c ;^&MA_ROUTER\& .HL 2MA_ROUTER .nf .x MA_ROUTER>Defined Source:[MA_Q.ROUTE]MA_ROUTER.FOR;47 Designer :EARL LAKIA Author :EARL LAKIA Date of last update:26-AUG-86 Revision level :1.4 Copy Right: Inland Steel Co. 3210 Watling St. East Chicago, IN 46312 .C ;Formal Parameter List Receives: Returns: Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON MAIN COMMON USED BY THIS PROGRAM, CHANNEL NUMBERS, VIRTUAL ADDRESSES, ETC. Accesses file(s): Other modules referenced: .X GET_Q_EVENT>Referenced GET_Q_EVENT GET AN EVENT OUT OF OUR LOCAL QUEUE OF EVENTS SUCH AS I/O COMPLETE, TIMEOUT, MAILBOX MESSAGE. .X MA_R_INIT>Referenced MA_R_INIT INITIALIZE THIS PROCESS .X NEW_ROUTING_MAP>Referenced NEW_ROUTING_MAP CALLED WHEN A NEW ROUTING DATABASE MESSAGE HAS BEEN RECEIVED. .X RECV_PROCESS_CON>Referenced RECV_PROCESS_CON CALLED WHEN A RECEIVING PROCESS WISHES TO CONNECT TO A MESSAGE ID QUEUE. .X SHUTDOWN_ROUTER>Referenced SHUTDOWN_ROUTER CALLED WHEN A MESSAGE TO SHUT US DOWN IS RECEIVED .X REMOTE_NODE_DIS>Referenced REMOTE_NODE_DIS CALLED WHEN A REMOTE DECNET NODE DISCONNECTS FROM US AND WE GET THE DISCONNECT MESSAGE IN OUR NETWORK MAILBOX. .X NON_EMPTY_Q>Referenced NON_EMPTY_Q CALLED WHEN A MESSAGE IN OUR MAILBOX HAS ARRIVED DENOTING THAT SOME MESSAGE ID HAS GONE FROM ZERO TO ONE MESSAGE IN THE QUEUE. .X FIND_ROUTE_MESSAGE>Referenced FIND_ROUTE_MESSAGE THIS SUBROUTINE IS CALLED TO SCAN FOR MESSAGES THAT CAN BE TRANSMITTED. .X NET_WRITE_COMP>Referenced NET_WRITE_COMP CALLED WHEN A NETWORK OUTPUT MESSAGE HAS COMPLETED. .X OPR_FAO_MSG>Referenced OPR_FAO_MSG USED TO LOG MESSAGES TO CONSOLE .X CON_TIMER_EXPIRE>Referenced CON_TIMER_EXPIRE CALLED WHEN A TIMER FOR CONNECTING TO OTHER REMOTE NODES HAS EXPIRED. .SK .fill .SK Description: .sk This is the main line program that performs the routing functions needed for the routing guaranteed delivery of messages between DECNET nodes. This process is started via the DCL command string: "RUN MA_ROUTER". .PAGE .HL 1 [MA_Q.ROUTE]MA_ROUTER_EXIT_HAN.FOR;11 .c ;MODULE .c ;^&MA_ROUTER_EXIT_HAN\& .HL 2MA_ROUTER_EXIT_HAN .nf .x MA_ROUTER_EXIT_HAN>Defined Source:[MA_Q.ROUTE]MA_ROUTER_EXIT_HAN.FOR;11 Designer :EARL LAKIA Author :EARL LAKIA Date of last update: 11-NOV-1986 Revision level :1.1 Copy Right: Inland Steel Co. 3210 Watling St. East Chicago, IN 46312 .C ;Formal Parameter List Receives: EXIT_STATUS INTEGER*4 SYSTEM EXIT STATUS Returns: Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON CHANNEL NUMBER, VIRTUAL ADDRESSES, ETC. THAT ARE LOADED BY THIS SUBROUTINE AND USED THROUTHOUT THIS PROGRAM. Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk THIS SUBROUTINE IS CALLED BY THE SYSTEM WHEN THE PROCESS EXITS. THIS SUBROUTINE IS A USER EXIT HANDLER. IT WAS SET UP TO BE CALLED BY THE FUNCTION MA_ROUTER_INIT WHICH PLACED THE ADDRESS OF THIS ROUTINE INTO THE EXIT HANDLER DESCRIPTOR BLOCK. THIS SUBROUTINE WILL: .LIST .LE;Send disconnect (router SNFU) type message to all processes that are connected to message ID's. .le;Send if possible to all remote nodes disconnect status. .le;Release any resources captured by this process. .le;Log a message about why we exited .le;Do any other cleanup as deemed necessary .els .PAGE .c ;MODULE .c ;^&DUMPNRBREG\& .HL 2DUMPNRBREG .nf .x DUMPNRBREG>Defined Source:[MA_Q.ROUTE]MA_ROUTER_EXIT_HAN.FOR;11 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:11-NOV-1986 10:00:52.18 Revision level :1.0 .C ;Formal Parameter List Receives: I INTEGER*4 ARRAY ARRAY TO BE DUMPED ISIZ INTEGER*4 NUMBER OF DISK BLOCKS IN ARRAY Returns: Accesses common(s): Accesses file(s): SYS$DISK:ROUTEDBS.DMP WRITE/CREATE .X SYS$DISK:ROUTEDBS.DMP>WRITE/CREATE Other modules referenced: .SK .fill .SK Description: .sk SIMPLE SUBROUTINE TO DUMP THE NRB ROUTEING DATABASE TO A DISK FILE FOR EASY LOOKING AT WHEN AN ABORT OCCURS. THE CALLING SEQUENCE IS: .NOFILL CALL DUMPNRBREG(I,ISIZ) .FILL .PAGE .HL 1 [MA_Q.ROUTE]MA_R_INIT.FOR;73 .c ;MODULE .c ;^&MA_R_INIT\& .HL 2MA_R_INIT .nf .x MA_R_INIT>Defined Source:[MA_Q.ROUTE]MA_R_INIT.FOR;73 Designer :EARL LAKIA Author :EARL LAKIA Date of last update: 25-FEB-1987 Revision level :1.6 Copy Right: Inland Steel Co. 3210 Watling St. East Chicago, IN 46312 .C ;Formal Parameter List Receives: Returns: MA_R_INIT INTEGER*4 COMPLETION STATUS OF SUBROUTINE Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON CHANNEL NUMBER, VIRTUAL ADDRESSES, ETC. THAT ARE LOADED BY THIS SUBROUTINE AND USED THROUTHOUT THIS PROGRAM. Accesses file(s): Other modules referenced: .X NEW_ROUTING_MAP>Referenced NEW_ROUTING_MAP CALL TO HAVE THE ROUTING MAP SECTION COMMON CREATED. .X MA_ROUTER_EXIT_HAN>Referenced MA_ROUTER_EXIT_HAN CALL TO SET UP OUR EXIT HANDLER .X NON_BLANK_LEN>Referenced NON_BLANK_LEN RETURN SIZE OF STRING WITHOUT ENDING BLANKS .X ATTACH_Q>Referenced ATTACH_Q ATTACHES US TO THE GLOBAL QUEUE SECTION FILE (found in queue.olb, system service) .X OPR_FAO_MSG>Referenced OPR_FAO_MSG Used to send messages to operator .SK .fill .SK Description: .sk .CENTER;MA_Q_INIT This subroutine is responsible for initializing the MA_Q process on startup. The following explains what is needed for startup (not necessaryly in order). .list .le;Attach to the Queue Section (ATTACH_Q). .le;Create our mailbox (used by all writing processes to tell us when a Message ID queue has gone from 0 to 1, by all receiving processes to tell us that they are connecting to a particular message id, by exit handler in processes to tell us that they are exiting (and therefore disconnecgting from a message id), and by the Queue utility process to tell us that a new routing database is to be installed. .le;Call BUILD_ROUTE_TABLE to build our local routing database (EG: message ID's to target Nodes). .le;Allocate any required event flags, channels, etc. .LE;Initialize event Queue .le;Setup exit handlers. .LE;Create network mailbox and assign a channel to NETACP. .le;Tell DECNET that we are to be a known object. Our object name is: "MA_ROUTER". (may wish to make this a parameter or the router database or else a logical name later). .LE;Make first attempt to connect to remote nodes .LE;Setup initial QIO for the MQ_ROUTER mailbox. .le;Attach to the queue region .els To call this subroutine: .nofill INTEGER*4 SYS_STATUS SYS_STATUS=MA_R_INIT() .PAGE .HL 1 [MA_Q.ROUTE]NET_AST.FOR;45 .c ;MODULE .c ;^&NET_AST\& .HL 2NET_AST .nf .x NET_AST>Defined Source:[MA_Q.ROUTE]NET_AST.FOR;45 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 10-NOV-1986 Revision level :1.1 .C ;Formal Parameter List Receives: NRB STRUCTURE NODE ROUTING BLOCK (STATUS ABOUT A PARTICULAR NODE. MAY ALSO BE FOR THE UNSOLICITED CONNECTS. R0 INTEGER*4 SAVED R0 FROM AST R1 INTEGER*4 SAVED R1 FROM AST PC INTEGER*4 SAVED PC FROM AST PSL INTEGER*4 SAVED PSL FROM AST Returns: Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON MA_ROUTER COMMON PARAMETERS SHARED THROUGHTOUT Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG LOG MESSAGE TO CONSOLE (found in library:INLAND) .X PUSH_EVENT_QUE>Referenced PUSH_EVENT_QUE USED TO PUSH EVENTS INTO THE EVENT QUEUE .X CONNECT_NODE>Referenced CONNECT_NODE USED TO CONNECT THE REMOTE NODE .X BUILD_REMOTE_CONNECT_NCB>Referenced BUILD_REMOTE_CONNECT_NCB Use to build the NCB for a unsolicited connect attempt. .X DISCONNECT_NODE>Referenced DISCONNECT_NODE Call to disconnect a node .X NODE_TO_NRB>Referenced NODE_TO_NRB From an unsolicited network message, take node name and find our nrb for it. .SK .fill .SK Description: .sk This subroutine is called by the system AST services when a the network mailbox has mail in it. The typical letters are for requesting a logical link, disconnecting a logical link, and network shutdown. Calling Sequence is via the ast parameter in QIO, there are no ast parameters passed, however, the buffer is contained within the ma_router common. .nofill SYS_STATUS=SYS$QIO(...%VAL(IO$_READVB),...,NET_AST,,....) .PAGE .HL 1 [MA_Q.ROUTE]NET_READ.FOR;25 .c ;MODULE .c ;^&NET_READ\& .HL 2NET_READ .nf .x NET_READ>Defined Source:[MA_Q.ROUTE]NET_READ.FOR;25 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 18-JUL-1986 Revision level :1.1 .C ;Formal Parameter List Receives: NRB STRUCTURE/NRBDEF/ CONTAINS NRB THAT READ IS TO BE DONE FOR Returns: Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON MA_ROUTER COMMON USED BY EVERYONE Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG ERROR MESSAGES (found in library:INLAND) .X DISCONNECT_NODE DISCONNECT_NODE USED TO DISCONNECT A NODE .SK .fill .SK Description: .sk This subroutine will issue a Read qio to the net work for the channel in the NRB. If an error occurrs, DISCONNECT_NODE will be called and the node will be disconnected. .nofill .sk 2 CALLING SEQUENCE .SK CALL NET_READ(NRB) .PAGE .HL 1 [MA_Q.ROUTE]NET_READ_RESP_AST.FOR;11 .c ;MODULE .c ;^&NET_READ_RESP_AST\& .HL 2NET_READ_RESP_AST .nf .x NET_READ_RESP_AST>Defined Source:[MA_Q.ROUTE]NET_READ_RESP_AST.FOR;11 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:04-AUG-86 Revision level :1.1 .C ;Formal Parameter List Receives: RSPBUF STRUCTURE/RSPDEF/ RESPONSE BUFFER AND LINK ETC. NEEDED TO DEALLOCATE R0,R1,PC,PSL REGISTERS SAVED REGISTERS FROM AST Returns: Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON MA_ROUTER COMMON Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG ERROR MESSAGES (found in library:INLAND) .X DISCONNECT_NODE>Referenced DISCONNECT_NODE USED TO DISCONNECT NODE IN THE EVENT OF DECNET ERROR .SK .fill .SK Description: .sk This subroutine is called when the write QIO for the response to a read has been output and the response buffer can now be deleted. If the status was successful, then simply deallocate the response buffer. Otherwise, disconnect the node because of the decnet error and the log it. .PAGE .HL 1 [MA_Q.ROUTE]NEW_ROUTING_MAP.FOR;69 .c ;MODULE .c ;^&NEW_ROUTING_MAP\& .HL 2NEW_ROUTING_MAP .nf .x NEW_ROUTING_MAP>Defined Source:[MA_Q.ROUTE]NEW_ROUTING_MAP.FOR;69 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 25-FEB-1987 Revision level :1.5 .C ;Formal Parameter List Receives: Returns: NEW_ROUTING_MAP INTEGER*4 RETURN STATUS Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON PROCESS COMMON FOR CHANNELS, V.A., ETC. .X ROUTE_TABLES>Common ROUTE_TABLES IF PRESENT, CONTAINS THE CURRENT ROUTING DATABASE Accesses file(s): ROUTE_DATABASE.EXE READ .X ROUTE_DATABASE.EXE>READ Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG USED TO LOG MESSAGE TO OPERATOR CONSOLE (found in library:INLAND) .X AT_ADD>Referenced AT_ADD Used to return a value at the given address (found in library: INLAND) .X RELOCATE_OFFSET RELOCATE_OFFSET Used to relocate link in the database (found in library: INLAND) .X DISCONNECT_ALL>Referenced DISCONNECT_ALL DISCONNECT ALL LOGICAL LINKS .X BUILD_ROUTE_TABLE>Referenced BUILD_ROUTE_TABLE BUILD ROUTING TABLE ENTRY .X CONNECT_NODES>Referenced CONNECT_NODE CONNECT A REMOTE NODE .X ATTACH_Q>Referenced ATTACH_Q ATTACH TO THE QUEUE SECTION .X MAP_IDS>Referenced MAP_IDS MAP IDS IN THE NRB .X GET_NODE_NAME>Referenced GET_NODE_NAME GET NODE NAME FROM REGION .SK .fill .SK Description: .sk This subroutine is called to build a new routing table database. The following actions are performed in order to do this: .list .le;Find the size of the new route table by openning the ROUTE_DATABASE.EXE file and getting the FAB$L_ALQ parameter. .le;Create and map the section with the new routing information .LE;Find out how many message ids will be serviced by us and request that the ATTACH_Q subroutine allocate sufficient storage for all of our message ids. .le;Scan the attached Queue Region for message ID's that are specified in the routing map and build and store a virtual address to the message ID listhead in the queue. Mark any that are not found such that no messages will be received. .le;Initilize the ROUTE_DATABASE and save the mapped virtual address in our common. .els The calling sequence is: .nofill .sk SYS_STATUS=NEW_ROUTING_MAP() .PAGE .HL 1 [MA_Q.ROUTE]NODE_TO_NRB.FOR;15 .c ;MODULE .c ;^&NODE_TO_NRB\& .HL 2NODE_TO_NRB .nf .x NODE_TO_NRB>Defined Source:[MA_Q.ROUTE]NODE_TO_NRB.FOR;15 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 25-FEB-1987 Revision level :1.5 .C ;Formal Parameter List Receives: NODE SUB STRUCTURE (INTEGER*2 (6)) NODE NAME TO LOOK FOR IN A 6 BYTE ARRAY Returns: NODE_TO_NRB INTEGER*4 STATUS, SS$_NORMAL, OR SS$_NOSUCHDEV IF NODE NOT FOUND NRBADD INTEGER*4 ADDRESS OF THE NRB FOR THE NODE (RELOCATED) FLAGS INTEGER*4 FLAG WORD FROM THE NRB Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON COMMON FOR THE MA_ROUTER, WE WILL GET ROUTING DATABASE VIRTUAL ADDRESSES FROM IT. Accesses file(s): Other modules referenced: .X AT_ADD>Referenced AT_ADD GETS THE LONG WORD VALUE AT THE SPECIFIED ADDRESS (found in library:INLAND) .X CMP_NAME>Referenced CMP_NAME COMPARES NODE PASSES TO THE CURRENT NODE IN THE NRB. .SK .fill .SK Description: .sk This subroutine is used to find the NRB address and the flags for a given node string. At the time writing, it was used by an AST routine servicing unsolicted connects from remote nodes. If the node is found, the status is ss$_normal, otherwise it is ss$_nosuchdev. CALLING SEQUENCE: .nofill INTEGER*2 NODE(3) DATA NODE/'PA','75','0A'/ C SYS_STATUS=NODE_TO_NRB(NODE,NRBADD,FLAGS) .PAGE .HL 1 [MA_Q.ROUTE]NRBDMP.FOR;60 .c ;MODULE .c ;^&NRBDMP\& .HL 2NRBDMP .nf .x NRBDMP>Defined Source:[MA_Q.ROUTE]NRBDMP.FOR;60 Designer :EARL LAKIA Author :Earl Lakia Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 25-feb-1987 Revision level :1.3 .C ;Formal Parameter List Receives: Returns: Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This is a simple program that allows the user to dump a typical NRB from the routing database currently installed in the system. The routing database that is used is the one currently installed in the group that the caller is running from. The MA_ROUTER must be running. .PAGE .HL 1 [MA_Q.ROUTE]OUTPUT_NET.FOR;10 .c ;MODULE .c ;^&OUTPUT_NET\& .HL 2OUTPUT_NET .nf .x OUTPUT_NET>Defined Source:[MA_Q.ROUTE]OUTPUT_NET.FOR;10 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:14-AUG-1986 Revision level :1.1 .C ;Formal Parameter List Receives: NRB STRUCTURE/NRBDEF/ NRB THAT OUTPUT IS TO OCCURR FOR NRBID STRUCTURE/NRBID/ MESSAGE ID ENTRY IN THE NRB THAT HAS DATA TO BE OUTPUT Returns: Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON LOCAL COMMON FOR MA_ROUTER Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG ERROR MESSAGES (found in library:INLAND) .X ALC_OUT_BUF>Referenced ALC_OUT_BUF ALLOCATE AN OUTPUT BUFFER .X DEA_OUT_BUF>Referenced DEA_OUT_BUF DEALLOCATE AN OUTPUT BUFFER, IN CASE OF AN ERROR .X GET_OUT_MESG>Referenced GET_OUT_MESG FILLS IN ALLOCATED BUFFER WITH A MESSAGE FROM THE QUEUE ALONG WITH OTHER POOP .SK .fill .SK Description: .sk This subroutine is responsible for getting a message from the queue and sending it out to decnet. The subroutine allocates an output buffer (should be able to since the routine that calls us checked to make sure that one was available). .literal CALLLING SEQUENCE: SYS_STATUS=OUTPUT_NET(NRB,NRBID) .END LITERAL .PAGE .HL 1 [MA_Q.ROUTE]PUT_BACK.FOR;6 .c ;MODULE .c ;^&PUT_BACK\& .HL 2PUT_BACK .nf .x PUT_BACK>Defined Source:[MA_Q.ROUTE]PUT_BACK.FOR;6 Designer :EARL LAKIA Author : Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 04-SEP-86 Revision level :1.1 .C ;Formal Parameter List Receives: MESG_ID CHARACTER*15 MESSAGE ID THAT IS TO BE BACKED UP NRBIDIDX INTEGER*4 NRBID INDEX IN NRB FOR THIS MESSAGE ID NRBID STRUCTURE/NRBID/ ARRAY ARRAY OF NRBIDS NRB STRUCTURE/NRBDEF/ NRB THAT THIS READ COMPLETED ON Returns: Accesses common(s): MA_ROUTER_COMMON USED BY MA_ROUTER, (NEED Q_BLOCK) Accesses file(s): Other modules referenced: .X BACKUP_RNA>Referenced BACKUP_RNA PLACES THE MESSAGE THAT WAS JUST READ BACK ONTO THE TOP OF THE INPUT QUEUE. (found in library:MA_Q$LIB:QUEUE) .X OPR_FAO_MSG>Referenced OPR_FAO_MSG Logs messages to operator console .SK .fill .SK Description: .sk This subroutine is called so that it is easy to call the BACKUP_RNA subroutine. Any errors are reported here, however, there is no real reason exit if this is failes. .sk CALLING SEQUENCE: .SK .literal CALL PUT_BACK(MESG_ID,NRBIDIDX,NRBID,NRB) .END LITERAL .PAGE .HL 1 [MA_Q.ROUTE]READ_MBX_NW.FOR;4 .c ;MODULE .c ;^&READ_MBX_NW\& .HL 2READ_MBX_NW .nf .x READ_MBX_NW>Defined Source:[MA_Q.ROUTE]READ_MBX_NW.FOR;4 TO BECOME PART OF LIBRARY:PRODUCTION Designer :Earl lakia Author :Earl Lakia Date of last update:22-jul-1985 Revision level :1.0 .C ;Formal Parameter List Receives: CHANNEL I*4 LOGICAL CHANNEL ASSIGNED TO MAILBOX TO BE READ MAXBYTE I*4 MAXIMUM NUMBER OF BYTES TO READ Returns: BUFFER BYTE(*) THIS IS THE DATA READ FROM THE SPECIFIED MAILBOX THIS READ PERFORMS A DESTRUCTIVE READ WHICH MEANS THAT AFTER THE DATA IS READ IT IS ERASED FROM THE MAILBOX. YOU MUST READ THE WHOLE BUFFER NOT JUST PARTICULAR FIELDS. THE DATA IS RETURNED TO THE CALLER IN THE PARAMETER BUFFER ICNT I*4 THIS IS THE PARAMETER THAT CONTAINS THE ACTUAL byte count if good status. ERR I*4 Error status from the QIO or the system service call. .SK .fill .SK Description: .sk THIS IS A SUBROUTINE TO READ AND NOT WAIT ON A MAILBOX. THE CALLING PROGRAM MUST PROVIDE THE CHANNEL NUMBER WHICH IS ASSIGNED TO THE MAIL BOX IN WHICH THE READ IS TO BE PERFORMED, THE MAXIMUM BYTE COUNT POSSIBLE (NOTE: DUE TO A BUG IN VMS, THIS MUST BE THE ACTUAL SIZE OF THE MAILBOX), AND A BUFFER TO RETURN THE DATA READ. THIS SUBROUTINE WILL RETURN THE ACTUAL BYTE COUNT UNLESS THERE IS AN ERROR IN WHICH CASE THE ERROR NUMBER IS RETURNED (FROM EITHER THE SYSTEM SERVICE ERROR OR QIO STATUS FROM READ). THE CALLING PROGRAM WILL EITHER RECEIVE THE READ DATA OR RETURN WITH A MAILBOX EMPTY ERROR CODE. .NOFILL .tp 15 Calling Sequence: INTEGER*4 ERR,ICNT CALL READ_MBX_NW(CHANNEL,MAXBYTE,BUFFER,ICNT,ERR) IF(.NOT. ERR) THEN ***** ERROR PROCESSING ***** or no data present ELSE ICNT= BYTE COUNT READ ENDIF .FILL .PAGE .HL 1 [MA_Q.ROUTE]READ_NET_AST.FOR;54 .c ;MODULE .c ;^&READ_NET_AST\& .HL 2READ_NET_AST .nf .x READ_NET_AST>Defined Source:[MA_Q.ROUTE]READ_NET_AST.FOR;54 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 18-FEB-1987 Revision level :2.4 .C ;Formal Parameter List Receives: BUF STRUCTURE/BUFDEF/ I/O STATUS, NRB LINK, AND DATA BUFFER STRUCTURE R0,R1,PC,PSL REGISTERS SAVED REGISTERS FROM AST Returns: Accesses common(s): .X DISCONNECT_NODE DISCONNECT_NODE DISCONNECT A REMOTE LOGICAL LINK .X EVENT_Q>Common EVENT_Q QUEUE NETWORK READ COMPLETE MESSAGE AND POSSIBLE ACKNOWLEGE .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON MA ROUTER COMMON Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG LOG MESSAGES (found in library:INLAND) .X ALC_RESP_BUF>Referenced ALC_RESP_BUF Used to allocate a response buffer .X ACK_LAST_WRITE>Referenced ACK_LAST_WRITE Acknowlege message to queue .X RTR_WRITE_Q>Referenced RTR_WRITE_Q Write a message to the Queue via router .X NET_READ>Referenced NET_READ DO A NETWORK READ .X ACK_READ>Referenced ACK_READ Acknowledge a read message that was successfully transmitted and queued on the remote node. .X CHECK_LNK_SEQ>Referenced CHECK_LNK_SEQ Check link sequence number .X WAKE_RECEIVER>Referenced WAKE_RECEIVER Wake up a receiver process connected to a particular message id. .X BUILD_RESPONSE>Referenced BUILD_RESPONSE Used to build and send the response to the remote node. .X MARK_FULL>Referenced MARK_FULL Marks a message id listhead with the status that the remote node's queue is full .X MARK_NOROUTE>Referenced MARK_NOROUTE Marks a message id listhead with the status that it is not routeable, (remote node does not known of the message id) .SK .fill .SK Description: .sk This subroutine is an AST subroutine called when a NETWORK read QIO completes. The "BUF" parameter was the AST parameter in the QIO and points the a structure containing the I/O Status block, a link to the NRB, and the actual data. The message can be: .list .le;A message that needs to be queued, in which case call the subroutine RTR_WRITE_Q and build an acknowlege message to send back to the sending node. If there is a receiving process connected for this message ID, and the count goes from zero to one, then call WAKE_RECEIVER subroutine. .le;A response to a message that was written earlier by us in which case call the subroutine ACK_READ to acknowlege the read and have the message deleted from the queue. .els The proceedure that should be followed is: .list .le;If the I/O status was bad, call disconnect the node by deassigning the channel. Also verify that the link sequence number received is one greater than the one stored in the NRB. If not, log the error. Set the link sequence number to the value in the message. .le;Attempt to acquire a response buffer. If no buffer can be acquired, then set up a marktime with this routine the AST for that marktime with the same parameters that this AST was called with from the QIO (when the marktime occurrs, we will think that the Read QIO just completed again) and return from this AST. .le;If this is a message to be queued, Add the message to the Queue, depending on the error status from the RTR_WRITE_Q subroutine, send the approiate status back to the sending node. The AST subroutine to service this response QIO is NET_READ_RESP_AST (it will deallocate the response buffer). .le;If the message is an acknowlege of a write, then acknowlege the read from the queue (ACK_READ) if the message is a posstive response, otherwise, back up the RNA pointer if the remote node message id queue is full, and mark the status in the message id list head. if the message is a response showing that the remote node does not know of the message id, then mark the message id as not routeable. .le;Queue another Read I/O for this node. .els .PAGE .HL 1 [MA_Q.ROUTE]REM_NODE_CON.FOR;10 .c ;MODULE .c ;^&REM_NODE_CON\& .HL 2REM_NODE_CON .nf .x REM_NODE_CON>Defined Source:[MA_Q.ROUTE]REM_NODE_CON.FOR;10 Designer :EARL LAKIA Author : Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update: 9-JUL-1986 13:33:06.83 Revision level :1.0 .C ;Formal Parameter List Receives: NRB STRUCTURE NRB OF THE NODE THAT HAS SUCCESSFULLY CONNECTED Returns: Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON COMMON FOR MA_ROUTER Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG LOG ERROR MESSAGES (found in library:INLAND) .X POST_NET_READ>Referenced POST_NET_READ POST A READ ON THE CHANNEL ASSIGNED TO THE REMOTE NODE .X FIND_Q_MESG>Referenced FIND_Q_MESG .X PUSH_EVENT_QUE>Referenced PUSH_EVENT_QUE PUSH A MESSAGE REQUESTING A SEARCH FOR NEW MESSAGES TO BE OUTPUT. .SK .fill .SK Description: .sk This subroutine is called when a node has successfully been logically connected to. This subroutine will: .list .le;Reset the link line sequence number. .le;Mark any message ID's that are serviced by this node that were marked with a undeliverable because the remote node queue was full as now being deliverable. .LE;If there are any read but not acknowleged messages, then have the messages placed back at the front of the queue. .le;Mark the node as available. .le;Post a read on the remote node. .els .nofill .sk 2 CALLING SEQUENCE CALL REM_NODE_CON(NRB) .PAGE .HL 1 [MA_Q.ROUTE]RTIN.FOR;30 .c ;MODULE .c ;^&RTIN\& .HL 2RTIN .nf .x RTIN>Defined Source:[MA_Q.ROUTE]RTIN.FOR;30 Designer :EARL LAKIA Author : Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:22-JUL-86 Revision level :1.1 .C ;Formal Parameter List Receives: Returns: Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: THIS IS A TEST PROGRAM WHICH TRIES TO MAKE A CONNECTION THE MA _ROUTER. IT THEN WRITES A MESSAGE PROMPTED BY USER AND GETS THE RESPONSE FROM THE ROUTER. IT KINDA WORKS LIKE A ROUTER IN WHICH MESSAGES ARE BEING SEND TO THE ROUTER ONLY. THIS PROGRAM IS RUN WITH A SIMPLE DCL "RUN" COMMAND. .sk .PAGE .HL 1 [MA_Q.ROUTE]RTOUT.FOR;55 .c ;MODULE .c ;^&RTOUT\& .HL 2RTOUT .nf .x RTOUT>Defined Source:[MA_Q.ROUTE]RTOUT.FOR;55 Designer :EARL LAKIA Author : Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:25-AUG-1986 12:49:19.71 Revision level :1.0 .C ;Formal Parameter List Receives: Returns: Accesses common(s): Accesses file(s): Other modules referenced: .SK .fill .SK Description: .sk This is a simple program that is used to communicate with the MA_ROUTER process. It basically, defines itself to DECNET as a known object and is used to test messages from the MA_ROUTER process to us (IE: we are a fake remote MA_ROUTER). This program will need SYSNAM privelege to define itself to DECNET. .PAGE .HL 1 [MA_Q.ROUTE]WRITE_NET_AST.FOR;14 .c ;MODULE .c ;^&WRITE_NET_AST\& .HL 2WRITE_NET_AST .nf .x WRITE_NET_AST>Defined Source:[MA_Q.ROUTE]WRITE_NET_AST.FOR;14 Designer :EARL LAKIA Author :EARL LAKIA Copy Right: Inland Steel Process Automation Department 3210 Watling St. MS 2-465 East Chicago, IN 46312 Date of last update:02-SEP-86 Revision level :1.1 .C ;Formal Parameter List Receives: ASTPRM STRUCTURE/BUFDEF/ Buffer structure that has pointers to the NRB, I/O status block, ect. R0 REGISTER SAVED R0 FROM AST R1 REGISTER SAVED R1 FROM AST PC REGISTER SAVED PC FROM AST PSL REGISTER SAVED PSL FROM AST Returns: Accesses common(s): .X MA_ROUTER_COMMON>Common MA_ROUTER_COMMON ROUTER COMMON Accesses file(s): Other modules referenced: .X OPR_FAO_MSG>Referenced OPR_FAO_MSG LOG MESSAGES (found in library:INLAND) .X DEA_OUT_BUF>Referenced DEA_OUT_BUF DEALLOCATE AN OUTPUT BUFFER .X MARK_RESP_PEND>Referenced MARK_RESP_PEND USED TO CLEAR I/O PENDING AND SET RESPONSE PENDING FOR THIS MESSAGE ID. .x PUT_BACK>Referenced PUT_BACK PUT READ BUT NOT ACKNOWLEGED MESSAGE BACK ON QUUE .X AT_ADD>Referenced AT_ADD Used to get a value with the NRBID .SK .fill .SK Description: .sk This subroutine is called becuase a write QIO has completed. The remote node router however has not acknowleged the message. However, we can deallocate the buffer. If the remote router fails to get the message (disconnects) or remote node queue full, then either the read ast for that node or the disconnect error must replace the read but not acknowleged message back into the queue. The subroutine is responsible for the following: .list .le;Clear the I/O pending bit in the Message ID list head .le;Set the response pending bit in the Message ID list head .le;Deallocate the buffer .le;Set wakeup for the mainline such that this buffer may be used by someone else. .els The calling sequence is: .LITERAL WRITE_NET_AST(ASTPRM,R0,R1,PC,PSL) .END LITERAL Where: ASTPRM is the buffer structure that has the I/O status block and pointer to the NRB, etc. .PAGE .! .! POST FILE FOR THE DOCUMENT, PUTS A TRAILING PAGE BEFORE THE .! INDEX .! .SEND TOC .PAGE .page .BR