Selecting A Block Of Code As Application Command Parser; Control Flow Models; Character I/O Available To Application Command Parser - Racal Instruments 7064 Instruction Manual

Table of Contents

Advertisement

4.6.1 S e l e c t i n g a Block of Code as the Application Command Parser
As mentioned previously, i t i s possible f o r the user t o load a n application-specific
command parser. T h i s is accomplished using the " D O W N L O A D " command described
above. T h e "SETPARSER" command informs the Message-Based Interface a block o f
code is to be run as the application parser. T h e "SETPARSER" operation is available
both as a Message-Based Interface command and as a callable system service. The syntax
of the SETPARSER command is:
where <address> is the location into which the parser has been loaded.
The function prototype for the system service is:
extern void setparser(const unsigned long address);
4.6.2 C o n t r o l Flow Models
As previously described, the application parser is called in two ways:
1. W h i l e waiting for input, rather than "busy wait" on an empty input queue while
the machine i s i d l e , t h e Message Based Interface w i l l repeatedly c a l l t h e
application parser.
2.
As explicitly directed. T h e user m a y explicitly command the Message-Based
Interface to redirect the subsequent input stream to the application-specific parser
(The exact details of this operation are described in the section on Message-Based
Interface command syntax).
4.6.3 C h a r a c t e r I/O Available to the Application Command Parser
The "Raw" input is available to the application parser in a secondary input queue.
more data is available in the secondary input queue.
To avoid system deadlock, the application parser should never do a "busy wait" on
an e m p t y q u e u e . I t s h o u l d r e t u r n t o t h e c a l l i n g f u n c t i o n . I t w i l l be c a l l e d a g a i n as
soon as more data is available in the secondary i n p u t queue.
SETPARSER ( <address> )
NOTE
4-19

Advertisement

Table of Contents
loading

Related Products for Racal Instruments 7064

Table of Contents