gslist(house.i2.r, module_type.i2.r, num_stancs.i2.r, gas_ftd.i2.r,
stancs.i2a.r, volbuf.i2a.r, event_flag.i2.r, status.i2.r
This routine sets up a list of STANCs for periodic or one-shot list
reads from a GAS-speaking module.
house house code
module_type module type
num_stancs number of STANCs in list
gas_ftd period between readings (in 15 Hz ticks)
(0 -> One-shot read)
stancs array of STANCs (8 bytes each) ("num_stancs" entries)
volbuf returned data buffer (must be int enough to hold a
5 word header plus the data returned by your list)
The buffer is laid out (in words) as follows:
VOLBUF(1) "Verification" word (11394 decimal)
VOLBUF(2) ACNET Request I.D.
VOLBUF(3) Sequence number (incremented every
time a fresh batch of data appears)
VOLBUF(4) Low byte : Control flags
High byte : Error facility code
VOLBUF(5) Status word
VOLBUF(6...) Your data returned from GAS speaking
module. The first word is module's error
event_flag event flag
status returned ACNET standard status value
[node] front end logical node number (default is TEV)
The way to use this routine is:
1) Set up arguments.
2) Get an event flag from 'LIB_GET_EF'. You do not have
to clear this event flag.
3) Call 'gslist'. The list setup process will be initiated.
4) Possibly do other stuff.
5) Wait for the event flag with 'SYS_WAITFR'.
6) Check "status". Zero = O.K.
(at this point your list is set up and your first batch
of data has arrived from the front end)
7a) If you are doing a one-shot read, your data is available.
Either extract it from "volbuf" directly or use GSGET.
7b) If you are doing a periodic read, your first batch of
data is available. Extract it with GSGET. Use GSGET,
GSGETW, or GSCHEK to tell you when your next batch
*** NOTES ***
When ready to check the success of the list setup, issue a
CALL WAITFR( EFLG ) and check STAT for success. Only one GSREAD,
GSSET, or GSLIST setup is serviced at a time, a reply or reply error
receipt allows another GSREAD, GSSET, or GSLIST setup to proceed.
You ALWAYS WAIT FOR THE EVENT FLAG before checking "status". The
sequence is first wait for event flag, then (and only then) check
status. The timeouts are 15 to 20 seconds.
THE EVENT FLAG WILL ALWAYS BE SET, even if a network message
gets lost, because we use time-outs around all network calls.
IF THE STATUS IS ZERO (i.e. O.K.) THEN YOUR FIRST BATCH OF RETURN DATA
IS READY AND WAITING. In particular, your first batch is known to be
A.O.K. so no further checking is required except for SUBSEQUENT batchs
of PERIODIC lists.
This function requires the following include files:
clib_h, nodedefs_h, acnet_errors_h
gslend, gsget, gsgetw, gschk, gsset, gsread, gstanc, gsmod, gsboot,