gtpn1m0uNon-SNA Data Communications Reference

Link Controller

The link controller consists of the following routines:

General System Description

Procedures

Data Procedure
The channel is functioning normally and data blocks are being exchanged. The line time-out routine is monitoring the time since the last data block was received or transmitted to detect if the Receive or Send Idle Line Procedure should be initiated.

Idle Line Procedure

Receive Idle
If no data has been received over a certain time, then Idle Line LCBs (ILB or ACK) are transmitted over the line. If responses are not received, then the line is suspect and the Enquiry Procedure is initiated. During the receive idle procedure, data blocks may still be transmitted.

Send Idle
The system also monitors for Send Idle, that is, no data blocks transmitted for at least T1 seconds. Should this occur, and there are outstanding unacknowledged blocks, and the bilateral agreement allows the exchange of ILB (rather than ACK) idle line link control blocks, then the Idle Line Procedure is initiated and ILBs transmitted with the sole function of eliciting from the remote center a response containing the TSI of their last correctly received block. Without the Send Idle procedure, if the remote center sends ACK only every p blocks and there are no blocks to send, we may be required to maintain references to messages sent until some time later when the remote center has accumulated p blocks.

NAK Procedure
This procedure is initiated when an invalid data message is received. The NAK is repeated a number of times at set intervals and if the error has not been corrected, then the enquiry procedure is initiated. A discard until switch in the channel keypoint is turned on, that causes input message handler to discard data message blocks until it correctly receives a block with correct TSI sequence.

Enquiry Procedure
This procedure is initiated when the status of a channel is unknown or suspect. It implies that there is (or was) a fault in transmit, receive, or both directions. ENQs are transmitted and should no response occur within a certain time period, after a fixed number of repetitions, the channel is declared out-of-service and the enquiry procedure continues. If a response is received then the status of the channel is known again and transmission can proceed normally (unless the response was a STP). Entry to the ENQ procedure is normally caused by transient line errors (repeated hardware errors will, of course, cause the line to be invalidated thus preventing any I/O operations). Out-of-service means a condition less serious than invalidation and does not involve operator intervention. The receipt of STP ALL will also cause the enquiry procedure to be initiated for all channels of the link. Since the STP ALL contains no ATSI information this is done to elicit individual responses (presumably STP) on each channel containing ATSs appropriate to each channel.

CCP Linkage Routine (CMCK)

This routine is activated by the CCP using the control transfer mechanism (which is an implied ENTNC) when it requires to activate functions of the link controller, for example, an LCB or time-out pseudo LCB is added to the input LCB queue and link controller is inactive). It activates such functions using ENTRC and on return issues an EXITC.

Input LCB And Time-Out Block Receiver (CMC0)

This routine handles the system queue of input LCBs and time-out blocks. It determines the link and channel of the incoming item and then passes control to the input LCB or time-out handler.

Common Routines (CMC1)

Link and Channel Base Address Calculator

This routine is entered by many programs to calculate the address of the appropriate link and channel keypoint records for a given line.

Good/Bad Block Handler

When a data message block is correctly received an entry is made by input message handler. The output LCB generator is entered to generate the appropriate acknowledgment ACK). An entry is also made by input message handler for NAK to be sent, if a block with bad parity or out-of-sequence TSI is received.

Line Out-of-Service Routine (LOS)

This is entered when a line is declared out-of-service to set indicators and send an alarm message.

Link Alarm Routine

This routine sets up the necessary conditions required to send an alarm message through the alarm/message generator to a specified terminal. See Alarm/Message Generator for more information.

Input LCB Handlers (CMC2, CMCW, CMCX, CMCY, CMCZ)

As each LCB is processed, the status of the link and channel is checked and any appropriate changes to the keypoints and responses are made.

ACK Handler

An ACK received implies that the remote processor has accepted responsibility for one or more data blocks we have sent and we no longer have to keep any reference to these blocks. Single block message references are dropped as soon as the ACK is received. For multi-block messages, the reference is held until all the blocks of the message have been acknowledged if no AML agreement exists or until an AML is received.

NAK Handler

Reception of a NAK implies (a) that all blocks transmitted up to the NAK ATSI have been correctly received and (b) all blocks transmitted after have been rejected. Action is taken as described in ACK Handler for all blocks correctly received. For those blocks not acknowledged parameters are generated indicating which need to be retransmitted and control is then passed to output message handler that will handle the regeneration and requeuing of the rejected blocks.

AML Handler

After a multi-block message has been transmitted and all of its constituent blocks acknowledged an AML may be expected to indicate that the message label (MBI) may be reused and the message reference dropped.

ENQ Handler

Reception of an ENQ means that the remote processor is unsure of the state of the channel. The ATSI of the ENQ provides both an implied ACK (n) and an implied NAK (n+). After the ATSI has been acted upon the appropriate response is made depending upon the state of the link. A STP (and possibly an ACK) is returned on the same channel if we are cycling down or, due to a high input list condition, wish the remote processor to stop sending data. A RSM (and possibly an ACK) is returned in the case where the channel had been stopped and resumed by us but no data has yet been received. Otherwise a RSM or ACK is returned to indicate that our system is prepared to continue receiving data.

RSM Handler

Reception of a RSM indicates that the channel is serviceable. If a STP had previously been received or if the channel had been declared out-of-service, then it is restarted automatically. If the RSM is not in response to an ENQ, then it is treated as simply an implied ACK. If it was a response to an ENQ then it is also an implied NAK.

STP Handler

A STP indicates the status of a channel and invokes both implied ACK and implied NAK. Since no more messages are to be sent down the affected channel, any blocks on the channel queue are added to the link queue. If STP ALL is received, since it contains no ATSI the enquiry procedure is initiated to elicit individual STPs for each channel.

ILB Handler

ILBs are used to maintain circuit continuity in no data conditions. The ATSI of the ILB is treated as an implied ACK and the appropriate response is generated as described under ENQ Handler.

Time-Out Handlers

Every second CLQM interrogates the link and channel keypoints to see if a Time Out or TSI exhaustion situation has occurred. If so, a pseudo LCB is added to the Input LCB queue and subsequently passed by the input LCB and time-out block receiver to the time-out block receiver to the time-out handler for processing. The action taken depends on the procedure-in-progress as defined in the channel keypoint. When a fixed number of ENQs have timed out, the line is declared out-of-service and ENQs are repeated regularly until a response is received. In addition at each alternate ENQ a STP for that channel is sent down any other functioning channel. An ILB time out or a fixed number of NAK time outs means a possible impairment of the channel and the enquiry procedure is initiated. A data Time Out means that the line is idle and the idle procedure is initiated. The time-out handler also processes TSI exhaustion (a link defined of blocks have been transmitted without an ACK or implied ACK being received) which causes the enquiry procedure to be initiated. It also processes AML time outs, that is, all blocks of a multi-block message have ACK'd, but no AML has been received. The message is retransmitted in its entirety up to N3 times with the current message label and then retransmitted as an original message with a new message label. This process continues until an AML is received. When no N3 agreement exists on the link, an AML is simulated in order to activate the appropriate action.

Output LCB Generator (CMC4)

This is a set of routines to generate any LCBs required. The created LCBs are then passed to the CCP output routines and placed on an output queue using the PLONC macro. Those LCBs (for example, STP ALL) which may be transmitted over any channel of a link are placed on the link queue whereas those that are channel dependent (for example, ACK) are placed on the appropriate channel queue. CCP Output Initiate will transmit channel-queued LCBs on the appropriate channel and link-queued LCBs on the first available channel.

Stop/Invalidate Lines/Links (CMC5)

This segment, which contains transfer vectors CMC6, CMC7 and CMC8, consists of routines to stop the exchange of information on any or all the lines of a link, for any or all links, and is activated as a result of commands or by the CCP in the case of line hardware errors. This involves the transmission of STP and possibly ENQ LCBs in order to determine the status of message blocks already exchanged, the possible retransmission of message blocks down other functioning channels and in the case of stopping or invalidating the last functioning channel of a link, that is, link cycle down, the filing of all single block messages on the type B output message queues and the clearing of all output queues. Since type B single block messages have no reference by which they may be retrieved when the link is cycled up they are chained together and the address of the chain saved in the link keypoint before filing it.

Start Lines/Links (CMCA)

This handles not only the starting of a line (which is effected simply by transmitting an ENQ and allowing the response to be handled in a normal manner) but also the starting of a link in three different conditions:

  1. Link Cycled Down

    This is a normal situation in which the link was previously cycled down and is now being cycled up.

  2. Unplanned Restart

    This occurs when a catastrophic systems error had occurred whilst a link was operating and we are attempting to restore the system into its working condition.

CMR Restart (CMCC)

A special fixed-file record area (FACE type #LKIBR) is maintained for use by Input Message Handler to file all Type B input message blocks and all except the last received block of multi-block Type A messages. A bit matrix is maintained in Keypoint D which reflects the use of these file addresses. CMR Restart, which is activated at system cycle above Utility state, checks the bit matrix and ensures that any messages which had been completely received across the link but were lost at the time the system went down are reentered into the system for processing.