buttplug-hs-core-0.1.0.0: Client library for buttplug.io
Copyright(c) James Sully 2020-2021
LicenseBSD 3-Clause
Maintainersullyj3@gmail.com
Stabilityexperimental
Portabilityuntested
Safe HaskellNone
LanguageHaskell2010

Buttplug.Core.Device

Description

Types for representing sex toys, as well as ways of actuating them.

Synopsis

Documentation

data MessageAttributes Source #

For a particular actuation feature (Vibration, Rotation, or Linear), represents how many of that feature the device has, and the available resolution of control of that feature. See (https://buttplug-spec.docs.buttplug.io/enumeration.html#message-attributes-for-devicelist-and-deviceadded) for details.

Instances

Instances details
Eq MessageAttributes Source # 
Instance details

Defined in Buttplug.Core.Device

Show MessageAttributes Source # 
Instance details

Defined in Buttplug.Core.Device

Generic MessageAttributes Source # 
Instance details

Defined in Buttplug.Core.Device

Associated Types

type Rep MessageAttributes :: Type -> Type #

FromJSON MessageAttributes Source # 
Instance details

Defined in Buttplug.Core.Device

Methods

parseJSON :: Value -> Parser MessageAttributes

parseJSONList :: Value -> Parser [MessageAttributes]

ToJSON MessageAttributes Source # 
Instance details

Defined in Buttplug.Core.Device

type Rep MessageAttributes Source # 
Instance details

Defined in Buttplug.Core.Device

type Rep MessageAttributes = D1 ('MetaData "MessageAttributes" "Buttplug.Core.Device" "buttplug-hs-core-0.1.0.0-inplace" 'False) (C1 ('MetaCons "MessageAttributes" 'PrefixI 'True) (S1 ('MetaSel ('Just "attrFeatureCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Word)) :*: S1 ('MetaSel ('Just "attrStepCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [Word]))))

data Device Source #

An intimate device, containing info about the functionality it supports.

Instances

Instances details
Eq Device Source # 
Instance details

Defined in Buttplug.Core.Device

Methods

(==) :: Device -> Device -> Bool #

(/=) :: Device -> Device -> Bool #

Show Device Source # 
Instance details

Defined in Buttplug.Core.Device

Generic Device Source # 
Instance details

Defined in Buttplug.Core.Device

Associated Types

type Rep Device :: Type -> Type #

Methods

from :: Device -> Rep Device x #

to :: Rep Device x -> Device #

FromJSON Device Source # 
Instance details

Defined in Buttplug.Core.Device

Methods

parseJSON :: Value -> Parser Device

parseJSONList :: Value -> Parser [Device]

ToJSON Device Source # 
Instance details

Defined in Buttplug.Core.Device

Methods

toJSON :: Device -> Value

toEncoding :: Device -> Encoding

toJSONList :: [Device] -> Value

toEncodingList :: [Device] -> Encoding

type Rep Device Source # 
Instance details

Defined in Buttplug.Core.Device

type Rep Device = D1 ('MetaData "Device" "Buttplug.Core.Device" "buttplug-hs-core-0.1.0.0-inplace" 'False) (C1 ('MetaCons "Device" 'PrefixI 'True) (S1 ('MetaSel ('Just "deviceName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "deviceIndex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word) :*: S1 ('MetaSel ('Just "deviceMessages") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map DeviceMessageType MessageAttributes)))))

data DeviceMessageType Source #

Represents which message types the device supports See (https://buttplug-spec.docs.buttplug.io/enumeration.html#message-attributes-for-devicelist-and-deviceadded) for details.

Instances

Instances details
Eq DeviceMessageType Source # 
Instance details

Defined in Buttplug.Core.Device

Ord DeviceMessageType Source # 
Instance details

Defined in Buttplug.Core.Device

Show DeviceMessageType Source # 
Instance details

Defined in Buttplug.Core.Device

Generic DeviceMessageType Source # 
Instance details

Defined in Buttplug.Core.Device

Associated Types

type Rep DeviceMessageType :: Type -> Type #

FromJSON DeviceMessageType Source # 
Instance details

Defined in Buttplug.Core.Device

Methods

parseJSON :: Value -> Parser DeviceMessageType

parseJSONList :: Value -> Parser [DeviceMessageType]

FromJSONKey DeviceMessageType Source # 
Instance details

Defined in Buttplug.Core.Device

Methods

fromJSONKey :: FromJSONKeyFunction DeviceMessageType

fromJSONKeyList :: FromJSONKeyFunction [DeviceMessageType]

ToJSON DeviceMessageType Source # 
Instance details

Defined in Buttplug.Core.Device

ToJSONKey DeviceMessageType Source # 
Instance details

Defined in Buttplug.Core.Device

Methods

toJSONKey :: ToJSONKeyFunction DeviceMessageType

toJSONKeyList :: ToJSONKeyFunction [DeviceMessageType]

type Rep DeviceMessageType Source # 
Instance details

Defined in Buttplug.Core.Device

type Rep DeviceMessageType = D1 ('MetaData "DeviceMessageType" "Buttplug.Core.Device" "buttplug-hs-core-0.1.0.0-inplace" 'False) (((C1 ('MetaCons "DevRawWriteCmd" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DevRawReadCmd" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DevRawSubscribeCmd" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DevRawUnsubscribeCmd" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "DevStopDeviceCmd" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DevVibrateCmd" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DevLinearCmd" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DevRotateCmd" 'PrefixI 'False) (U1 :: Type -> Type))))