Last active
February 12, 2019 21:25
-
-
Save kamalmarhubi/684517fdc06b2d916a1cd589ede9f4cc to your computer and use it in GitHub Desktop.
Unpaired
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unpaired | |
connectionTimeout -> InitialState | |
connectionError -> InitialState | |
protocolError -> InitialState | |
pairingTimeout -> InitialState | |
InitialState* | |
deviceInitiate -> PendingServerPairingAck | |
PendingServerPairingAck | |
serverAck -> PendingClientConfirmation | |
PendingClientConfirmation | |
deviceConfirm -> PairedAndDisconnected | |
deviceDeny -> InitialState | |
Paired | |
deviceTerminateSession -> InitialState | |
sessionTimeout -> InitialState | |
connectionError -> PairedAndDisconnected | |
connectionTimeout -> PairedAndDisconnected | |
protocolError -> PairedAndDisconnected | |
PairedAndDisconnected | |
deviceConnect -> PendingServerAck | |
PendingServerAck | |
serverAck -> Idle | |
Connected | |
Idle | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function render(model){ | |
let current_state_name = model.active_states[0].name; | |
return $("h1",Spec (See tutorial) | |
1 | |
Unpaired | |
2 | |
connectionError -> InitialState | |
3 | |
protocolError -> InitialState | |
4 | |
pairingTimeout -> InitialState | |
5 | |
connectionTimeout -> InitialState | |
6 | |
InitialState* | |
7 | |
deviceInitiate -> PendingServerPairingAck | |
8 | |
PendingServerPairingAck | |
9 | |
serverAck -> PendingClientConfirmation | |
10 | |
PendingClientConfirmation | |
11 | |
deviceConfirm -> PairedAndDisconnected | |
12 | |
| |
13 | |
Paired | |
14 | |
connectionError -> PairedAndDisconnected | |
15 | |
connectionTimeout -> PairedAndDisconnected | |
16 | |
protocolError -> PairedAndDisconnected | |
17 | |
sessionTimeout -> InitialState | |
18 | |
19 | |
PairedAndDisconnected | |
20 | |
deviceConnect -> PendingServerAck | |
21 | |
PendingServerAck | |
22 | |
serverAck -> Idle | |
23 | |
| |
24 | |
Connected | |
25 | |
Idle | |
26 | |
27 | |
| |
Diagram | |
Unpaired | |
connectionError → InitialState | |
protocolError → InitialState | |
pairingTimeout → InitialState | |
connectionTimeout → InitialState | |
InitialState | |
deviceInitiate → PendingServerPairingAck | |
PendingServerPairingAck | |
serverAck → PendingClientConfirmation | |
PendingClientConfirmation | |
deviceConfirm → PairedAndDisconnected | |
Paired | |
connectionError → PairedAndDisconnected | |
connectionTimeout → PairedAndDisconnected | |
protocolError → PairedAndDisconnected | |
sessionTimeout → InitialState | |
PairedAndDisconnected | |
deviceConnect → PendingServerAck | |
PendingServerAck | |
serverAck → Idle | |
Connected | |
Idle | |
{style: {color: "darkBlue"}}, | |
`The current state is: ${current_state_name}`); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment