forked from njh/NanodeMQTT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
internal-states.gv
30 lines (25 loc) · 1.19 KB
/
internal-states.gv
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
digraph NanodeMQTT {
MQTT_STATE_WAITING;
MQTT_STATE_CONNECTING;
MQTT_STATE_CONNECT_SENT;
MQTT_STATE_CONNECTED;
MQTT_STATE_PUBLISHING;
MQTT_STATE_SUBSCRIBING;
MQTT_STATE_SUBSCRIBE_SENT;
MQTT_STATE_PINGING;
MQTT_STATE_DISCONNECTING;
MQTT_STATE_DISCONNECTED;
MQTT_STATE_WAITING -> MQTT_STATE_CONNECTING [label="TCP Syn"];
MQTT_STATE_CONNECTING -> MQTT_STATE_CONNECT_SENT [label="TCP Ack"];
MQTT_STATE_CONNECT_SENT -> MQTT_STATE_CONNECTED [label="Receive CONNACK=0"];
MQTT_STATE_CONNECT_SENT -> MQTT_STATE_DISCONNECTED [label="Receive CONNACK!=0"];
MQTT_STATE_CONNECTED -> MQTT_STATE_PUBLISHING [label="publish()"];
MQTT_STATE_PUBLISHING -> MQTT_STATE_CONNECTED [label="TCP Ack"];
MQTT_STATE_CONNECTED -> MQTT_STATE_SUBSCRIBING [label="subscribe()"];
MQTT_STATE_SUBSCRIBING -> MQTT_STATE_SUBSCRIBE_SENT [label="TCP Ack"];
MQTT_STATE_SUBSCRIBE_SENT -> MQTT_STATE_CONNECTED [label="Receive SUBACK"];
MQTT_STATE_CONNECTED -> MQTT_STATE_PINGING [label="timer expire"];
MQTT_STATE_PINGING -> MQTT_STATE_CONNECTED [label="TCP Ack"];
MQTT_STATE_CONNECTED -> MQTT_STATE_DISCONNECTING [label="disconnect()"];
MQTT_STATE_DISCONNECTING -> MQTT_STATE_DISCONNECTED [label="TCP Ack"];
}