Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- lifxPort :: PortNumber
- sendMessage :: MonadLifx m => HostAddress -> Message -> m ()
- data HSBK = HSBK {
- hue :: Word16
- saturation :: Word16
- brightness :: Word16
- kelvin :: Word16
- newtype Duration = Duration Word32
- data Message
- type Lifx = LifxT IO
- newtype LifxT m a = LifxT {}
- runLifx :: Lifx a -> IO a
- runLifxT :: MonadIO m => LifxT m a -> m a
- class MonadIO m => MonadLifx m where
- getSocket :: m Socket
- getSource :: m Word32
- incrementCounter :: m ()
- getCounter :: m Word8
- encodeMessage :: Bool -> Word8 -> Word32 -> Message -> ByteString
- data Header = Header {
- size :: Word16
- protocol :: Word16
- addressable :: Bool
- tagged :: Bool
- origin :: Word8
- source :: Word32
- target :: Word64
- resRequired :: Bool
- ackRequired :: Bool
- sequenceCounter :: Word8
- packetType :: Word16
- putHeader :: Header -> Put
- messageHeader :: Bool -> Word8 -> Word32 -> Message -> Header
- putMessagePayload :: Message -> Put
- succ' :: (Eq a, Bounded a, Enum a) => a -> a
Documentation
sendMessage :: MonadLifx m => HostAddress -> Message -> m () Source #
HSBK | |
|
Instances
Eq HSBK Source # | |
Ord HSBK Source # | |
Show HSBK Source # | |
Generic HSBK Source # | |
type Rep HSBK Source # | |
Defined in Lifx.Lan type Rep HSBK = D1 ('MetaData "HSBK" "Lifx.Lan" "lifx-lan-0.1.0.0-EZ3PzMpiR8lHI36pXr4BIp" 'False) (C1 ('MetaCons "HSBK" 'PrefixI 'True) ((S1 ('MetaSel ('Just "hue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16) :*: S1 ('MetaSel ('Just "saturation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16)) :*: (S1 ('MetaSel ('Just "brightness") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16) :*: S1 ('MetaSel ('Just "kelvin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16)))) |
Instances
Monad m => MonadState Word8 (LifxT m) Source # | |
Monad m => Monad (LifxT m) Source # | |
Functor m => Functor (LifxT m) Source # | |
Monad m => Applicative (LifxT m) Source # | |
MonadIO m => MonadIO (LifxT m) Source # | |
MonadIO m => MonadLifx (LifxT m) Source # | |
Monad m => MonadReader (Socket, Word32) (LifxT m) Source # | |
class MonadIO m => MonadLifx m where Source #
getSocket :: m Socket Source #
getSource :: m Word32 Source #
incrementCounter :: m () Source #
getCounter :: m Word8 Source #
encodeMessage :: Bool -> Word8 -> Word32 -> Message -> ByteString Source #
Header | |
|
putMessagePayload :: Message -> Put Source #