2.3. Result Dispatch

All LCB result descriptors for both unsolicited data and command/response data are stored in the same LCB Result Descriptor FIFO. When the FIFO goes from empty to non-empty the LCB raises an interrupt signal.

A block diagram of the result dispatch ISR is shown below.

Figure 2-3. Result Dispatch ISR

The ISR servicing this interrupt will read the result descriptor FIFO until empty, sorting the descriptors based on the "unsolicited" bit in the result descriptor.

2.3.1. Command/Response Data

Once it is determined that the result descriptor is for command/response the corresponding LIOX is located. For more about the LIOX see Section 2.4.1 and Figure 2-4.

The state of the received LIOX is next changed from the LIOX_PEND state to the LIOX_RECEIVED state.

Command/response data will be given a higher priority when servicing result descriptors since it is assumed that command/response data is relatively rare compared to unsolicited data. This means the solicited message queue will have a higher priority than the unsolicited queues.

An LCB_msg object containing the result descriptor and LIOX handle will be placed on the Solicited Response Queue, allowing the processing of the cmd/rsp result to occur at task level. A task reading the message queue will call back the user supplied result processing function passing the LIOX handle and any user data as arguments.

2.3.2. Unsolicited Data

The unsolicited data can take many forms, including raw event data from event builders, filtered event data from event processing units, housekeeping data and other arbitrary data. The type of the unsolicited data, however, cannot be determined by the result descriptor alone – the LCBD will dispatch all unsolicited result descriptors based on the source packet's LATp protocol field.

LATp defines 4 protocol types [huffer2]. The LATp cell header defines the protocol type as a 2-bit field. One of the protocol types is unavailable for dispatching, leaving 3 protocols for user dispatch.

Previously (see Section 2.5) the user registered call back routines for the various LATp protocol types. The LCBD queues the unsolicited message to the queue handling a specific LATp protocol type or to the default queue if no handler is registered.

It is the responsibility of the user application on the consuming end of the message queue to process the message in a timely manner and return the unsolicited data memory to the circular buffer as described in Section 2.5.