TItem Class Reference
HID item class A HID report descriptor is comprised of a sequence of "items" that provide information about the device. Items consist of a header and zero or more bytes of data. The header contains the item type (main/global/local), an item "tag" (subtype) and the item size. Items can be "short" (containing a maximum of 4 bytes of data) or "long" (a maximum of 255 bytes of data).
A TItem represents a single HID report descriptor item. It is constructed from an eight bit non-modifiable (Symbian-) descriptor, which is assumed to contain report (HID-) descriptor data.
generichid.lib
- Since
- S60 v5.0
Constructor & Destructor Documentation
TItem(const TDesC8 &)
The constructor takes a an eight bit non-modifiable (Symbian-) descriptor containing report (HID-) descriptor data. The item tag, type, data size and offset are calculated here.
Parameters
const TDesC8 & aRawData | The raw item data, represented as a Symbian descriptor. The item data is assumed to be at the beginning of the descriptor. The size of the TDesC8 may be greater than the size of the item, as the item size will be calculated from the raw HID descriptor data. Of course, the TDesC8 should be at least as long as the raw item data. |
Member Functions Documentation
Data()
Data() returns the data associated with the item, represented as a 32-bit unsigned integer. This is only meaningful if the data length is less than 4 bytes.
DataSize()
DataSize() returns the size of the item data in bytes. This is the total item size minus the size of any header information. (A short item header is a single byte, a long item header is three bytes long.)
ItemSize()
ItemSize() returns the total size of this item, including the header data.
SignedData()
SignedData() returns the data associated with the item, represented as a 32-bit signed integer. This is only meaningful if the data length is less than 4 bytes.
Tag()
Tag() returns the tag (subtype) value for this item.
Type()
Type() returns the item type (e.g. "global").
operator[](TInt)
Returns the byte at the given offset within the item data block.
Parameters
TInt aIndex | The index within the data block for the current tag. |
Member Enumerations Documentation
Enum TItemType
The possible item types: main, global or local. Item type is a two-bit field -- the 11b value is reserved for "long items", which are only used for vendor-specific commands.
Enumerators
EMain = 0 | |
EGlobal = 1 | |
ELocal = 2 | |
EReserved = 3 | |
Member Data Documentation
TInt
iDataOffset
TInt
| iDataOffset | [private] |
Offset in bytes of the data block
TPtrC8
iRawData
Pointer to the raw report descriptor data
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.