haal-models-0.1.3.0: src/Haal/Models/MQTT/MosquittoTwoClientSameId.hs
-- Generated by haal-gen. Do not edit manually.
module Haal.Models.MQTT.MosquittoTwoClientSameId
( MosquittoTwoClientSameIdInput (..)
, MosquittoTwoClientSameIdOutput (..)
, mosquittoTwoClientSameId
) where
import Haal.Automaton.MealyAutomaton (MealyAutomaton, mkMealyAutomatonTable)
data MosquittoTwoClientSameIdInput
= In_ConnectC2
| In_ConnectC1WithWill
| In_PublishC1
| In_PublishC2
| In_SubscribeC1
| In_UnSubScribeC1
| In_SubscribeC2
| In_UnSubScribeC2
| In_DisconnectC2
| In_DisconnectTCPC1
| In_DisconnectC1
deriving (Show, Eq, Ord, Enum, Bounded)
data MosquittoTwoClientSameIdOutput
= Out_C1_ConnectionClosed__ConnAckPacket_false_0
| Out_ConnAckPacket_false_0___c2_ConnectionClosed
| Out_C1_ConnectionClosed__c2_ConnectionClosed
| Out_C1_ConnectionClosed__Empty
| Out_C1_ConnectionClosed__c2_SubAck
| Out_C1_ConnectionClosed__c2_UnSubAck
| Out_C1_ConnectionClosed__ConnAckPacket_true_0
| Out_C1_PubAck__c2_ConnectionClosed
| Out_Empty__c2_ConnectionClosed
| Out_C1_SubAck__c2_ConnectionClosed
| Out_C1_UnSubAck__c2_ConnectionClosed
| Out_Pub_c1_my_topic_i_am_C1_0_notdub___c1_PubAck__c2_ConnectionClosed
| Out_C1_ConnectionClosed__Pub_c2_my_topic_i_am_C2_0_notdub
deriving (Show, Eq, Ord, Enum, Bounded)
{- Transitions (state input -> next state / output):
0 In_ConnectC2 -> 1 / Out_C1_ConnectionClosed__ConnAckPacket_false_0
In_ConnectC1WithWill -> 2 / Out_ConnAckPacket_false_0___c2_ConnectionClosed
In_PublishC1 -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_PublishC2 -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_SubscribeC1 -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_UnSubScribeC1 -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_SubscribeC2 -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_UnSubScribeC2 -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_DisconnectC2 -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_DisconnectTCPC1 -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_DisconnectC1 -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
1 In_ConnectC2 -> 3 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_ConnectC1WithWill -> 2 / Out_ConnAckPacket_false_0___c2_ConnectionClosed
In_PublishC1 -> 1 / Out_C1_ConnectionClosed__Empty
In_PublishC2 -> 1 / Out_C1_ConnectionClosed__Empty
In_SubscribeC1 -> 1 / Out_C1_ConnectionClosed__Empty
In_UnSubScribeC1 -> 1 / Out_C1_ConnectionClosed__Empty
In_SubscribeC2 -> 4 / Out_C1_ConnectionClosed__c2_SubAck
In_UnSubScribeC2 -> 1 / Out_C1_ConnectionClosed__c2_UnSubAck
In_DisconnectC2 -> 3 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_DisconnectTCPC1 -> 1 / Out_C1_ConnectionClosed__Empty
In_DisconnectC1 -> 1 / Out_C1_ConnectionClosed__Empty
2 In_ConnectC2 -> 1 / Out_C1_ConnectionClosed__ConnAckPacket_true_0
In_ConnectC1WithWill -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_PublishC1 -> 2 / Out_C1_PubAck__c2_ConnectionClosed
In_PublishC2 -> 2 / Out_Empty__c2_ConnectionClosed
In_SubscribeC1 -> 5 / Out_C1_SubAck__c2_ConnectionClosed
In_UnSubScribeC1 -> 2 / Out_C1_UnSubAck__c2_ConnectionClosed
In_SubscribeC2 -> 2 / Out_Empty__c2_ConnectionClosed
In_UnSubScribeC2 -> 2 / Out_Empty__c2_ConnectionClosed
In_DisconnectC2 -> 2 / Out_Empty__c2_ConnectionClosed
In_DisconnectTCPC1 -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_DisconnectC1 -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
3 In_ConnectC2 -> 1 / Out_C1_ConnectionClosed__ConnAckPacket_true_0
In_ConnectC1WithWill -> 2 / Out_ConnAckPacket_false_0___c2_ConnectionClosed
In_PublishC1 -> 3 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_PublishC2 -> 3 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_SubscribeC1 -> 3 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_UnSubScribeC1 -> 3 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_SubscribeC2 -> 3 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_UnSubScribeC2 -> 3 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_DisconnectC2 -> 3 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_DisconnectTCPC1 -> 3 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_DisconnectC1 -> 3 / Out_C1_ConnectionClosed__c2_ConnectionClosed
4 In_ConnectC2 -> 6 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_ConnectC1WithWill -> 2 / Out_ConnAckPacket_false_0___c2_ConnectionClosed
In_PublishC1 -> 4 / Out_C1_ConnectionClosed__Empty
In_PublishC2 -> 4 / Out_C1_ConnectionClosed__Pub_c2_my_topic_i_am_C2_0_notdub
In_SubscribeC1 -> 4 / Out_C1_ConnectionClosed__Empty
In_UnSubScribeC1 -> 4 / Out_C1_ConnectionClosed__Empty
In_SubscribeC2 -> 4 / Out_C1_ConnectionClosed__c2_SubAck
In_UnSubScribeC2 -> 1 / Out_C1_ConnectionClosed__c2_UnSubAck
In_DisconnectC2 -> 6 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_DisconnectTCPC1 -> 4 / Out_C1_ConnectionClosed__Empty
In_DisconnectC1 -> 4 / Out_C1_ConnectionClosed__Empty
5 In_ConnectC2 -> 1 / Out_C1_ConnectionClosed__ConnAckPacket_true_0
In_ConnectC1WithWill -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_PublishC1 -> 5 / Out_Pub_c1_my_topic_i_am_C1_0_notdub___c1_PubAck__c2_ConnectionClosed
In_PublishC2 -> 5 / Out_Empty__c2_ConnectionClosed
In_SubscribeC1 -> 5 / Out_C1_SubAck__c2_ConnectionClosed
In_UnSubScribeC1 -> 2 / Out_C1_UnSubAck__c2_ConnectionClosed
In_SubscribeC2 -> 5 / Out_Empty__c2_ConnectionClosed
In_UnSubScribeC2 -> 5 / Out_Empty__c2_ConnectionClosed
In_DisconnectC2 -> 5 / Out_Empty__c2_ConnectionClosed
In_DisconnectTCPC1 -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_DisconnectC1 -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
6 In_ConnectC2 -> 4 / Out_C1_ConnectionClosed__ConnAckPacket_true_0
In_ConnectC1WithWill -> 2 / Out_ConnAckPacket_false_0___c2_ConnectionClosed
In_PublishC1 -> 6 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_PublishC2 -> 6 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_SubscribeC1 -> 6 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_UnSubScribeC1 -> 6 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_SubscribeC2 -> 6 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_UnSubScribeC2 -> 6 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_DisconnectC2 -> 6 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_DisconnectTCPC1 -> 6 / Out_C1_ConnectionClosed__c2_ConnectionClosed
In_DisconnectC1 -> 6 / Out_C1_ConnectionClosed__c2_ConnectionClosed
-}
mosquittoTwoClientSameId :: MealyAutomaton Int MosquittoTwoClientSameIdInput MosquittoTwoClientSameIdOutput
mosquittoTwoClientSameId =
case mkMealyAutomatonTable 7 0 deltaTable lambdaTable of
Right m -> m
Left err -> error ("haal-gen: invalid transition table: " ++ err)
where
deltaTable =
"\1\2\0\0\0\0\0\0\0\0\0\
\\3\2\1\1\1\1\4\1\3\1\1\
\\1\0\2\2\5\2\2\2\2\0\0\
\\1\2\3\3\3\3\3\3\3\3\3\
\\6\2\4\4\4\4\4\1\6\4\4\
\\1\0\5\5\5\2\5\5\5\0\0\
\\4\2\6\6\6\6\6\6\6\6\6"
lambdaTable =
"\0\1\2\2\2\2\2\2\2\2\2\
\\2\1\3\3\3\3\4\5\2\3\3\
\\6\2\7\8\9\10\8\8\8\2\2\
\\6\1\2\2\2\2\2\2\2\2\2\
\\2\1\3\12\3\3\4\5\2\3\3\
\\6\2\11\8\9\10\8\8\8\2\2\
\\6\1\2\2\2\2\2\2\2\2\2"