class TBTAFHHostChannelClassification : public TBuf8< KHCIAFHHostChannelClassificationSize > |
Descriptor class that should be used to help set up an AFH host channel classification for the controller.
The bits in each byte of this descriptor are used to tell the controller which channels the host anticipates will become busy and so advisable for Bluetooth to avoid. Such channels are referred to as 'bad', and are represented by bits set to 0. Channels that are not 'bad' are referred to as 'unknown' implying simply that the host has no knowledge that they are, or are about to become 'bad'. These are represented by bits set to 1. Note: The Bluetooth specification demands that at least 20 channels must be set to 'unknown'. Any attempt by the user of this class to set too many 'bad' channels will result in the return of a KErrNotSupported error, and the attempt having no effect.
Public Member Functions | |
---|---|
TBTAFHHostChannelClassification() | |
IMPORT_C void | Reset() |
IMPORT_C TInt | SetChannelBad(const TUint8) |
IMPORT_C TInt | SetChannelRangeBad(const TUint8, const TUint8) |
IMPORT_C TInt | Validate() |
Private Member Functions | |
---|---|
TInt | BitByteIndices(TUint8 &, TUint8 &, const TUint8) |
TInt | DoSetChannelBad(const TUint8) |
TUint8 | NumUnknownsWithinRange(const TUint8, const TUint8) |
Private Attributes | |
---|---|
TUint32 | iPadding1 |
TUint32 | iPadding2 |
Inherited Attributes | |
---|---|
TBuf8< KHCIAFHHostChannelClassificationSize >::iBuf | |
TDes8::__DECLARE_TEST | |
TDes8::iMaxLength |
TInt | BitByteIndices | ( | TUint8 & | aByteIndex, |
TUint8 & | aBitIndex, | |||
const TUint8 | aChannel | |||
) | const [private] |
TInt | DoSetChannelBad | ( | const TUint8 | aChannel | ) | [private] |
const TUint8 aChannel |
TUint8 | NumUnknownsWithinRange | ( | const TUint8 | aChannelRangeLowest, |
const TUint8 | aChannelRangeHighest | |||
) | const [private] |
IMPORT_C void | Reset | ( | ) |
Resets descriptor to default value
The default value is that in which there are no bad channels in 79 channel set. Note: most significant bit is reserved and set to zero.
IMPORT_C TInt | SetChannelBad | ( | const TUint8 | aChannel | ) |
Set a channel in this TBTAFHHostChannelClassification as 'bad' or busy.
Channels are represented by the bits in the TBTAFHHostChannelClassification descriptor. The most significant leftmost bit is always set to 0. The next most significant bit represents channel 78 The least significant rightmost bit represents channel 0 SetChannelBad unsets (i.e. sets to 0) the bit specified by the parameter 'aChannel'.
const TUint8 aChannel | The number (in the range [0,78]) of the channel to be set as bad |
IMPORT_C TInt | SetChannelRangeBad | ( | const TUint8 | aChannelRangeLowest, |
const TUint8 | aChannelRangeHighest | |||
) |
Set a range of channels in this TBTAFHHostChannelClassification as 'bad' or busy.
Channels are represented by the bits in the TBTAFHHostChannelClassification descriptor. The most significant leftmost bit is always set to 0. The next most significant bit represents channel 78 The least significant rightmost bit represents channel 0 SetChannelRangeBad unsets (i.e. sets to 0) all bits in the range ['aChannelRangeLowest','aChannelRangeHighest'], that is all bits between and including the bit repesenting 'aChannelRangeLowest' and the bit representing 'aChannelRangeHighest'.
IMPORT_C TInt | Validate | ( | ) | const |
Check that this AFH host channel classification conforms to the spec.
Checks that at least 20 channels are NOT set to bad, as required in Bluetooth specification. Also checks length is ten bytes.
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.