packages feed

haal-models-0.1.3.0: src/Haal/Models/MQTT/MosquittoTwoClientWillRetain.hs

-- Generated by haal-gen. Do not edit manually.
module Haal.Models.MQTT.MosquittoTwoClientWillRetain
    ( MosquittoTwoClientWillRetainInput (..)
    , MosquittoTwoClientWillRetainOutput (..)
    , mosquittoTwoClientWillRetain
    ) where

import Haal.Automaton.MealyAutomaton (MealyAutomaton, mkMealyAutomatonTable)

data MosquittoTwoClientWillRetainInput
    = In_ConnectC2
    | In_ConnectC1WithWill
    | In_ConnectC1WithWillRetain
    | In_DeleteRetainedC1
    | In_DeleteRetainedC2
    | In_SubscribeC2
    | In_UnSubScribeC2
    | In_DisconnectTCPC1
    | In_DisconnectC1
    deriving (Show, Eq, Ord, Enum, Bounded)

data MosquittoTwoClientWillRetainOutput
    = Out_C1_ConnectionClosed__c2_ConnAck
    | Out_C1_ConnAck__c2_ConnectionClosed
    | Out_C1_ConnectionClosed__c2_ConnectionClosed
    | Out_C1_ConnAck__Empty
    | Out_C1_ConnectionClosed__Empty
    | Out_C1_ConnectionClosed__c2_PubAck
    | Out_C1_ConnectionClosed__c2_SubAck
    | Out_C1_ConnectionClosed__c2_UnSubAck
    | Out_Empty__c2_ConnectionClosed
    | Out_C1_PubAck__Empty
    | Out_Empty__c2_PubAck
    | Out_Empty__c2_SubAck
    | Out_Empty__c2_UnSubAck
    | Out_Empty__c2_ConnAck
    | Out_C1_PubAck__c2_ConnectionClosed
    | Out_C1_ConnectionClosed__Pub_c2_my_topic____c2_PubAck
    | Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
    | Out_C1_PubAck__Pub_c2_my_topic
    | Out_Empty__Pub_c2_my_topic____c2_PubAck
    | Out_C1_ConnectionClosed__c2_SubAck__Pub_c2_my_topic_bye
    | Out_Empty__c2_SubAck__Pub_c2_my_topic_bye
    deriving (Show, Eq, Ord, Enum, Bounded)

{- Transitions (state  input -> next state / output):
    0     In_ConnectC2                -> 1 / Out_C1_ConnectionClosed__c2_ConnAck
          In_ConnectC1WithWill        -> 2 / Out_C1_ConnAck__c2_ConnectionClosed
          In_ConnectC1WithWillRetain  -> 3 / Out_C1_ConnAck__c2_ConnectionClosed
          In_DeleteRetainedC1         -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_DeleteRetainedC2         -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_SubscribeC2              -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_UnSubScribeC2            -> 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                -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 4 / Out_C1_ConnAck__Empty
          In_ConnectC1WithWillRetain  -> 5 / Out_C1_ConnAck__Empty
          In_DeleteRetainedC1         -> 1 / Out_C1_ConnectionClosed__Empty
          In_DeleteRetainedC2         -> 1 / Out_C1_ConnectionClosed__c2_PubAck
          In_SubscribeC2              -> 6 / Out_C1_ConnectionClosed__c2_SubAck
          In_UnSubScribeC2            -> 1 / Out_C1_ConnectionClosed__c2_UnSubAck
          In_DisconnectTCPC1          -> 1 / Out_C1_ConnectionClosed__Empty
          In_DisconnectC1             -> 1 / Out_C1_ConnectionClosed__Empty
    2     In_ConnectC2                -> 4 / Out_Empty__c2_ConnAck
          In_ConnectC1WithWill        -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_ConnectC1WithWillRetain  -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_DeleteRetainedC1         -> 2 / Out_C1_PubAck__c2_ConnectionClosed
          In_DeleteRetainedC2         -> 2 / Out_Empty__c2_ConnectionClosed
          In_SubscribeC2              -> 2 / Out_Empty__c2_ConnectionClosed
          In_UnSubScribeC2            -> 2 / Out_Empty__c2_ConnectionClosed
          In_DisconnectTCPC1          -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_DisconnectC1             -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
    3     In_ConnectC2                -> 5 / Out_Empty__c2_ConnAck
          In_ConnectC1WithWill        -> 11 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_ConnectC1WithWillRetain  -> 11 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_DeleteRetainedC1         -> 3 / Out_C1_PubAck__c2_ConnectionClosed
          In_DeleteRetainedC2         -> 3 / Out_Empty__c2_ConnectionClosed
          In_SubscribeC2              -> 3 / Out_Empty__c2_ConnectionClosed
          In_UnSubScribeC2            -> 3 / Out_Empty__c2_ConnectionClosed
          In_DisconnectTCPC1          -> 11 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_DisconnectC1             -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
    4     In_ConnectC2                -> 2 / Out_Empty__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 1 / Out_C1_ConnectionClosed__Empty
          In_ConnectC1WithWillRetain  -> 1 / Out_C1_ConnectionClosed__Empty
          In_DeleteRetainedC1         -> 4 / Out_C1_PubAck__Empty
          In_DeleteRetainedC2         -> 4 / Out_Empty__c2_PubAck
          In_SubscribeC2              -> 7 / Out_Empty__c2_SubAck
          In_UnSubScribeC2            -> 4 / Out_Empty__c2_UnSubAck
          In_DisconnectTCPC1          -> 1 / Out_C1_ConnectionClosed__Empty
          In_DisconnectC1             -> 1 / Out_C1_ConnectionClosed__Empty
    5     In_ConnectC2                -> 3 / Out_Empty__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 10 / Out_C1_ConnectionClosed__Empty
          In_ConnectC1WithWillRetain  -> 10 / Out_C1_ConnectionClosed__Empty
          In_DeleteRetainedC1         -> 5 / Out_C1_PubAck__Empty
          In_DeleteRetainedC2         -> 5 / Out_Empty__c2_PubAck
          In_SubscribeC2              -> 8 / Out_Empty__c2_SubAck
          In_UnSubScribeC2            -> 5 / Out_Empty__c2_UnSubAck
          In_DisconnectTCPC1          -> 10 / Out_C1_ConnectionClosed__Empty
          In_DisconnectC1             -> 1 / Out_C1_ConnectionClosed__Empty
    6     In_ConnectC2                -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 7 / Out_C1_ConnAck__Empty
          In_ConnectC1WithWillRetain  -> 8 / Out_C1_ConnAck__Empty
          In_DeleteRetainedC1         -> 6 / Out_C1_ConnectionClosed__Empty
          In_DeleteRetainedC2         -> 6 / Out_C1_ConnectionClosed__Pub_c2_my_topic____c2_PubAck
          In_SubscribeC2              -> 6 / Out_C1_ConnectionClosed__c2_SubAck
          In_UnSubScribeC2            -> 1 / Out_C1_ConnectionClosed__c2_UnSubAck
          In_DisconnectTCPC1          -> 6 / Out_C1_ConnectionClosed__Empty
          In_DisconnectC1             -> 6 / Out_C1_ConnectionClosed__Empty
    7     In_ConnectC2                -> 2 / Out_Empty__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 6 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_ConnectC1WithWillRetain  -> 6 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_DeleteRetainedC1         -> 7 / Out_C1_PubAck__Pub_c2_my_topic
          In_DeleteRetainedC2         -> 7 / Out_Empty__Pub_c2_my_topic____c2_PubAck
          In_SubscribeC2              -> 7 / Out_Empty__c2_SubAck
          In_UnSubScribeC2            -> 4 / Out_Empty__c2_UnSubAck
          In_DisconnectTCPC1          -> 6 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_DisconnectC1             -> 6 / Out_C1_ConnectionClosed__Empty
    8     In_ConnectC2                -> 3 / Out_Empty__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 9 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_ConnectC1WithWillRetain  -> 9 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_DeleteRetainedC1         -> 8 / Out_C1_PubAck__Pub_c2_my_topic
          In_DeleteRetainedC2         -> 8 / Out_Empty__Pub_c2_my_topic____c2_PubAck
          In_SubscribeC2              -> 8 / Out_Empty__c2_SubAck
          In_UnSubScribeC2            -> 5 / Out_Empty__c2_UnSubAck
          In_DisconnectTCPC1          -> 9 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_DisconnectC1             -> 6 / Out_C1_ConnectionClosed__Empty
    9     In_ConnectC2                -> 11 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 16 / Out_C1_ConnAck__Empty
          In_ConnectC1WithWillRetain  -> 17 / Out_C1_ConnAck__Empty
          In_DeleteRetainedC1         -> 9 / Out_C1_ConnectionClosed__Empty
          In_DeleteRetainedC2         -> 6 / Out_C1_ConnectionClosed__Pub_c2_my_topic____c2_PubAck
          In_SubscribeC2              -> 9 / Out_C1_ConnectionClosed__c2_SubAck__Pub_c2_my_topic_bye
          In_UnSubScribeC2            -> 10 / Out_C1_ConnectionClosed__c2_UnSubAck
          In_DisconnectTCPC1          -> 9 / Out_C1_ConnectionClosed__Empty
          In_DisconnectC1             -> 9 / Out_C1_ConnectionClosed__Empty
    10    In_ConnectC2                -> 11 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 14 / Out_C1_ConnAck__Empty
          In_ConnectC1WithWillRetain  -> 15 / Out_C1_ConnAck__Empty
          In_DeleteRetainedC1         -> 10 / Out_C1_ConnectionClosed__Empty
          In_DeleteRetainedC2         -> 1 / Out_C1_ConnectionClosed__c2_PubAck
          In_SubscribeC2              -> 9 / Out_C1_ConnectionClosed__c2_SubAck__Pub_c2_my_topic_bye
          In_UnSubScribeC2            -> 10 / Out_C1_ConnectionClosed__c2_UnSubAck
          In_DisconnectTCPC1          -> 10 / Out_C1_ConnectionClosed__Empty
          In_DisconnectC1             -> 10 / Out_C1_ConnectionClosed__Empty
    11    In_ConnectC2                -> 10 / Out_C1_ConnectionClosed__c2_ConnAck
          In_ConnectC1WithWill        -> 12 / Out_C1_ConnAck__c2_ConnectionClosed
          In_ConnectC1WithWillRetain  -> 13 / Out_C1_ConnAck__c2_ConnectionClosed
          In_DeleteRetainedC1         -> 11 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_DeleteRetainedC2         -> 11 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_SubscribeC2              -> 11 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_UnSubScribeC2            -> 11 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_DisconnectTCPC1          -> 11 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_DisconnectC1             -> 11 / Out_C1_ConnectionClosed__c2_ConnectionClosed
    12    In_ConnectC2                -> 14 / Out_Empty__c2_ConnAck
          In_ConnectC1WithWill        -> 11 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_ConnectC1WithWillRetain  -> 11 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_DeleteRetainedC1         -> 2 / Out_C1_PubAck__c2_ConnectionClosed
          In_DeleteRetainedC2         -> 12 / Out_Empty__c2_ConnectionClosed
          In_SubscribeC2              -> 12 / Out_Empty__c2_ConnectionClosed
          In_UnSubScribeC2            -> 12 / Out_Empty__c2_ConnectionClosed
          In_DisconnectTCPC1          -> 11 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_DisconnectC1             -> 11 / Out_C1_ConnectionClosed__c2_ConnectionClosed
    13    In_ConnectC2                -> 15 / Out_Empty__c2_ConnAck
          In_ConnectC1WithWill        -> 11 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_ConnectC1WithWillRetain  -> 11 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_DeleteRetainedC1         -> 3 / Out_C1_PubAck__c2_ConnectionClosed
          In_DeleteRetainedC2         -> 13 / Out_Empty__c2_ConnectionClosed
          In_SubscribeC2              -> 13 / Out_Empty__c2_ConnectionClosed
          In_UnSubScribeC2            -> 13 / Out_Empty__c2_ConnectionClosed
          In_DisconnectTCPC1          -> 11 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_DisconnectC1             -> 11 / Out_C1_ConnectionClosed__c2_ConnectionClosed
    14    In_ConnectC2                -> 12 / Out_Empty__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 10 / Out_C1_ConnectionClosed__Empty
          In_ConnectC1WithWillRetain  -> 10 / Out_C1_ConnectionClosed__Empty
          In_DeleteRetainedC1         -> 4 / Out_C1_PubAck__Empty
          In_DeleteRetainedC2         -> 4 / Out_Empty__c2_PubAck
          In_SubscribeC2              -> 16 / Out_Empty__c2_SubAck__Pub_c2_my_topic_bye
          In_UnSubScribeC2            -> 14 / Out_Empty__c2_UnSubAck
          In_DisconnectTCPC1          -> 10 / Out_C1_ConnectionClosed__Empty
          In_DisconnectC1             -> 10 / Out_C1_ConnectionClosed__Empty
    15    In_ConnectC2                -> 13 / Out_Empty__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 10 / Out_C1_ConnectionClosed__Empty
          In_ConnectC1WithWillRetain  -> 10 / Out_C1_ConnectionClosed__Empty
          In_DeleteRetainedC1         -> 5 / Out_C1_PubAck__Empty
          In_DeleteRetainedC2         -> 5 / Out_Empty__c2_PubAck
          In_SubscribeC2              -> 17 / Out_Empty__c2_SubAck__Pub_c2_my_topic_bye
          In_UnSubScribeC2            -> 15 / Out_Empty__c2_UnSubAck
          In_DisconnectTCPC1          -> 10 / Out_C1_ConnectionClosed__Empty
          In_DisconnectC1             -> 10 / Out_C1_ConnectionClosed__Empty
    16    In_ConnectC2                -> 12 / Out_Empty__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 9 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_ConnectC1WithWillRetain  -> 9 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_DeleteRetainedC1         -> 7 / Out_C1_PubAck__Pub_c2_my_topic
          In_DeleteRetainedC2         -> 7 / Out_Empty__Pub_c2_my_topic____c2_PubAck
          In_SubscribeC2              -> 16 / Out_Empty__c2_SubAck__Pub_c2_my_topic_bye
          In_UnSubScribeC2            -> 14 / Out_Empty__c2_UnSubAck
          In_DisconnectTCPC1          -> 9 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_DisconnectC1             -> 9 / Out_C1_ConnectionClosed__Empty
    17    In_ConnectC2                -> 13 / Out_Empty__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 9 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_ConnectC1WithWillRetain  -> 9 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_DeleteRetainedC1         -> 8 / Out_C1_PubAck__Pub_c2_my_topic
          In_DeleteRetainedC2         -> 8 / Out_Empty__Pub_c2_my_topic____c2_PubAck
          In_SubscribeC2              -> 17 / Out_Empty__c2_SubAck__Pub_c2_my_topic_bye
          In_UnSubScribeC2            -> 15 / Out_Empty__c2_UnSubAck
          In_DisconnectTCPC1          -> 9 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_DisconnectC1             -> 9 / Out_C1_ConnectionClosed__Empty
-}
mosquittoTwoClientWillRetain :: MealyAutomaton Int MosquittoTwoClientWillRetainInput MosquittoTwoClientWillRetainOutput
mosquittoTwoClientWillRetain =
    case mkMealyAutomatonTable 18 0 deltaTable lambdaTable of
        Right m -> m
        Left err -> error ("haal-gen: invalid transition table: " ++ err)
  where
    deltaTable =
        "\1\2\3\0\0\0\0\0\0\
        \\0\4\5\1\1\6\1\1\1\
        \\4\0\0\2\2\2\2\0\0\
        \\5\11\11\3\3\3\3\11\0\
        \\2\1\1\4\4\7\4\1\1\
        \\3\10\10\5\5\8\5\10\1\
        \\0\7\8\6\6\6\1\6\6\
        \\2\6\6\7\7\7\4\6\6\
        \\3\9\9\8\8\8\5\9\6\
        \\11\16\17\9\6\9\10\9\9\
        \\11\14\15\10\1\9\10\10\10\
        \\10\12\13\11\11\11\11\11\11\
        \\14\11\11\2\12\12\12\11\11\
        \\15\11\11\3\13\13\13\11\11\
        \\12\10\10\4\4\16\14\10\10\
        \\13\10\10\5\5\17\15\10\10\
        \\12\9\9\7\7\16\14\9\9\
        \\13\9\9\8\8\17\15\9\9"
    lambdaTable =
        "\0\1\1\2\2\2\2\2\2\
        \\2\3\3\4\5\6\7\4\4\
        \\13\2\2\14\8\8\8\2\2\
        \\13\2\2\14\8\8\8\2\2\
        \\8\4\4\9\10\11\12\4\4\
        \\8\4\4\9\10\11\12\4\4\
        \\2\3\3\4\15\6\7\4\4\
        \\8\16\16\17\18\11\12\16\4\
        \\8\16\16\17\18\11\12\16\4\
        \\2\3\3\4\15\19\7\4\4\
        \\2\3\3\4\5\19\7\4\4\
        \\0\1\1\2\2\2\2\2\2\
        \\13\2\2\14\8\8\8\2\2\
        \\13\2\2\14\8\8\8\2\2\
        \\8\4\4\9\10\20\12\4\4\
        \\8\4\4\9\10\20\12\4\4\
        \\8\16\16\17\18\20\12\16\4\
        \\8\16\16\17\18\20\12\16\4"