Distributed Systems Network Management (DSNM) Subsystem Interface Development Guide

_OPEN^CI
A-82
109759Distributed Systems Network Management (DSNM) Subsystem Interface
Development Guide
DSNM Library Services
To communicate with a server CI, you must allocate a message buffer large enough
to hold the larger of the message and its response. This buffer must be in the
command context space or in an allocated list member. It cannot be in globals or
procedure locals. If more than one operation is to be outstanding (whether on the
same or on separate CIs), you should also supply an INT(32) tag for the operation,
usually a pointer to some identifying data.
After initiating a request for CI communication, the thread must return to the frame
to wait for its completion with a RETURN _RC^WAIT. When the communication
is complete, the frame dispatches the thread with the event _EV^IODONE.
If multiple _SEND^CIs are outstanding concurrently, they are completed one at a
time and dispatched with _EV^IODONE. Threads must return to the frame with
_RC^WAIT to obtain completions of subsequent operations.
Example
The following example opens a CI:
< 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
_CI^ID (current^ci);
INT cibuf[0:7];
END;
INT .EXT scp (_CI^DEF);
INT .EXT snaxcdf (_SUBSYS^DEF);
STRING .scpclass[0:ZDSN^MAX^CICLASS-1] := [“SCP ”];
STRING .cdf[0:ZDSN^MAX^SUBSYS-1] := [“SNAXCDF ”];
< within _STARTUP procedure >
.
IF _ISNULL (@scp := _ADD^CI (scpclass)) THEN
RETURN ZDSN^ERR^INTERNAL^ERR;
IF _ISNULL (@snaxcdf := _ADD^SUBSYS (cdf)) THEN
RETURN ZDSN^ERR^INTERNAL^ERR;
.
.
< within command thread >
.