Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: btdevice.h
Link against: btdevice.lib

Class TBTAFHHostChannelClassification

class TBTAFHHostChannelClassification : public TBuf8< KHCIAFHHostChannelClassificationSize >;

Description

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.

Derivation

Members

Defined in TBTAFHHostChannelClassification:
Reset(), SetChannelBad(), SetChannelRangeBad(), TBTAFHHostChannelClassification(), Validate()


Construction and destruction


TBTAFHHostChannelClassification()

IMPORT_C TBTAFHHostChannelClassification();

Description

Constructor

See also:

[Top]


Member functions


Reset()

IMPORT_C void Reset();

Description

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.


Validate()

IMPORT_C TInt Validate() const;

Description

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.

Return value

TInt

an error (KErrNone if this is valid)


SetChannelBad()

IMPORT_C TInt SetChannelBad(const TUint8 aChannel);

Description

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'.

Parameters

const TUint8 aChannel

The number (in the range [0,78]) of the channel to be set as bad

Return value

TInt

an error (KErrNone implies success)


SetChannelRangeBad()

IMPORT_C TInt SetChannelRangeBad(const TUint8 aChannelRangeLowest, const TUint8 aChannelRangeHighest);

Description

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'.

Parameters

const TUint8 aChannelRangeLowest

The lowest channel number representing a channel to be set as bad

const TUint8 aChannelRangeHighest

The highest channel number representing a channel to be set as bad

Return value

TInt

an error (KErrNone implies success)