Specifications

Remote Control and Receiver-Transceiver Specifications and Requirements
for Windows Media Center in Windows Operating Systems
145
Priority Receives
In most cases, during normal operations, the CIRClass driver will keep an IOCTL_IR_RECEIVE
in progress with the CIR Port driver. In some cases, Windows will need to start a new receive
operation that bypasses and leaves pending any IOCTL_IR_RECEIVE requests that might
already be in progress. This operation is referred to as a "Priority Receive."
The start of a Priority Receive operation is always indicated to a CIR Port driver by an
IOCTL_IR_ENTER_PRIORITY_RECEIVE request. IOCTL_IR_PRIORITY_RECEIVE passes the
CIR Port driver an IR_ENTER_PRIORITY RECEIVE structure, with the following format:
typedef struct _IOCTL_IR_ENTER_PRIORITY_RECEIVE_PARAMS {
IN ULONG_PTR Receiver;
IN ULONG_PTR TimeOut;
}IOCTL_IR_ENTER_PRIORITY_RECEIVE_PARAMS, *PIOCTL_IR_ENTER_PRIORITY_RECEIVE_PARAMS;
The Receiver field of the IR_ENTER_PRIORITY_RECEIVE structure indicates on which IR port
of the indicated IR device the receive should be performed. The TimeOut field of this structure
indicates the number of milliseconds that the CIR Port driver should use to determine IR data
packet completion for subsequent IOCTL_IR_PRIORITY_RECEIVE requests.
On receipt of an IOCTL_IR_ENTER_PRIORITY_RECEIVE request, a CIR Port driver enters
Priority Receive mode and proceeds as follows:
Immediately stops processing any pending IOCTL_IR_RECEIVE requests for the indicated
device. Note that any pending IOCTL_IR_RECEIVE requests remain pending in the CIR Port
driver and are not completed by the CIR Port driver in response to this IOCTL.
Does whatever processing on its device that may be necessary to set the new IR timeout value.
Enables the device to use the proper receiver part for the priority receive.
Queues any newly-arriving IOCTL_IR_RECEIVE requests for processing after leaving Priority
Receive mode.
Completes the IOCTL_IR_ENTER_PRIORITY_RECEIVE as soon as its IR device is ready to
receive IR data with the new timeout value.
Awaits receipt of an IOCTL_IR_PRIORITY_RECEIVE request, which should be immediately
forthcoming from the CIRClass driver, following completion of the
IOCTL_IR_ENTER_PRIORITY_RECEIVE request.
While in Priority Receive mode, the CIR Port driver processes IOCTL_IR_PRIORITY_RECEIVE
requests similarly to a standard IOCTL_IR_RECEIVE request. That is, the
IOCTL_IR_PRIORITY_RECEIVE request is completed when the specified timeout period
elapses or the supplied data buffer is full. Note that the IOCTL_IR_PRIORITY_RECEIVE data
buffer returned by a CIR Port driver contains an IR_PRIORITY_RECEIVE_PARAMS structure.
This structure has the following format:
typedef struct _IR_PRIORITY_RECEIVE_PARAMS {
OUT ULONG_PTR DataEnd;
IN ULONG_PTR ByteCount;
OUT ULONG_PTR CarrierFrequency;
IN LONG Data[1];
}IR_PRIORITY_RECEIVE_PARAMS, *PIR_PRIORITY_RECEIVE_PARAMS;