User guide

6: ICP Software
DC 900-1338I 95
6.1.2 Protocol Task
This section explains the buffer management method for writing to or reading from the
ICPs host. The eXecutive Input/Output (XIO) interface is a collection of function calls
that are executed in the context of the users application tasks. XIO uses queues that are
declared by the utility task.
XIO consists of simple function calls. Section 7.4 on page 135 gives details of XIO.
During its initialization, the protocol task creates queues for each link, which relate to
the stages and direction of data flow as follows:
After initialization completes, the protocol task operates in a loop. Within the loop, it
makes a series of subroutine calls for each link. In the
chkhio subroutine, the protocol
task checks for messages from the ICPs host that have been routed to the individual
queues by the utility task; these messages are then processed according to command
type. For a transmit data block command, the message is not processed immediately,
but is transferred to the links board-to-link queue, where it is later processed in the
chkloq subroutine.
In the
chkloq subroutine, which is called only for active links, the protocol task sends
data buffers associated with completed transmit messages back to the application pro-
gram as write acknowledgments and checks the board-to-link queue for transmissions
that are ready to be started.
In the
chkliq subroutine, also called only for active links, the protocol task checks the
link-to-board queue for buffers that have been filled with received data at the interrupt
Board-to-Server Queue Link-to-Board Queue
Server ICP Serial
Line
Server-to-Board Queue Board-to-Link Queue