Expand Management Programming Manual
COMMANDS AND RESPONSES
Examples of Commands and Responses
! ***************************************************************
! * info^line^hdlc *
! ***************************************************************
PROC info^line^hdlc(obj^name);
INT .obj^name; ! object name of line whose
! attribute values are to be returned
BEGIN
INT spi^err, ! returned by call on SPI procedure
return^token; ! value of return token
INT .zexp^map^info^line^hdlc^resp
[0:zexp^map^info^line^hdlc^wln-1] :=
zexp^map^info^line^hdlc;
INT .info^line^hdlc^value(zexp^ddl^info^line^hdlc^def);
! Initialize the command buffer
CALL build^cmd(zcom^cmd^info, zcom^obj^line);
! Put the object-name token in the buffer
spi^err := SSPUTTKN(exp^buf, zcom^tkn^objname, obj^name);
IF spi^err THEN
CALL handle^spi^error(spi^err); ! error on the call
return^token := call^scp;
IF return^token <> zcom^err^ok THEN ! an error occurred
BEGIN
! Handle the possible errors for the INFO LINE
! command and exit this procedure
RETURN;
END;
! get the value of the extensible structured token
! zexp^map^info^line^hdlc
spi^err := SSGET(exp^buf, zexp^map^info^line^hdlc^resp,
tkn^value, 1);
IF spi^err THEN
CALL handle^spi^error(spi^err); ! error on the call
! save some of the information
@info^line^hdlc^value := @tkn^value;
address[0] := info^line^hdlc^value.zaddr.z^int[0];
address[1] := info^line^hdlc^value.zaddr.z^int[1];
char^set := info^line^hdlc^value.zcharset;
frame^size := info^line^hdlc^value.zframe^size;
syncs := info^line^hdlc^value.zsyncs;
line^speed := info^line^hdlc^value.zspeed;
END; ! of info^line^hdlc
7-133