Package spade :: Module Behaviour :: Class FSMBehaviour
[hide private]
[frames] | no frames]

Class FSMBehaviour

source code


this behavior is executed according to a Finite State Machine

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
setAgent(self, agent)
sets the parent agent
source code
 
registerState(self, behaviour, name)
registers a state with a behavior
source code
 
registerFirstState(self, behaviour, name)
sets the first state of the fsm
source code
 
registerLastState(self, behaviour, name)
sets the final state of the fsm
source code
 
registerTransition(self, fromname, toname, event)
registers a transition between two states
source code
 
getState(self, name) source code
 
exitCode(self)
returns the default exit code for the behavior
source code
 
done(self)
returns True if the behavior has finished else returns False
source code
 
_transitionTo(self, newState) source code
 
_process(self)
main loop must be overridden
source code
 
getCurrentState(self) source code

Inherited from Behaviour: getAgent, getParent, kill, managePresence, onEnd, onStart, registerPresenceHandler, root, run, setParent, setTemplate

Inherited from MessageReceiver.MessageReceiver: postMessage

Inherited from MessageReceiver.MessageReceiver (private): _receive

Inherited from threading.Thread: __repr__, getName, isAlive, isDaemon, is_alive, join, setDaemon, setName, start

Inherited from threading.Thread (private): _reset_internal_locks, _set_daemon, _set_ident

Inherited from threading._Verbose (private): _note

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]

Inherited from Behaviour (private): _exitcode

Properties [hide private]

Inherited from threading.Thread: daemon, ident, name

Inherited from threading.Thread (private): _block

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

setAgent(self, agent)

source code 

sets the parent agent

Overrides: Behaviour.setAgent

exitCode(self)

source code 

returns the default exit code for the behavior

Overrides: Behaviour.exitCode
(inherited documentation)

done(self)

source code 

returns True if the behavior has finished else returns False

Overrides: Behaviour.done
(inherited documentation)

_process(self)

source code 

main loop must be overridden

Overrides: Behaviour._process
(inherited documentation)