fermentord/vendor/github.com/JuulLabs-OSS/ble/adv.go

29 lines
548 B
Go
Raw Normal View History

package ble
// AdvHandler handles advertisement.
type AdvHandler func(a Advertisement)
// AdvFilter returns true if the advertisement matches specified condition.
type AdvFilter func(a Advertisement) bool
// Advertisement ...
type Advertisement interface {
LocalName() string
ManufacturerData() []byte
ServiceData() []ServiceData
Services() []UUID
OverflowService() []UUID
TxPowerLevel() int
Connectable() bool
SolicitedService() []UUID
RSSI() int
Addr() Addr
}
// ServiceData ...
type ServiceData struct {
UUID UUID
Data []byte
}