| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Network.SakuraIO.Platform.Message
Description
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.
Constructors
| 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 Methods (==) :: OutGoingMessage -> OutGoingMessage -> Bool # (/=) :: OutGoingMessage -> OutGoingMessage -> Bool # | |
| Show OutGoingMessage Source # | |
Defined in Network.SakuraIO.Platform.Message Methods showsPrec :: Int -> OutGoingMessage -> ShowS # show :: OutGoingMessage -> String # showList :: [OutGoingMessage] -> ShowS # | |
| FromJSON OutGoingMessage Source # | |
Defined in Network.SakuraIO.Platform.Message Methods 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.
Constructors
| OGChannel ChannelID UTCTime ChannelValue |
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.
Constructors
| Coordinate Latitude Longitude RangeM |
Instances
| Eq Coordinate Source # | |
Defined in Network.SakuraIO.Platform.Message | |
| Show Coordinate Source # | |
Defined in Network.SakuraIO.Platform.Message Methods showsPrec :: Int -> Coordinate -> ShowS # show :: Coordinate -> String # showList :: [Coordinate] -> ShowS # | |
| FromJSON Coordinate Source # | |
Defined in Network.SakuraIO.Platform.Message | |
data InComingMessage Source #
Messages sent from external services to sakura.io.
It supports ToJSON to get json representation using aeson.
Constructors
| ICChannels ModuleID [ICChannel] |
Instances
| Eq InComingMessage Source # | |
Defined in Network.SakuraIO.Platform.Message Methods (==) :: InComingMessage -> InComingMessage -> Bool # (/=) :: InComingMessage -> InComingMessage -> Bool # | |
| Show InComingMessage Source # | |
Defined in Network.SakuraIO.Platform.Message Methods showsPrec :: Int -> InComingMessage -> ShowS # show :: InComingMessage -> String # showList :: [InComingMessage] -> ShowS # | |
| ToJSON InComingMessage Source # | |
Defined in Network.SakuraIO.Platform.Message Methods 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.
Constructors
| ICChannel ChannelID ChannelValue |
data ChannelValue Source #
Constructors
| CVInt32 Int32 | |
| CVWord32 Word32 | |
| CVInt64 Int64 | |
| CVWord64 Word64 | |
| CVFloat Float | |
| CVDouble Double | |
| CVBytes ByteString |
Instances
| Eq ChannelValue Source # | |
Defined in Network.SakuraIO.Platform.Message | |
| Show ChannelValue Source # | |
Defined in Network.SakuraIO.Platform.Message Methods showsPrec :: Int -> ChannelValue -> ShowS # show :: ChannelValue -> String # showList :: [ChannelValue] -> ShowS # | |