Transmission Blocking

If a service leaves data transfer state for any reason, it will block transmission from all services above it. Blocking indicates that it cannot transmit data at this time. This means services above the blocking service cannot send either commands or data through the blocking service, since commands on higher layers are data to the layers below. Blocking transmission prevents the consumption of system resources by services which cannot use them effectively.

One of two conditions may exist.

In the first case, the service which blocked will have queued a control event to the application on the CID indicating the reason. The application should read data and control events until the event is found. When the control event is read, the API state machine for that CID will also leave the data transfer state and be in synch with the state machine of the underlying protocol. For example, if the remote system has disconnected, a disconnected event is will be queued. When the application reads this event the CID on which the event was received will enter the open state, and the event type gives the reason transmission was blocked.

In the second case, any control event generated will not be passed to the CID on which the transmission blocked error occurred since the block originated in another service. Even after all events have been read on the CID, it may itself remain in data transfer state and still be blocked. This condition may be temporary. For instance, if a service blocks because it receives an xoff request, it will unblock when it receives an xon request. In this situation, the services above it which were blocked can usually resume transmission as if nothing had happened. They are simply unblocked when all services below are back in data transfer state. However, if the condition does not correct itself, the application must either abandon the connection on that CID or locate the blocking service and attempt to bring it back into data transfer state.

The function lgo_GetStatus() gives the application a snap-shot of the state of each service in a device. This allows the application to examine each service to find the one (or more) which are blocking. Of course, the application might also try reading on each open CID to find the reason transmission is blocked as in the first case described above.