1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
package service
import (
"github.com/muka/go-bluetooth/bluez/profile/gatt"
)
// Create a new GattService1Properties
func NewGattService1Properties(uuid string) *gatt.GattService1Properties {
return &gatt.GattService1Properties{
IsService: true,
Primary: true,
UUID: uuid,
}
}
// Create a new GattCharacteristic1Properties
func NewGattCharacteristic1Properties(uuid string) *gatt.GattCharacteristic1Properties {
return &gatt.GattCharacteristic1Properties{
UUID: uuid,
Flags: []string{},
}
}
// Create a new GattDescriptor1Properties
func NewGattDescriptor1Properties(uuid string) *gatt.GattDescriptor1Properties {
return &gatt.GattDescriptor1Properties{
UUID: uuid,
Flags: []string{
gatt.FlagDescriptorRead,
gatt.FlagDescriptorWrite,
},
}
}
|