Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides Haskell representation of messages exchanged on the sakura.io platform.
Synopsis
- type ModuleID = String
- data OutGoingMessage
- type ChannelID = Word8
- data OGChannel = OGChannel ChannelID UTCTime ChannelValue
- type Latitude = Float
- type Longitude = Float
- type RangeM = Int32
- data Coordinate = Coordinate Latitude Longitude RangeM
- data InComingMessage = ICChannels ModuleID [ICChannel]
- data ICChannel = ICChannel ChannelID ChannelValue
- data ChannelValue
Documentation
data OutGoingMessage Source #
Messages sent from sakura.io to external services.
It supports FromJSON
to parse from json using aeson
.
OGChannels ModuleID UTCTime [OGChannel] | |
OGConnection ModuleID UTCTime Bool | |
OGLocation ModuleID UTCTime (Maybe Coordinate) | |
OGKeepalive UTCTime |
Instances
Eq OutGoingMessage Source # | |
Defined in Network.SakuraIO.Platform.Message (==) :: OutGoingMessage -> OutGoingMessage -> Bool # (/=) :: OutGoingMessage -> OutGoingMessage -> Bool # | |
Show OutGoingMessage Source # | |
Defined in Network.SakuraIO.Platform.Message showsPrec :: Int -> OutGoingMessage -> ShowS # show :: OutGoingMessage -> String # showList :: [OutGoingMessage] -> ShowS # | |
FromJSON OutGoingMessage Source # | |
Defined in Network.SakuraIO.Platform.Message parseJSON :: Value -> Parser OutGoingMessage # parseJSONList :: Value -> Parser [OutGoingMessage] # |
Channel payload sent from sakura.io to external services as part of OGChannels
.
It supports FromJSON
to parse from json using aeson
.
data Coordinate Source #
Coordinate payload sent from sakura.io to external services as part of OGLocation
.
It supports FromJSON
to get json representation using aeson
.
Instances
Eq Coordinate Source # | |
Defined in Network.SakuraIO.Platform.Message (==) :: Coordinate -> Coordinate -> Bool # (/=) :: Coordinate -> Coordinate -> Bool # | |
Show Coordinate Source # | |
Defined in Network.SakuraIO.Platform.Message showsPrec :: Int -> Coordinate -> ShowS # show :: Coordinate -> String # showList :: [Coordinate] -> ShowS # | |
FromJSON Coordinate Source # | |
Defined in Network.SakuraIO.Platform.Message parseJSON :: Value -> Parser Coordinate # parseJSONList :: Value -> Parser [Coordinate] # |
data InComingMessage Source #
Messages sent from external services to sakura.io.
It supports ToJSON
to get json representation using aeson
.
Instances
Eq InComingMessage Source # | |
Defined in Network.SakuraIO.Platform.Message (==) :: InComingMessage -> InComingMessage -> Bool # (/=) :: InComingMessage -> InComingMessage -> Bool # | |
Show InComingMessage Source # | |
Defined in Network.SakuraIO.Platform.Message showsPrec :: Int -> InComingMessage -> ShowS # show :: InComingMessage -> String # showList :: [InComingMessage] -> ShowS # | |
ToJSON InComingMessage Source # | |
Defined in Network.SakuraIO.Platform.Message toJSON :: InComingMessage -> Value # toEncoding :: InComingMessage -> Encoding # toJSONList :: [InComingMessage] -> Value # toEncodingList :: [InComingMessage] -> Encoding # |
Channel payload sent from external services to sakura.io as part of ICChannels
.
It supports ToJSON
to get json representation using aeson
.
data ChannelValue Source #
CVInt32 Int32 | |
CVWord32 Word32 | |
CVInt64 Int64 | |
CVWord64 Word64 | |
CVFloat Float | |
CVDouble Double | |
CVBytes ByteString |
Instances
Eq ChannelValue Source # | |
Defined in Network.SakuraIO.Platform.Message (==) :: ChannelValue -> ChannelValue -> Bool # (/=) :: ChannelValue -> ChannelValue -> Bool # | |
Show ChannelValue Source # | |
Defined in Network.SakuraIO.Platform.Message showsPrec :: Int -> ChannelValue -> ShowS # show :: ChannelValue -> String # showList :: [ChannelValue] -> ShowS # |