Closed bmegli closed 7 years ago
States:
IDLE
, DISCONNECTED
, CONNECTING
, CONNECTED
Transitions:
DISCONNECTED
-> CONNECTING
-> CONNECTED
CONNECTING
| CONNECTED
-> DISCONNECTED
(transient failures)
CONNECTING
| CONNECTED
-> IDLE
(connecting failed/connection lost, disconnect on request)
Properties:
LastSeen
(time since last successful message received or written to)
States (like modules):
OFFLINE
, INITIALIZING
, ONLINE
, SHUTDOWN
, FAILED
Control OFFLINE
Autostart
enabled and TCPClient DISCONNECTED
start connecting (TCPClient -> CONNECTING
, Control -> INITIALIZING
)IDLE
or autostart disabled on user intervention Control
-> INITIALIZING
, start connecting, TCPClient
-> CONNECTING
Control INITIALIZING
Autostart
enabled and TCPClient DISCONNECTED
start connecting (TCPClient -> CONNECTING
, Control -> INITIALIZING
)IDLE
Control -> FAILED
CONNECTED
enable modules with Autostart (send ENABLE) and Control -> ONLINE
Control ONLINE
IDLE
Control -> FAILED
SHUTDOWN
ENABLED
, DISABLED
, FAILED
)CONNECTED
and LastSeen
> defined send KEEPALIVE
messageControl SHUTDOWN
ENABLED
state Control -> OFFLINE
, disconnect, TCPClient -> IDLE
Control FAILED
Control
-> INITIALIZING
, start connecting, TCPClient
-> CONNECTING
When stopping ev3dev-mapping-ui:
ONLINE
send DISABLE_ALL
message, disconnect, Control -> SHUTDOWN, TCPClient -> IDLEINITIALIZING
,canel connection,, Control -> SHUTDOWN, TCPClient -> IDLEIDLE
This is currently implemented with UDP.
The TCP/IP protocol is defined in bmegli/ev3dev-mapping#5