ZCOM Message Handling

 

Message Queuing

 

Queues for terminal ZLUs are located in the physical terminal tables in

 

the ZCOM memory area as shown in Figure 2-2.The physical terminal

 

tables (one per terminal) maintain four queues for each terminal.

Figure 2-2

Physical Terminal Table

 

 

 

 

 

 

Physical Terminal Table

 

 

 

 

 

 

 

 

 

 

 

Express Queue

 

 

 

 

 

 

 

High Priority Queue

 

 

 

 

 

 

 

Low Priority Queue

 

 

 

 

 

 

 

Unacknowledged Queue

 

 

 

 

 

 

 

 

 

 

The driver reads messages first from the express queue until there are

 

no remaining express queue messages, then from the high priority queue

 

until there are no high priority messages, at which stage the low priority

 

queue is read. Any further additions to the higher priority queues will be

 

read before the driver continues with the lower priority queues. When

 

the interface card is ready to accept messages, the driver moves the

 

message to the unacknowledged queue and transfers the message to the

 

interface card (through the unacknowledged queue). Both the interface

 

card and the driver use DMA (Direct Memory Access) hardware to

 

transfer the messages. If the number of buffers on the unacknowledged

 

queue is less than the limit specified to TTGEN, more messages will be

 

transferred, otherwise the transfer will be suspended until some

 

outstanding messages are acknowledged.

 

Once the interface card has transmitted the message and has responded

 

with a definite status, the driver passes the status (if requested to do so)

 

back to the calling program. If the calling program also requires the

 

message buffer to be sent back with the status response, it is picked up

 

from the unacknowledged queue. Once the driver has passed the

 

message to the program, the message is removed from the

 

unacknowledged queue.

 

Messages in the unacknowledged queues for each terminal are also used

 

in a Mux restart: the messages are moved back to the high priority queue

 

to be resent. The size of the unacknowledged queue is configurable in the

 

TTGEN configuration file.

28

Chapter 2