net-mqtt-0.7.1.0: An MQTT Protocol Implementation.
Copyright(c) Dustin Sallings 2019
LicenseBSD3
Maintainerdustin@spy.net
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Network.MQTT.Types

Description

MQTT Types.

Synopsis

Documentation

data LastWill Source #

An MQTT Will message.

Instances

Instances details
Eq LastWill Source # 
Instance details

Defined in Network.MQTT.Types

Show LastWill Source # 
Instance details

Defined in Network.MQTT.Types

Arbitrary LastWill Source # 
Instance details

Defined in Network.MQTT.Arbitrary

data QoS Source #

QoS values for publishing and subscribing.

Constructors

QoS0 
QoS1 
QoS2 

Instances

Instances details
Bounded QoS Source # 
Instance details

Defined in Network.MQTT.Types

Methods

minBound :: QoS #

maxBound :: QoS #

Enum QoS Source # 
Instance details

Defined in Network.MQTT.Types

Methods

succ :: QoS -> QoS #

pred :: QoS -> QoS #

toEnum :: Int -> QoS #

fromEnum :: QoS -> Int #

enumFrom :: QoS -> [QoS] #

enumFromThen :: QoS -> QoS -> [QoS] #

enumFromTo :: QoS -> QoS -> [QoS] #

enumFromThenTo :: QoS -> QoS -> QoS -> [QoS] #

Eq QoS Source # 
Instance details

Defined in Network.MQTT.Types

Methods

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

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

Ord QoS Source # 
Instance details

Defined in Network.MQTT.Types

Methods

compare :: QoS -> QoS -> Ordering #

(<) :: QoS -> QoS -> Bool #

(<=) :: QoS -> QoS -> Bool #

(>) :: QoS -> QoS -> Bool #

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

max :: QoS -> QoS -> QoS #

min :: QoS -> QoS -> QoS #

Show QoS Source # 
Instance details

Defined in Network.MQTT.Types

Methods

showsPrec :: Int -> QoS -> ShowS #

show :: QoS -> String #

showList :: [QoS] -> ShowS #

Arbitrary QoS Source # 
Instance details

Defined in Network.MQTT.Arbitrary

Methods

arbitrary :: Gen QoS #

shrink :: QoS -> [QoS] #

qosFromInt :: Int -> Maybe QoS Source #

Parse a valid QoS value from an Int.

data ConnACKFlags Source #

Connection acknowledgment details.

data ConnACKRC Source #

data PubACK Source #

Constructors

PubACK PktID Word8 [Property] 

Instances

Instances details
Eq PubACK Source # 
Instance details

Defined in Network.MQTT.Types

Methods

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

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

Show PubACK Source # 
Instance details

Defined in Network.MQTT.Types

Arbitrary PubACK Source # 
Instance details

Defined in Network.MQTT.Arbitrary

ByteMe PubACK Source # 
Instance details

Defined in Network.MQTT.Types

data PubREC Source #

Constructors

PubREC PktID Word8 [Property] 

Instances

Instances details
Eq PubREC Source # 
Instance details

Defined in Network.MQTT.Types

Methods

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

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

Show PubREC Source # 
Instance details

Defined in Network.MQTT.Types

Arbitrary PubREC Source # 
Instance details

Defined in Network.MQTT.Arbitrary

ByteMe PubREC Source # 
Instance details

Defined in Network.MQTT.Types

data PubREL Source #

Constructors

PubREL PktID Word8 [Property] 

Instances

Instances details
Eq PubREL Source # 
Instance details

Defined in Network.MQTT.Types

Methods

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

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

Show PubREL Source # 
Instance details

Defined in Network.MQTT.Types

Arbitrary PubREL Source # 
Instance details

Defined in Network.MQTT.Arbitrary

ByteMe PubREL Source # 
Instance details

Defined in Network.MQTT.Types

data PubCOMP Source #

Constructors

PubCOMP PktID Word8 [Property] 

Instances

Instances details
Eq PubCOMP Source # 
Instance details

Defined in Network.MQTT.Types

Methods

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

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

Show PubCOMP Source # 
Instance details

Defined in Network.MQTT.Types

Arbitrary PubCOMP Source # 
Instance details

Defined in Network.MQTT.Arbitrary

ByteMe PubCOMP Source # 
Instance details

Defined in Network.MQTT.Types

data ProtocolLevel Source #

MQTT Protocol Levels

Constructors

Protocol311

MQTT 3.1.1

Protocol50

MQTT 5.0

data Property Source #

Property represents the various MQTT Properties that may sent or received along with packets in MQTT 5. For detailed use on when and where to use them, consult with the MQTT 5.0 spec.

Instances

Instances details
Eq Property Source # 
Instance details

Defined in Network.MQTT.Types

Show Property Source # 
Instance details

Defined in Network.MQTT.Types

Arbitrary Property Source # 
Instance details

Defined in Network.MQTT.Arbitrary

ByteMe Property Source # 
Instance details

Defined in Network.MQTT.Types

data SubOptions Source #

Options used at subscribe time to define how to handle incoming messages.

Constructors

SubOptions 

Fields

Instances

Instances details
Eq SubOptions Source # 
Instance details

Defined in Network.MQTT.Types

Show SubOptions Source # 
Instance details

Defined in Network.MQTT.Types

Arbitrary SubOptions Source # 
Instance details

Defined in Network.MQTT.Arbitrary

ByteMe SubOptions Source # 
Instance details

Defined in Network.MQTT.Types

subOptions :: SubOptions Source #

Reasonable subscription option defaults at QoS0.

data RetainHandling Source #

How to process retained messages on subscriptions.

Constructors

SendOnSubscribe

Send existing retained messages to a new client.

SendOnSubscribeNew

Send existing retained messages that have not yet been sent.

DoNotSendOnSubscribe

Don't send existing retained messages.

data UnsubStatus Source #

data DiscoReason Source #

class ByteMe a where Source #

Minimal complete definition

Nothing

Instances

Instances details
ByteMe ByteString Source # 
Instance details

Defined in Network.MQTT.Types

ByteMe DisconnectRequest Source # 
Instance details

Defined in Network.MQTT.Types

ByteMe AuthRequest Source # 
Instance details

Defined in Network.MQTT.Types

ByteMe UnsubscribeResponse Source # 
Instance details

Defined in Network.MQTT.Types

ByteMe UnsubStatus Source # 
Instance details

Defined in Network.MQTT.Types

ByteMe UnsubscribeRequest Source # 
Instance details

Defined in Network.MQTT.Types

ByteMe SubscribeResponse Source # 
Instance details

Defined in Network.MQTT.Types

ByteMe PubCOMP Source # 
Instance details

Defined in Network.MQTT.Types

ByteMe PubREL Source # 
Instance details

Defined in Network.MQTT.Types

ByteMe PubREC Source # 
Instance details

Defined in Network.MQTT.Types

ByteMe PubACK Source # 
Instance details

Defined in Network.MQTT.Types

ByteMe SubscribeRequest Source # 
Instance details

Defined in Network.MQTT.Types

ByteMe SubOptions Source # 
Instance details

Defined in Network.MQTT.Types

ByteMe PublishRequest Source # 
Instance details

Defined in Network.MQTT.Types

ByteMe ConnACKFlags Source # 
Instance details

Defined in Network.MQTT.Types

ByteMe MQTTPkt Source # 
Instance details

Defined in Network.MQTT.Types

ByteMe ConnectRequest Source # 
Instance details

Defined in Network.MQTT.Types

ByteMe ProtocolLevel Source # 
Instance details

Defined in Network.MQTT.Types

ByteMe Property Source # 
Instance details

Defined in Network.MQTT.Types

parseConnect :: Parser MQTTPkt Source #

Parse a CONNect packet. This is useful when examining the beginning of the stream as it allows you to determine the protocol being used throughout the rest of the session.

class ByteSize a where Source #

Methods

toByte :: a -> Word8 Source #

fromByte :: Word8 -> a Source #

Instances

Instances details
ByteSize DiscoReason Source # 
Instance details

Defined in Network.MQTT.Types

ByteSize ConnACKRC Source # 
Instance details

Defined in Network.MQTT.Types