Expand Management Programming Manual
COMMANDS AND RESPONSES
Examples of Commands and Responses
EXAMPLES OF COMMANDS AND RESPONSES
The following example program, written in TAL, illustrates the
basic tasks that must be performed in an application that sends
commands to and retrieves responses from the EXPAND subsystem.
These basic steps are the following:
• Opening SCP
• Building the command buffer
• Sending the command
• Retrieving the response
• Closing SCP
! ***************************************************************
! * Sample program to demonstrate giving commands and *
! * receiving responses. *
! ***************************************************************
?symbols, inspect
?nocode, nomap, nolmap
! The SPI standard definitions
?nolist, source $system.zspidef.zspital
?list
! The data-communications standard definitions
?nolist, source $system.zspidef.zcomtal
?list
! The EXPAND subsystem standard definitions
?nolist,source $system.zspidef.zexptal
?list
! Global declarations
INT scp^file^num, ! scp file number
.tkn^value[0:(zexp^val^buflen/2)-1], ! a token value
address[0:1], ! line address
char^set, ! character set of line
frame^size, ! frame size of line
syncs; ! syncs value of line
INT(32) line^speed; ! line speed of line
STRUCT .exp^buf(zexp^ddl^msg^buffer^maxlen^def),
! request/reply buffer
.zexp^val^ssid(zexp^val^ssid^def); ! subsystem ID
7-125