Distributed Systems Network Management (DSNM) Subsystem Interface Development Guide
_SEND^CI
A-110
109759—Distributed Systems Network Management (DSNM) Subsystem Interface
Development Guide
DSNM Library Services
Example
In the following example, the command thread initiates a _SEND^CI request and returns
to the frame to wait for an I/O completion event:
< within user globals area >
STRUCT context^def (*);
BEGIN ! Command thread context definition
_COMMAND^CONTEXT^HEADER;
INT .EXT input^lm (input^lm^def); ! Current input list
! member
INT .EXT output^lm (out^lm^def); ! Current output list
! member
_LIST (worklist);
_CI^ID (current^ci);
INT cibuf[0:<buffer word length>)];
END;
< within command thread >
INT .EXT cx (context^def) = _THREAD^CONTEXT^ADDRESS;
INT .EXT currentobj (input^lm^def);
INT error, cmd^len;
LITERAL max^cmd = ..., max^reply = ...;
IF _ISNULL (@currentobj := _FIRST^LM(cx._INPUT.OBJECTLIST))
THEN ... < empty list > ;
IF (error := _OPEN^CI (ci^config, cx.current^ci,
cx.input^lm.FOBJ.Z^MANAGER);
THEN ... < open error > ;
.
< Allocate buffer for _SEND^CI >
IF _ISNULL (@cx.cibuf := _PUT^LM (cx.worklist,,
$MAX(max^cmd,max^reply)))
THEN ... < memory error > ;
.
< Construct buffer to execute command when sent to CI >
.
IF (error := _SEND^CI (cx.current^ci, cx.cibuf, cmd^len,
max^reply,0));
THEN ... < send error > ;
RETURN _RC^WAIT; ! Wait for EV^IODONE