File size: 3,257 Bytes
c3edc81 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
{
"states": [
"Initial_Connection",
"Service_Available",
"Connection_Closed",
"Posting_Allowed",
"Posting_Prohibited",
"Group_Selected",
"Article_Selected",
"Reading_Headers",
"Reading_Body",
"Posting_Article"
],
"initial_state": "Initial_Connection",
"final_states": [
"Connection_Closed"
],
"transitions": [
{
"from": "Initial_Connection",
"event": "Receive 200",
"action": "Set service available",
"to": "Service_Available"
},
{
"from": "Initial_Connection",
"event": "Receive 201",
"action": "Set posting prohibited",
"to": "Posting_Prohibited"
},
{
"from": "Initial_Connection",
"event": "Receive 502",
"action": "Close connection",
"to": "Connection_Closed"
},
{
"from": "Initial_Connection",
"event": "Receive 400",
"action": "Close connection",
"to": "Connection_Closed"
},
{
"from": "Service_Available",
"event": "MODE READER",
"action": "Switch to reader mode",
"to": "Posting_Allowed"
},
{
"from": "Posting_Prohibited",
"event": "MODE READER",
"action": "Switch to reader mode",
"to": "Posting_Allowed"
},
{
"from": "Posting_Allowed",
"event": "GROUP <group_name>",
"action": "Select newsgroup",
"to": "Group_Selected"
},
{
"from": "Group_Selected",
"event": "ARTICLE <article_id>",
"action": "Fetch article",
"to": "Article_Selected"
},
{
"from": "Group_Selected",
"event": "POST",
"action": "Start article posting",
"to": "Posting_Article"
},
{
"from": "Article_Selected",
"event": "HEAD <article_id>",
"action": "Read headers",
"to": "Reading_Headers"
},
{
"from": "Article_Selected",
"event": "BODY <article_id>",
"action": "Read body",
"to": "Reading_Body"
},
{
"from": "Reading_Headers",
"event": "QUIT",
"action": "Close connection",
"to": "Connection_Closed"
},
{
"from": "Reading_Body",
"event": "QUIT",
"action": "Close connection",
"to": "Connection_Closed"
},
{
"from": "Posting_Article",
"event": "Receive 240",
"action": "Article posted successfully",
"to": "Group_Selected"
},
{
"from": "Posting_Article",
"event": "Receive 441",
"action": "Posting failed",
"to": "Group_Selected"
},
{
"from": "Group_Selected",
"event": "QUIT",
"action": "Close connection",
"to": "Connection_Closed"
}
]
}
|