haal-models-0.1.3.0: src/Haal/Models/MQTT/HbmqttSingleClient.hs
-- Generated by haal-gen. Do not edit manually.
module Haal.Models.MQTT.HbmqttSingleClient
( HbmqttSingleClientInput (..)
, HbmqttSingleClientOutput (..)
, hbmqttSingleClient
) where
import Haal.Automaton.MealyAutomaton (MealyAutomaton, mkMealyAutomatonTable)
data HbmqttSingleClientInput
= In_Connect
| In_PublishQoS0
| In_PublishQoS1
| In_PublishRetain
| In_DeleteRetained
| In_Subscribe
| In_UnSubScribe
| In_SubscribeRetained
| In_UnSubScribeRetained
| In_Disconnect
| In_DisconnectTCP
deriving (Show, Eq, Ord, Enum, Bounded)
data HbmqttSingleClientOutput
= Out_ConnAck
| Out_ConnectionClosed
| Out_Empty
| Out_PubAck
| Out_SubAck
| Out_UnSubAck
| Out_SubAck__Pub_my_topic_retained_retained_message
| Out_Pub_my_topic_messageQos0
| Out_Pub_my_topic_messageQos1___PubAck
| Out_Pub_my_topic_retained_retained_message___PubAck
| Out_Pub_my_topic_retained____PubAck
| Out_Pub_my_topic_retained_retained_message___Pub_my_topic_retained_retained_message___PubAck
| Out_Pub_my_topic_retained____Pub_my_topic_retained____PubAck
deriving (Show, Eq, Ord, Enum, Bounded)
{- Transitions (state input -> next state / output):
0 In_Connect -> 1 / Out_ConnAck
In_PublishQoS0 -> 0 / Out_ConnectionClosed
In_PublishQoS1 -> 0 / Out_ConnectionClosed
In_PublishRetain -> 0 / Out_ConnectionClosed
In_DeleteRetained -> 0 / Out_ConnectionClosed
In_Subscribe -> 0 / Out_ConnectionClosed
In_UnSubScribe -> 0 / Out_ConnectionClosed
In_SubscribeRetained -> 0 / Out_ConnectionClosed
In_UnSubScribeRetained -> 0 / Out_ConnectionClosed
In_Disconnect -> 0 / Out_ConnectionClosed
In_DisconnectTCP -> 0 / Out_ConnectionClosed
1 In_Connect -> 1 / Out_Empty
In_PublishQoS0 -> 1 / Out_Empty
In_PublishQoS1 -> 1 / Out_PubAck
In_PublishRetain -> 2 / Out_PubAck
In_DeleteRetained -> 1 / Out_PubAck
In_Subscribe -> 3 / Out_SubAck
In_UnSubScribe -> 1 / Out_UnSubAck
In_SubscribeRetained -> 4 / Out_SubAck
In_UnSubScribeRetained -> 1 / Out_UnSubAck
In_Disconnect -> 5 / Out_ConnectionClosed
In_DisconnectTCP -> 5 / Out_ConnectionClosed
2 In_Connect -> 2 / Out_Empty
In_PublishQoS0 -> 2 / Out_Empty
In_PublishQoS1 -> 2 / Out_PubAck
In_PublishRetain -> 2 / Out_PubAck
In_DeleteRetained -> 1 / Out_PubAck
In_Subscribe -> 6 / Out_SubAck__Pub_my_topic_retained_retained_message
In_UnSubScribe -> 2 / Out_UnSubAck
In_SubscribeRetained -> 7 / Out_SubAck__Pub_my_topic_retained_retained_message
In_UnSubScribeRetained -> 2 / Out_UnSubAck
In_Disconnect -> 5 / Out_ConnectionClosed
In_DisconnectTCP -> 5 / Out_ConnectionClosed
3 In_Connect -> 3 / Out_Empty
In_PublishQoS0 -> 3 / Out_Pub_my_topic_messageQos0
In_PublishQoS1 -> 3 / Out_Pub_my_topic_messageQos1___PubAck
In_PublishRetain -> 6 / Out_Pub_my_topic_retained_retained_message___PubAck
In_DeleteRetained -> 3 / Out_Pub_my_topic_retained____PubAck
In_Subscribe -> 3 / Out_SubAck
In_UnSubScribe -> 1 / Out_UnSubAck
In_SubscribeRetained -> 8 / Out_SubAck
In_UnSubScribeRetained -> 3 / Out_UnSubAck
In_Disconnect -> 5 / Out_ConnectionClosed
In_DisconnectTCP -> 5 / Out_ConnectionClosed
4 In_Connect -> 4 / Out_Empty
In_PublishQoS0 -> 4 / Out_Empty
In_PublishQoS1 -> 4 / Out_PubAck
In_PublishRetain -> 7 / Out_Pub_my_topic_retained_retained_message___PubAck
In_DeleteRetained -> 4 / Out_Pub_my_topic_retained____PubAck
In_Subscribe -> 8 / Out_SubAck
In_UnSubScribe -> 4 / Out_UnSubAck
In_SubscribeRetained -> 4 / Out_SubAck
In_UnSubScribeRetained -> 1 / Out_UnSubAck
In_Disconnect -> 5 / Out_ConnectionClosed
In_DisconnectTCP -> 5 / Out_ConnectionClosed
5 In_Connect -> 5 / Out_ConnectionClosed
In_PublishQoS0 -> 5 / Out_ConnectionClosed
In_PublishQoS1 -> 5 / Out_ConnectionClosed
In_PublishRetain -> 5 / Out_ConnectionClosed
In_DeleteRetained -> 5 / Out_ConnectionClosed
In_Subscribe -> 5 / Out_ConnectionClosed
In_UnSubScribe -> 5 / Out_ConnectionClosed
In_SubscribeRetained -> 5 / Out_ConnectionClosed
In_UnSubScribeRetained -> 5 / Out_ConnectionClosed
In_Disconnect -> 5 / Out_ConnectionClosed
In_DisconnectTCP -> 5 / Out_ConnectionClosed
6 In_Connect -> 6 / Out_Empty
In_PublishQoS0 -> 6 / Out_Pub_my_topic_messageQos0
In_PublishQoS1 -> 6 / Out_Pub_my_topic_messageQos1___PubAck
In_PublishRetain -> 6 / Out_Pub_my_topic_retained_retained_message___PubAck
In_DeleteRetained -> 3 / Out_Pub_my_topic_retained____PubAck
In_Subscribe -> 6 / Out_SubAck__Pub_my_topic_retained_retained_message
In_UnSubScribe -> 2 / Out_UnSubAck
In_SubscribeRetained -> 9 / Out_SubAck__Pub_my_topic_retained_retained_message
In_UnSubScribeRetained -> 6 / Out_UnSubAck
In_Disconnect -> 5 / Out_ConnectionClosed
In_DisconnectTCP -> 5 / Out_ConnectionClosed
7 In_Connect -> 7 / Out_Empty
In_PublishQoS0 -> 7 / Out_Empty
In_PublishQoS1 -> 7 / Out_PubAck
In_PublishRetain -> 7 / Out_Pub_my_topic_retained_retained_message___PubAck
In_DeleteRetained -> 4 / Out_Pub_my_topic_retained____PubAck
In_Subscribe -> 9 / Out_SubAck__Pub_my_topic_retained_retained_message
In_UnSubScribe -> 7 / Out_UnSubAck
In_SubscribeRetained -> 7 / Out_SubAck__Pub_my_topic_retained_retained_message
In_UnSubScribeRetained -> 2 / Out_UnSubAck
In_Disconnect -> 5 / Out_ConnectionClosed
In_DisconnectTCP -> 5 / Out_ConnectionClosed
8 In_Connect -> 8 / Out_Empty
In_PublishQoS0 -> 8 / Out_Pub_my_topic_messageQos0
In_PublishQoS1 -> 8 / Out_Pub_my_topic_messageQos1___PubAck
In_PublishRetain -> 9 / Out_Pub_my_topic_retained_retained_message___Pub_my_topic_retained_retained_message___PubAck
In_DeleteRetained -> 8 / Out_Pub_my_topic_retained____Pub_my_topic_retained____PubAck
In_Subscribe -> 8 / Out_SubAck
In_UnSubScribe -> 4 / Out_UnSubAck
In_SubscribeRetained -> 8 / Out_SubAck
In_UnSubScribeRetained -> 3 / Out_UnSubAck
In_Disconnect -> 5 / Out_ConnectionClosed
In_DisconnectTCP -> 5 / Out_ConnectionClosed
9 In_Connect -> 9 / Out_Empty
In_PublishQoS0 -> 9 / Out_Pub_my_topic_messageQos0
In_PublishQoS1 -> 9 / Out_Pub_my_topic_messageQos1___PubAck
In_PublishRetain -> 9 / Out_Pub_my_topic_retained_retained_message___Pub_my_topic_retained_retained_message___PubAck
In_DeleteRetained -> 8 / Out_Pub_my_topic_retained____Pub_my_topic_retained____PubAck
In_Subscribe -> 9 / Out_SubAck__Pub_my_topic_retained_retained_message
In_UnSubScribe -> 7 / Out_UnSubAck
In_SubscribeRetained -> 9 / Out_SubAck__Pub_my_topic_retained_retained_message
In_UnSubScribeRetained -> 6 / Out_UnSubAck
In_Disconnect -> 5 / Out_ConnectionClosed
In_DisconnectTCP -> 5 / Out_ConnectionClosed
-}
hbmqttSingleClient :: MealyAutomaton Int HbmqttSingleClientInput HbmqttSingleClientOutput
hbmqttSingleClient =
case mkMealyAutomatonTable 10 0 deltaTable lambdaTable of
Right m -> m
Left err -> error ("haal-gen: invalid transition table: " ++ err)
where
deltaTable =
"\1\0\0\0\0\0\0\0\0\0\0\
\\1\1\1\2\1\3\1\4\1\5\5\
\\2\2\2\2\1\6\2\7\2\5\5\
\\3\3\3\6\3\3\1\8\3\5\5\
\\4\4\4\7\4\8\4\4\1\5\5\
\\5\5\5\5\5\5\5\5\5\5\5\
\\6\6\6\6\3\6\2\9\6\5\5\
\\7\7\7\7\4\9\7\7\2\5\5\
\\8\8\8\9\8\8\4\8\3\5\5\
\\9\9\9\9\8\9\7\9\6\5\5"
lambdaTable =
"\0\1\1\1\1\1\1\1\1\1\1\
\\2\2\3\3\3\4\5\4\5\1\1\
\\2\2\3\3\3\6\5\6\5\1\1\
\\2\7\8\9\10\4\5\4\5\1\1\
\\2\2\3\9\10\4\5\4\5\1\1\
\\1\1\1\1\1\1\1\1\1\1\1\
\\2\7\8\9\10\6\5\6\5\1\1\
\\2\2\3\9\10\6\5\6\5\1\1\
\\2\7\8\11\12\4\5\4\5\1\1\
\\2\7\8\11\12\6\5\6\5\1\1"