ble-0.1.0.0: Bluetooth Low Energy (BLE) peripherals

Safe HaskellNone
LanguageHaskell2010

Bluetooth.Internal.Types

Contents

Synopsis

Documentation

(</>) :: Text -> Text -> Text Source

Append two Texts, keeping exactly one slash between them.

UUID

data UUID Source

UUIDs, used for services and characteristics.

Unofficial UUIDs will have 128-bits, and will look this:

d45e83fb-c772-459e-91a8-43cbf1443af4

Official UUIDs will have either 32 or 16 bits.

See ITU-T Rec. X.677 for more information on the format and generation of these UUIDs. You can use the Online UUID Generator to generate UUIDs.

Constructors

UUID UUID 

Any

data Any where Source

A Haskell existential type corresponding to DBus' Variant.

Constructors

MkAny :: forall a. Representable a => a -> Any 

class HasValue s a | s -> a where Source

Methods

value :: Lens' s a Source

Instances

Method

Descriptor

Characteristic

class HasOffset s a | s -> a where Source

Methods

offset :: Lens' s a Source

data Characteristic typ Source

Constructors

Characteristic 

Fields

characteristicUuid :: UUID
 
characteristicProperties :: [CharacteristicProperty]
 
characteristicReadValue :: Maybe (ReadValueM typ)
 
characteristicWriteValue :: Maybe (typ -> WriteValueM Bool)

Write a value. Note that the value is only writeable externally if the characteristic contains the CPWrite property *and* this is a Just.

characteristicNotifying :: Maybe (IORef Bool)

If Nothing, this characteristic does not send notifications. If Just False, the characteristic does not currently send notifications, but can be made to (with a StartNotify method request). If Just True, the characteristic currently sends notifications (and can be made to stop with a StopNotify method request). **NOTE**: Notifications do not currently work.

class HasNotifying s a | s -> a where Source

Methods

notifying :: Lens' s a Source

class HasProperties s a | s -> a where Source

Methods

properties :: Lens' s a Source

class HasReadValue s a | s -> a where Source

Methods

readValue :: Lens' s a Source

class HasUuid s a | s -> a where Source

Methods

uuid :: Lens' s a Source

class HasWriteValue s a | s -> a where Source

Methods

writeValue :: Lens' s a Source

Service

Application

data Application Source

An application. Can be created from it's IsString instance. The string (application path) is used only for the DBus API, and will not have relevance within Bluetooth.

class HasServices s a | s -> a where Source

Methods

services :: Lens' s a Source

Advertisement

class HasServiceUUIDs s a | s -> a where Source

Methods

serviceUUIDs :: Lens' s a Source

class HasSolicitUUIDs s a | s -> a where Source

Methods

solicitUUIDs :: Lens' s a Source

class HasType_ s a | s -> a where Source

Methods

type_ :: Lens' s a Source

Connection

connect :: IO Connection Source

Creates a connection to DBus. This does *not* represent Bluetooth connection.

BluetoothM