| United States-English |
|
|
|
![]() |
ACC Programmer's Reference Guide > Chapter 1 ZCOM SubsystemZCOM Concepts |
|
Throughout this manual, references are made to terminal ZLU or just terminal. This does not mean a physical terminal device type but is a generic term that can refer to any kind of physical or logical entity. Examples of physical entities are printers, an HDLC link, terminals, etc. Examples of logical entities might be an X.25 Permanent or Switched Virtual Circuit. In the ZCOM Subsystem, messages are sent directly from sender to receiver (where the receiver is another program or a terminal ZLU). They are routed using a pointer called a ‘ZLU’ which stands for ‘ZCOM Logical Unit’. ZCOM uses the ZLU for its addressing mechanism. A ZLU may represent a terminal (for instance, an X.25 virtual circuit) or an application program. Messages are sent to and received by ZLUs. Figure 1-3 “Definition and Features of ZLUs” shows a sample set of program and terminal ZLUs, and their interaction with each other and a Mux card: To communicate to another program or to a terminal, a program uses ZCOM library calls to write to a program or terminal ZLU. Each program ZLU points to a queue that contains all messages, including timeout and status messages, that were delivered to the program ZLU. These pointers are maintained automatically by the ZCOM Subsystem. When a message is sent to a ZLU, the data is moved to a system buffer first and the address of the message is moved to the attached input queue. Each program may open one or more program ZLUs which provides an input message queue to that program. Think of a program’s input message queue as a mailbox where messages can be delivered. All messages delivered are queued at the end of the input queue for a program in the order in which they were received. Note that the message is not actually delivered to the program, but simply placed into the input queue. The program must issue a ZCOM library call to retrieve the messages one-by-one from the input queue. The method used to cause a message to be placed into a program’s input queue will be different depending on whether the message was created by another program or a physical/logical device. If a message is sent (generated) by another program, then the sending program must specify the ZLU of the program’s input queue to place the message into. The receiving program need not do anything for the message to be successfully delivered to their mail box (program input queue). However, when a message is generated by a terminal ZLU, any program that wishes to receive messages from that device (terminal ZLU) must inform the ZCOM Subsystem first. The program should issue a ZCOM call (zset_rcvr) to tell the ZCOM Subsystem that all data coming from the specified terminal ZLU should be delivered to its input queue. Whenever data arrives from the device, it will be placed into the input queues of all programs that have requested this data. Terminal ZLUs represent a physical or logical device and do not have input queues of their own. Any data coming from a terminal ZLU will be delivered to the input queues of all applications that have requested it. If there is no application interested in receiving the data, then the data is thrown away and a message is logged to that effect. Terminal ZLUs do however have three different output (transmit) queues. When a program sends data to a terminal ZLU, it can select one of three queues to place that data on. Each queue represents a different level of priority. The Express Queue is used for extremely high-priority protocol dependent requests. The High-Priority Queue is used for high priority data and the Low-Priority Queue is used for low priority data. When a message is generated by an application, the buffers involved are queued to the selected transmit queue and the ZCOM driver is notified. The driver is then responsible for handling the message. Messages on the express queue are sent before those on the high priority queue which are sent before those on the low priority queue. Because the ZCOM Subsystem itself takes responsibility for the delivery of messages, the sending program is able to specify a number of options when it passes the message to the system. These options include:
On completion, the message buffer may also be passed back to the sending application program if required. Each message on the ZLU has a ‘type’ attribute so that the program reading the ZLU is able to differentiate between status messages, timeout messages and data messages from terminals or other programs. |
||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||