func NewRawPacket(bytes ...[]byte) *Packet {
	p := &Packet{b: make([]byte, 0, MaxEIRPacketLength)}
	for _, b := range bytes {
		p.b = append(p.b, b...)
	}
	return p
}
NewRawPacket returns a new advertising Packet.
package adv
import (
	"encoding/binary"
	"github.com/currantlabs/ble"
)
type Packet struct {
	b []byte
}
func (p *Packet) Bytes() []byte {
	return p.b
}
func (p *Packet) Len() int {
	return len(p.b)
}
func NewPacket(fields ...Field) (*Packet, error) {
	p := &Packet{b: make([]byte, 0, MaxEIRPacketLength)}
	for _, f := range fields {
		if err := f(p); err != nil {
			return nil, err
		}
	}
	return p, nil
}