Versions in this module Expand all Collapse all v0 v0.0.2 Mar 5, 2020 v0.0.1 May 13, 2019 Changes in this version + const FlagBothController + const FlagBothHost + const FlagGeneralDiscoverable + const FlagLEOnly + const FlagLimitedDiscoverable + const MaxEIRPacketLength + var ErrInvalid = errors.New("invalid argument") + var ErrNotFit = errors.New("data not fit") + type Field func(p *Packet) error + func AllUUID(u ble.UUID) Field + func CompleteName(n string) Field + func Flags(f byte) Field + func IBeacon(u ble.UUID, major, minor uint16, pwr int8) Field + func IBeaconData(md []byte) Field + func ManufacturerData(id uint16, b []byte) Field + func Raw(b []byte) Field + func ServiceData16(id uint16, b []byte) Field + func ShortName(n string) Field + func SomeUUID(u ble.UUID) Field + type Packet struct + func NewPacket(fields ...Field) (*Packet, error) + func NewRawPacket(bytes ...[]byte) *Packet + func (p *Packet) Append(f Field) error + func (p *Packet) Bytes() []byte + func (p *Packet) Field(typ byte) []byte + func (p *Packet) Flags() (flags byte, present bool) + func (p *Packet) Len() int + func (p *Packet) LocalName() string + func (p *Packet) ManufacturerData() []byte + func (p *Packet) ServiceData() []ble.ServiceData + func (p *Packet) ServiceSol() []ble.UUID + func (p *Packet) TxPower() (power int, present bool) + func (p *Packet) UUIDs() []ble.UUID