packages feed

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

-- Generated by haal-gen. Do not edit manually.
module Haal.Models.MQTT.EmqttTwoClientWillRetain
    ( EmqttTwoClientWillRetainInput (..)
    , EmqttTwoClientWillRetainOutput (..)
    , emqttTwoClientWillRetain
    ) where

import Haal.Automaton.MealyAutomaton (MealyAutomaton, mkMealyAutomatonTable)

data EmqttTwoClientWillRetainInput
    = 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 EmqttTwoClientWillRetainOutput
    = Out_C1_ConnectionClosed__c2_ConnAck
    | Out_C1_ConnAck__c2_ConnectionClosed
    | Out_C1_ConnectionClosed__c2_ConnectionClosed
    | Out_Empty__c2_ConnAck
    | Out_C1_PubAck__c2_ConnectionClosed
    | Out_Empty__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_C1_PubAck__Empty
    | Out_Empty__c2_PubAck
    | Out_Empty__c2_SubAck
    | Out_Empty__c2_UnSubAck
    | Out_C1_ConnectionClosed__c2_SubAck__Pub_c2_my_topic_bye
    | 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_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        -> 6 / Out_C1_ConnAck__Empty
          In_ConnectC1WithWillRetain  -> 4 / Out_C1_ConnAck__Empty
          In_DeleteRetainedC1         -> 1 / Out_C1_ConnectionClosed__Empty
          In_DeleteRetainedC2         -> 1 / Out_C1_ConnectionClosed__c2_PubAck
          In_SubscribeC2              -> 7 / 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                -> 6 / 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                -> 4 / Out_Empty__c2_ConnAck
          In_ConnectC1WithWill        -> 5 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_ConnectC1WithWillRetain  -> 5 / 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          -> 5 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_DisconnectC1             -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
    4     In_ConnectC2                -> 3 / Out_Empty__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 8 / Out_C1_ConnectionClosed__Empty
          In_ConnectC1WithWillRetain  -> 8 / Out_C1_ConnectionClosed__Empty
          In_DeleteRetainedC1         -> 4 / Out_C1_PubAck__Empty
          In_DeleteRetainedC2         -> 4 / Out_Empty__c2_PubAck
          In_SubscribeC2              -> 9 / Out_Empty__c2_SubAck
          In_UnSubScribeC2            -> 4 / Out_Empty__c2_UnSubAck
          In_DisconnectTCPC1          -> 8 / Out_C1_ConnectionClosed__Empty
          In_DisconnectC1             -> 1 / Out_C1_ConnectionClosed__Empty
    5     In_ConnectC2                -> 8 / Out_C1_ConnectionClosed__c2_ConnAck
          In_ConnectC1WithWill        -> 14 / Out_C1_ConnAck__c2_ConnectionClosed
          In_ConnectC1WithWillRetain  -> 15 / Out_C1_ConnAck__c2_ConnectionClosed
          In_DeleteRetainedC1         -> 5 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_DeleteRetainedC2         -> 5 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_SubscribeC2              -> 5 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_UnSubScribeC2            -> 5 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_DisconnectTCPC1          -> 5 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_DisconnectC1             -> 5 / Out_C1_ConnectionClosed__c2_ConnectionClosed
    6     In_ConnectC2                -> 2 / Out_Empty__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 1 / Out_C1_ConnectionClosed__Empty
          In_ConnectC1WithWillRetain  -> 1 / Out_C1_ConnectionClosed__Empty
          In_DeleteRetainedC1         -> 6 / Out_C1_PubAck__Empty
          In_DeleteRetainedC2         -> 6 / Out_Empty__c2_PubAck
          In_SubscribeC2              -> 13 / Out_Empty__c2_SubAck
          In_UnSubScribeC2            -> 6 / Out_Empty__c2_UnSubAck
          In_DisconnectTCPC1          -> 1 / Out_C1_ConnectionClosed__Empty
          In_DisconnectC1             -> 1 / Out_C1_ConnectionClosed__Empty
    7     In_ConnectC2                -> 0 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 13 / Out_C1_ConnAck__Empty
          In_ConnectC1WithWillRetain  -> 9 / Out_C1_ConnAck__Empty
          In_DeleteRetainedC1         -> 7 / Out_C1_ConnectionClosed__Empty
          In_DeleteRetainedC2         -> 7 / Out_C1_ConnectionClosed__Pub_c2_my_topic____c2_PubAck
          In_SubscribeC2              -> 7 / Out_C1_ConnectionClosed__c2_SubAck
          In_UnSubScribeC2            -> 1 / Out_C1_ConnectionClosed__c2_UnSubAck
          In_DisconnectTCPC1          -> 7 / Out_C1_ConnectionClosed__Empty
          In_DisconnectC1             -> 7 / Out_C1_ConnectionClosed__Empty
    8     In_ConnectC2                -> 5 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 10 / Out_C1_ConnAck__Empty
          In_ConnectC1WithWillRetain  -> 11 / Out_C1_ConnAck__Empty
          In_DeleteRetainedC1         -> 8 / Out_C1_ConnectionClosed__Empty
          In_DeleteRetainedC2         -> 1 / Out_C1_ConnectionClosed__c2_PubAck
          In_SubscribeC2              -> 12 / Out_C1_ConnectionClosed__c2_SubAck__Pub_c2_my_topic_bye
          In_UnSubScribeC2            -> 8 / Out_C1_ConnectionClosed__c2_UnSubAck
          In_DisconnectTCPC1          -> 8 / Out_C1_ConnectionClosed__Empty
          In_DisconnectC1             -> 8 / Out_C1_ConnectionClosed__Empty
    9     In_ConnectC2                -> 3 / Out_Empty__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 12 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_ConnectC1WithWillRetain  -> 12 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_DeleteRetainedC1         -> 9 / Out_C1_PubAck__Pub_c2_my_topic
          In_DeleteRetainedC2         -> 9 / Out_Empty__Pub_c2_my_topic____c2_PubAck
          In_SubscribeC2              -> 9 / Out_Empty__c2_SubAck
          In_UnSubScribeC2            -> 4 / Out_Empty__c2_UnSubAck
          In_DisconnectTCPC1          -> 12 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_DisconnectC1             -> 7 / Out_C1_ConnectionClosed__Empty
    10    In_ConnectC2                -> 14 / Out_Empty__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 8 / Out_C1_ConnectionClosed__Empty
          In_ConnectC1WithWillRetain  -> 8 / Out_C1_ConnectionClosed__Empty
          In_DeleteRetainedC1         -> 6 / Out_C1_PubAck__Empty
          In_DeleteRetainedC2         -> 6 / Out_Empty__c2_PubAck
          In_SubscribeC2              -> 17 / Out_Empty__c2_SubAck__Pub_c2_my_topic_bye
          In_UnSubScribeC2            -> 10 / Out_Empty__c2_UnSubAck
          In_DisconnectTCPC1          -> 8 / Out_C1_ConnectionClosed__Empty
          In_DisconnectC1             -> 8 / Out_C1_ConnectionClosed__Empty
    11    In_ConnectC2                -> 15 / Out_Empty__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 8 / Out_C1_ConnectionClosed__Empty
          In_ConnectC1WithWillRetain  -> 8 / 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            -> 11 / Out_Empty__c2_UnSubAck
          In_DisconnectTCPC1          -> 8 / Out_C1_ConnectionClosed__Empty
          In_DisconnectC1             -> 8 / Out_C1_ConnectionClosed__Empty
    12    In_ConnectC2                -> 5 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 17 / Out_C1_ConnAck__Empty
          In_ConnectC1WithWillRetain  -> 16 / Out_C1_ConnAck__Empty
          In_DeleteRetainedC1         -> 12 / Out_C1_ConnectionClosed__Empty
          In_DeleteRetainedC2         -> 7 / Out_C1_ConnectionClosed__Pub_c2_my_topic____c2_PubAck
          In_SubscribeC2              -> 12 / Out_C1_ConnectionClosed__c2_SubAck
          In_UnSubScribeC2            -> 8 / Out_C1_ConnectionClosed__c2_UnSubAck
          In_DisconnectTCPC1          -> 12 / Out_C1_ConnectionClosed__Empty
          In_DisconnectC1             -> 12 / Out_C1_ConnectionClosed__Empty
    13    In_ConnectC2                -> 2 / Out_Empty__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 7 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_ConnectC1WithWillRetain  -> 7 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_DeleteRetainedC1         -> 13 / Out_C1_PubAck__Pub_c2_my_topic
          In_DeleteRetainedC2         -> 13 / Out_Empty__Pub_c2_my_topic____c2_PubAck
          In_SubscribeC2              -> 13 / Out_Empty__c2_SubAck
          In_UnSubScribeC2            -> 6 / Out_Empty__c2_UnSubAck
          In_DisconnectTCPC1          -> 7 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_DisconnectC1             -> 7 / Out_C1_ConnectionClosed__Empty
    14    In_ConnectC2                -> 10 / Out_Empty__c2_ConnAck
          In_ConnectC1WithWill        -> 5 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_ConnectC1WithWillRetain  -> 5 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_DeleteRetainedC1         -> 2 / Out_C1_PubAck__c2_ConnectionClosed
          In_DeleteRetainedC2         -> 14 / Out_Empty__c2_ConnectionClosed
          In_SubscribeC2              -> 14 / Out_Empty__c2_ConnectionClosed
          In_UnSubScribeC2            -> 14 / Out_Empty__c2_ConnectionClosed
          In_DisconnectTCPC1          -> 5 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_DisconnectC1             -> 5 / Out_C1_ConnectionClosed__c2_ConnectionClosed
    15    In_ConnectC2                -> 11 / Out_Empty__c2_ConnAck
          In_ConnectC1WithWill        -> 5 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_ConnectC1WithWillRetain  -> 5 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_DeleteRetainedC1         -> 3 / Out_C1_PubAck__c2_ConnectionClosed
          In_DeleteRetainedC2         -> 15 / Out_Empty__c2_ConnectionClosed
          In_SubscribeC2              -> 15 / Out_Empty__c2_ConnectionClosed
          In_UnSubScribeC2            -> 15 / Out_Empty__c2_ConnectionClosed
          In_DisconnectTCPC1          -> 5 / Out_C1_ConnectionClosed__c2_ConnectionClosed
          In_DisconnectC1             -> 5 / Out_C1_ConnectionClosed__c2_ConnectionClosed
    16    In_ConnectC2                -> 15 / Out_Empty__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 12 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_ConnectC1WithWillRetain  -> 12 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_DeleteRetainedC1         -> 9 / Out_C1_PubAck__Pub_c2_my_topic
          In_DeleteRetainedC2         -> 9 / Out_Empty__Pub_c2_my_topic____c2_PubAck
          In_SubscribeC2              -> 16 / Out_Empty__c2_SubAck
          In_UnSubScribeC2            -> 11 / Out_Empty__c2_UnSubAck
          In_DisconnectTCPC1          -> 12 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_DisconnectC1             -> 12 / Out_C1_ConnectionClosed__Empty
    17    In_ConnectC2                -> 14 / Out_Empty__c2_ConnectionClosed
          In_ConnectC1WithWill        -> 12 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_ConnectC1WithWillRetain  -> 12 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_DeleteRetainedC1         -> 13 / Out_C1_PubAck__Pub_c2_my_topic
          In_DeleteRetainedC2         -> 13 / Out_Empty__Pub_c2_my_topic____c2_PubAck
          In_SubscribeC2              -> 17 / Out_Empty__c2_SubAck
          In_UnSubScribeC2            -> 10 / Out_Empty__c2_UnSubAck
          In_DisconnectTCPC1          -> 12 / Out_C1_ConnectionClosed__Pub_c2_my_topic_bye
          In_DisconnectC1             -> 12 / Out_C1_ConnectionClosed__Empty
-}
emqttTwoClientWillRetain :: MealyAutomaton Int EmqttTwoClientWillRetainInput EmqttTwoClientWillRetainOutput
emqttTwoClientWillRetain =
    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\6\4\1\1\7\1\1\1\
        \\6\0\0\2\2\2\2\0\0\
        \\4\5\5\3\3\3\3\5\0\
        \\3\8\8\4\4\9\4\8\1\
        \\8\14\15\5\5\5\5\5\5\
        \\2\1\1\6\6\13\6\1\1\
        \\0\13\9\7\7\7\1\7\7\
        \\5\10\11\8\1\12\8\8\8\
        \\3\12\12\9\9\9\4\12\7\
        \\14\8\8\6\6\17\10\8\8\
        \\15\8\8\4\4\16\11\8\8\
        \\5\17\16\12\7\12\8\12\12\
        \\2\7\7\13\13\13\6\7\7\
        \\10\5\5\2\14\14\14\5\5\
        \\11\5\5\3\15\15\15\5\5\
        \\15\12\12\9\9\16\11\12\12\
        \\14\12\12\13\13\17\10\12\12"
    lambdaTable =
        "\0\1\1\2\2\2\2\2\2\
        \\2\6\6\7\8\9\10\7\7\
        \\3\2\2\4\5\5\5\2\2\
        \\3\2\2\4\5\5\5\2\2\
        \\5\7\7\11\12\13\14\7\7\
        \\0\1\1\2\2\2\2\2\2\
        \\5\7\7\11\12\13\14\7\7\
        \\2\6\6\7\16\9\10\7\7\
        \\2\6\6\7\8\15\10\7\7\
        \\5\17\17\18\19\13\14\17\7\
        \\5\7\7\11\12\20\14\7\7\
        \\5\7\7\11\12\20\14\7\7\
        \\2\6\6\7\16\9\10\7\7\
        \\5\17\17\18\19\13\14\17\7\
        \\3\2\2\4\5\5\5\2\2\
        \\3\2\2\4\5\5\5\2\2\
        \\5\17\17\18\19\13\14\17\7\
        \\5\17\17\18\19\13\14\17\7"