#include <btdevice.h>
class TBTAFHHostChannelClassification : public TBuf8< KHCIAFHHostChannelClassificationSize > |
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() |
Inherited Attributes | |
---|---|
TBuf8< KHCIAFHHostChannelClassificationSize >::iBuf | |
TDes8::__DECLARE_TEST | |
TDes8::iMaxLength |
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.
IMPORT_C | TBTAFHHostChannelClassification | ( | ) |
Constructor
See also: TBuf8
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.
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'.
Parameter | Description |
---|---|
aChannel | The number (in the range [0,78]) of the channel to be set as bad |
Returns: an error (KErrNone implies success)
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'.
Parameter | Description |
---|---|
aChannelRangeLowest | The lowest channel number representing a channel to be set as bad |
aChannelRangeHighest | The highest channel number representing a channel to be set as bad |
Returns: an error (KErrNone implies success)
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.
Returns: an error (KErrNone if this is valid)