Structured System variables -- ^$DEVICE

^$D[EVICE]

Introduced in the 1995 ANSI M[UMPS] language standard.

This structured system variable provides information about the devices that are currently known to the M[UMPS] system. Such 'knowledge' may be limited to those devices that are currently OPEN for a M[UMPS] process (definition in the standard), but many implementations also are capable of providing information that is available from the host operating system.

WRITE !,"Currently known devices:"
SET D="" FOR  SET D=$ORDER(^$DEVICE(D)) QUIT:D=""  DO
. WRITE !,D
. SET C=$GET(^$DEVICE(D,"CHARACTER"))
. IF C'="" WRITE ?30,"character set is """,C,"""."
. QUIT

Additions in a future ANSI M[UMPS] language standard.

SET MNEMO=^$DEVICE(device,"MNEMONICSPACE")
WRITE !,"Current mnemonicspace is ",MNEMO

SET SP="MNEMONICSPEC"
WRITE !,"Device ",device," currently supports:"
SET M="" FOR  SET M=$ORDER(^$DEVICE(device,SP,M)) QUIT:LIST=""  DO
. WRITE !?5,"Mnemonicspace ",M
. QUIT

Output time-out values are accessible through ^$DEVICE.

WRITE !,"Device",?12,"Time Out",?25,"Currently Stalled"
SET D="" FOR  SET D=$ORDER(^$DEVICE(D)) QUIT:D=""  DO
. SET T=$GET(^$DEVICE(D,"OUTTIMEOUT"))
. SET S=$GET(^$DEVICE(D,"OUTSTALLED"))
. WRITE !,D,?12,$JUSTIFY(T,5),?25,$SELECT(S:"Yes",1:"No")
. QUIT

Note: The nodes with subscripts "OUTTIMEOUT" and "OUTSTALLED" will only be defined if a process has established an output time-out value for the device in question.

The addition of a binding to TCP/IP socket devices includes a new deviceparameter.

The values of some of these parameters are accessible through ^$D[EVICE]:

^$D[EVICE](device,"ATTACH")=value
provides an implementation-specific value that identifies a specific socket that may currently be used.

^$D[EVICE](device,"CONNECT")=value
provides an implementation-specific value that contains information about the current connection.

^$D[EVICE](device,"DELIMITER")=value
provides the list of I/O delimiters that may occur.

^$D[EVICE](device,"DETACH")=value
provides an implementation-specific value that identifies a specific socket that is currently being disconnected.

^$D[EVICE](device,"IOERROR")=value
provides an identification of the I/O error trapping mode that is currently being used (currently, only "TRAP" and "NOTRAP" are standardized values; values beginning with "Z" may also occur).

^$D[EVICE](device,"LISTEN")=value
provides implementation-specific information about the protocol being used for the current connection.

^$D[EVICE](device,"SOCKET")=index
provides the index number of the socket that is currently being used.

^$D[EVICE](device,"SOCKET",index,"DELIMITER")=number
provides the number of I/O delimiters stored in ^$D[EVICE].

^$D[EVICE](device,"SOCKET",index,"DELIMITER",n)=delimiter
provides the nth I/O delimiter string.

^$D[EVICE](device,"SOCKET",index,"IOERROR")=value
provides the I/O error trapping mode.

^$D[EVICE](device,"SOCKET",index,"LOCALADDRESS")=value
provides the local network node address of the connection.

^$D[EVICE](device,"SOCKET",index,"PROTOCOL")=value
provides the network protocol that is being used for the connection.

^$D[EVICE](device,"SOCKET",index,"REMOTEADDRESS")=value
provides the remote network address of the connection.

^$D[EVICE](device,"SOCKET",index,"SOCKETHANDLE")=value
provides an implementation-specific string that identifies the socket that is accessed through the current index number.

For examples, see the USE command.


This document is © Ed de Moel, 1995-2005.
It is part of a book by Ed de Moel that is published under the title "M[UMPS] by Example" (ISBN 0-918118-42-5).
Printed copies of the book are no longer available.

This document describes the various special (system) variables that are defined in the M[UMPS] language standard (ANSI X11.1, ISO 11756).

The information in this document is NOT authoritative and subject to be modified at any moment.
Please consult the appropriate (draft) language standard for an authoritative definition.

In this document, information is included that will appear in future standards.
The MDC cannot guarantee that these 'next' standards will indeed appear.