Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: INHUVUT3

INHUVUT3.m

Go to the documentation of this file.
  1. INHUVUT3 ; KAC ; 06 Aug 1999 14:41; Generic TCP/IP socket utilities (continued)
  1. ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
  1. ;COPYRIGHT 1991-2000 SAIC
  1. Q
  1. ;
  1. ;
  1. NEXT(INDEST,INPRI,INHOR,INPEND) ;Return next transaction in the destination que.
  1. ; Used for single and multiple transceiver execution off of a single
  1. ; destination que.
  1. ;
  1. ; Called by: INHVTAPT,INHVTMT,INHVMTR
  1. ;
  1. ;Input:
  1. ; INDEST - (req) INTERFACE DESTINATION IEN
  1. ; INPRI - (pbr) Priority (0-10 to single decimal place e.g. 1.5)
  1. ; INHOR - (pbr) Time to process ($H format)
  1. ; INPEND - (opt) # of msgs in "pending response" que. Req'd for
  1. ; multi-threaded transceivers (INMLTHRD=1))
  1. ; INMLTHRD - (opt) flag - 1 = multi-threaded transceiver (INHVTMT)
  1. ; 0 = (default) single-threaded transceiver
  1. ; INBPN - (req) BACKGROUND PROCESS CONTROL IEN
  1. ;
  1. ;Output:
  1. ; UIF IEN or null if no entry on destination queue
  1. ;
  1. N INUIF,INOK,INDT,INTM,INMSG
  1. S (INPRI,INHOR,INUIF)="",INOK=0,INDT=$H,INTM=$P(INDT,",",2),INDT=$P(INDT,",")
  1. F S INPRI=$O(^INLHDEST(INDEST,INPRI)) Q:(+INPRI'=INPRI) D Q:INOK
  1. . S INHOR=""
  1. . F S INHOR=$O(^INLHDEST(INDEST,INPRI,INHOR)) Q:(INHOR="") D Q:INOK
  1. .. I (INHOR<INDT)!((+INHOR=INDT)&($P(INHOR,",",2)'>INTM)) D
  1. ... S INUIF=""
  1. ... F S INUIF=$O(^INLHDEST(INDEST,INPRI,INHOR,INUIF)) Q:'INUIF D Q:INOK
  1. .... L +^INLHDEST(INDEST,INPRI,INHOR,INUIF):0 I D
  1. ..... I '$D(^INTHU(INUIF)) D Q
  1. ......; If entry no longer exists in INTHU, log error & get next UIF
  1. ...... S INMSG="Missing entry "_INUIF_" in INTHU"
  1. ...... K ^INLHDEST(INDEST,INPRI,INHOR,INUIF)
  1. ...... D ENT^INHE(INUIF,INDEST,INMSG,INBPN)
  1. ...... D:$G(INDEBUG) LOG^INHVCRA1(INMSG,4)
  1. ...... L -^INLHDEST(INDEST,INPRI,INHOR,INUIF)
  1. ..... I '$G(INMLTHRD) S INOK=1 Q ; NOT multi-threaded xceivers
  1. ..... S:$$PUTPEND^INHVTMT4(INDEST,INUIF,.INSEQNUM,.INPEND) INOK=1
  1. ..... L -^INLHDEST(INDEST,INPRI,INHOR,INUIF)
  1. ;
  1. Q:(INPRI="")!(INHOR="")!(INUIF="")!('INOK) ""
  1. Q INUIF
  1. ;
  1. ;