Specifications
Remote Control and Receiver-Transceiver Specifications and Requirements
for Windows Media Center in Windows Operating Systems
146
While in Priority Receive mode, any IOCTL_IR_RECEIVE requests that the CIR Port driver
receives must be queued for later processing. While in Priority Receive mode, any non-receive-
related requests (such as IOCTL_IR_TRANSMIT or other IOCTLs) are processed as normal;
Priority Receive mode only affects processing of receive-related packets. The only two receive-
related requests that are processed by the CIR Port driver while in Priority Receive mode are the
following:
IOCTL_IR_PRIORITY_RECEIVE – Receiving this request indicates that the CIR Port driver
should continue with the current Priority Receive operation, using the timeout value that is
specified in the most recently received IOCTL_IR_ENTER_PRIORITY_RECEIVE request.
IOCTL_IR_EXIT_PRIORITY_RECEIVE – Receiving this request indicates that the CIR Port
driver should exit Priority Receive mode and return to its normal mode receive processing. In this
case, the CIR Port driver does whatever processing is necessary to restore its previously-used
receive timeout period to its hardware. Following receipt of an
IOCTL_IR_EXIT_PRIORITY_RECEIVE request, a CIR Port driver returns to using the
IOCTL_IR_RECEIVE request that was pending before receipt of the
IOCTL_IR_ENTER_PRIORITY_RECEIVE (if there was one) for newly-arriving IR data.
Transmit Data
When Windows wants to send CIR data, it uses the IOCTL_IR_TRANSMIT request. Transmit
request processing is only a bit more complicated than processing a receive request.
IOCTL_IR_TRANSMIT uses both IOCTL data buffers. The input buffer (which uses buffered I/O)
contains an IR_TRANSMIT_PARAMS structure that describes the parameters for the transmit
request.
The format of this structure is as follows:
typedef struct _IR_TRANSMIT_PARAMS {
IN ULONG_PTR TransmitPortMask;
IN ULONG_PTR CarrierPeriod;
IN ULONG_PTR Flags;
IN ULONG_PTR PulseSize;
} IR_TRANSMIT_PARAMS, *PIR_TRANSMIT_PARAMS;
Note that the transmit port mask indicates on which ports of the indicated IR device the specified
data should be transmitted.
The IOCTL_IR_TRANSMIT data buffer, described by an MDL, is used to supply the data in RLC
format to be sent by the device controlled by the CIR Port driver. The data buffer comprises a
series of transmit "chunks," each of which is described by an IR_TRANSMIT_CHUNK structure
with the following format:
typedef struct _IR_TRANSMIT_CHUNK {
ULONG_PTR OffsetToNextChunk;
ULONG_PTR RepeatCount;
ULONG_PTR ByteCount;
LONG Data[1];
} IR_TRANSMIT_CHUNK, *PIR_TRANSMIT_CHUNK;
The repeat count indicates the number of consecutive times that the RLC data in the Data field of
the structure is to be transmitted. The number of bytes of RLC data in the Data field is indicates
by the ByteCount field of the structure.
The last chunk to be transmitted is identified by an OffsetToNextChunk field value of zero.










