Skip to content

Instantly share code, notes, and snippets.

@abp
Last active June 27, 2018 12:36
Show Gist options
  • Save abp/6a68e637c9ec366d424a6724017d9b2d to your computer and use it in GitHub Desktop.
Save abp/6a68e637c9ec366d424a6724017d9b2d to your computer and use it in GitHub Desktop.
Message Server
Message Server
Idle*
mobile message received -> Mobile client
display message received -> Display client
registration API called -> Register display
Register display
display registered -> Idle
# Respond with error
error occured -> Idle
Login message
display ID extracted -> Display checks login
# Send error message to mobile
display ID unknown -> Idle
Display Message
forwarded -> Display client
Mobile Message
forwarded -> Mobile client
Mobile
Mobile client
login sent -> Login message
interacted -> Display Message
Display
Display checks login
login accepted -> Mobile client
# Send error message to mobile
login rejected -> Idle
Display client
interaction rendered -> Idle
interaction replied to -> Mobile Message
function render(model){
// ${model.active_states[0].parent.name} to separate into sections
let active_state = model.active_states[0].name;
return $("h1",
{style: {color: "darkBlue"}},
`The current state is: ${active_state}`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment