filter

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2025 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdFilter

type AdFilter interface {
	Filter(*hci.AdvertisingReport) bool
}

AdFilter can be used to filter incoming Advertising Reports if Filter() returns true, matching ScanReport is created and passed to the channel returned by Host.StartScan()

func All

func All(filters []AdFilter) AdFilter

All returns a filter which matches if all of the given filters would match

func Any

func Any(filters []AdFilter) AdFilter

Any returns a filter which matches if any of the given filters would match

func ByAdData

func ByAdData(typ hci.AdType, preamble []byte) AdFilter

ByAdData return AdFilter which can be used to filter Advertising Reports based on Ad Type and start of the advertising data. The filter matches if both type and the start of the data match the ones given to the filter

func ByAdType

func ByAdType(typ hci.AdType) AdFilter

ByAdType returns filter which can be used to filter Advertising Reports based on the Type field in the Ad Structures contained on the Advertising Reports

func ByAddress

func ByAddress(address hci.BtAddress) AdFilter

ByAddress returns AdFilter which filters Advertising Reports by sender address. Filter passes report if it comes from given address

func ByIrk

func ByIrk(irk []byte) AdFilter

ByIrk returns filter which returns true if advertiser address is resolvable using given irk

func ByPartialAddress

func ByPartialAddress(buf []byte) AdFilter

ByPartialAddress returns filter which matches a partial address bytes against bytes given in buffer.

func ByVendor

func ByVendor(preamble []byte) AdFilter

ByVendor returns AdFilter which can be used to filter Advertising Reports based on the start of its vendor specific Advertising Data. Filter passes Advertising Reports which have vendor -specific advertising data and the first bytes of the vendor specific data match the given preamble.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL