Home   :   Other Stuff   :   xUML in Second Life   :   Pong Sending State

 

The Pong Sending State Actions

 

When the "go" signal arrives at myPong's Event Pool it is immediately consumed by the Pong State Machine.

The signal causes a transition from the "Activate" state to the "Sending" state.  The first action in the "Sending" state is executed:

 

myPing = this -> R1

 

This navigates the association to get a handle to myPing so that a signal can be sent to the instance in the next statement:

 

generate PIG1:go() to myPing

Next, a self directed signal is generated to make the State Machine "move" to the "Waiting" state:

 

generate POG1:wait() to this

 

Finally, for the "Sending" state, a message is displayed via a Domain Operation:

 

[] = PP1::outputString["PONG_PINGED"]

 

When the "Sending" state completes, the "wait" transition will take place.  This puts the State Machine into the "Waiting" state, where it sits in a dormant state until either a "go" signal or a "die" signal is sent from the related Pong instance.

If a "go" signal is received, the State Machine re-enters the "Sending" state.  Alternatively, if the "die" signal is received it "moves" to the final "Terminated" state where a message to that effect is displayed.

When both State Machines enter and complete their "Terminated" states, that is the end of the demonstration.

Copyright 2017 Dark Matter Systems Ltd. All Rights Reserved.