AdvertisingDataScopeImpl

class AdvertisingDataScopeImpl(txPowerLevel: Int) : AdvertisingDataScopeImpl, AdvertisingDataScope

Scope implementation for building mock advertising data.

This implementation extends the core implementation to add fields that cannot be advertised on Android or iOS, but can by real Bluetooth LE peripherals, therefore can be mocked.

Parameters

txPowerLevel

The simulated TX power level of the mock advertiser.

Constructors

Link copied to clipboard
constructor(txPowerLevel: Int)

Properties

Link copied to clipboard
open override val isEmpty: Boolean

Functions

Link copied to clipboard
open override fun build(): AdvertisingDataDefinition
Link copied to clipboard
open override fun CompleteLocalName(name: String)

Adds "Complete Local Name" AD type to the advertising data.

Link copied to clipboard
open override fun Flags(vararg flags: AdvertisingDataFlag)
open override fun Flags(bitfield: Int)

Adds "Flags" AD type to the advertising data.

Link copied to clipboard
open override fun IncludeTxPowerLevel()

Adds the transmission power level to the advertising data.

Link copied to clipboard
open override fun ManufacturerData(companyId: Int, data: ByteArray)

Adds the manufacturer data to the advertising data.

Link copied to clipboard
open override fun MeshBeacon(data: ByteArray)

Sets the Mesh Beacon field in the advertising data.

Link copied to clipboard
open override fun MeshMessage(data: ByteArray)

Sets the Mesh Message field in the advertising data.

Link copied to clipboard
open override fun MeshPbAdv(data: ByteArray)

Sets the Bluetooth Mesh PB ADV field in the advertising data.

Link copied to clipboard
open override fun ServiceData(shortUuid: Int, data: ByteArray)
open override fun ServiceData(uuid: Uuid, data: ByteArray)

Adds the service data to the advertising data.

Link copied to clipboard
open override fun ServiceSolicitationUuid(shortUuid: Int)
open override fun ServiceSolicitationUuid(uuid: Uuid)

Adds the service UUID to the advertising data, which will be added to the AD field "Service Solicitation X bit UUIDs", depending on the UUID length.

Link copied to clipboard
open override fun ServiceUuid(shortUuid: Int)
open override fun ServiceUuid(uuid: Uuid)
Link copied to clipboard
open override fun ShortenedLocalName(name: String)

Adds "Shortened Local Name" AD type to the advertising data.