StatechartObserver

Observer hook for a Statechart. Fires on every state entry, state exit, and completed transition. Used by AgentPerformance to gather statechart-state statistics (time-in-state, entry counts, transition counts).

Default methods are no-ops.

Functions

Link copied to clipboard
open fun onStateEntered(stateName: String, time: Double)

Fires after entry actions have run for the entered state.

Link copied to clipboard
open fun onStateExited(stateName: String, time: Double)

Fires after exit actions have run for the exited state.

Link copied to clipboard
open fun onTransition(fromState: String, toState: String, time: Double)

Fires once per completed transition, after both exit actions of fromState and entry actions of toState have run. A self-transition (transitionTo current state) still counts.