org.primordion.xholon.base
Interface IStateMachineEntity

All Superinterfaces:
IXholon
All Known Implementing Classes:
StateMachineEntity

public interface IStateMachineEntity
extends IXholon

A state machine entity is any XholonClass that has to do with state machines. These are identified by being subclasses of StateMachineEntity, and having an xhtype of XhtypeStateMachineEntityActive or XhtypeStateMachineEntity. These include XholonClasses such as State, Transition, Pseudostate, Activity, Trigger, etc.

Since:
0.1 (Created on Sep 25, 2005)
Author:
Ken Webb

Field Summary
 
Fields inherited from interface org.primordion.xholon.base.IXholon
DEFAULT_SIZE_MSG_Q, NINCLUDE_PSC, NINCLUDE_PSx, NINCLUDE_PxC, NINCLUDE_Pxx, NINCLUDE_xSC, NINCLUDE_xSx, NINCLUDE_xxC, NINCLUDE_xxx
 
Method Summary
 void doStateMachine(Message msg)
          Execute an instance of a state machine.
 int getActivityId()
          Return the activity ID of a transition.
 int getDoActivityId()
          Return the do activity ID of a state.
 int getEntryActivityId()
          Return the entry activity ID of a state.
 int getExitActivityId()
          Return the exit activity ID of a state.
 int getGuardActivityId()
          Return the guard activity ID of a transition.
 IXholon getOwningXholon()
          Return the Xholon that owns the state machine that this IStateMachineEntity is a part of.
 int getTrigger(int trigNum)
          Return a specified trigger for a transition.
 boolean isActiveSubState()
          Is this a currently active sub state of some other state or of the state machine as a whole?
 void notifyActiveSubStates()
          Notify the existence of all currently active sub states.
 
Methods inherited from interface org.primordion.xholon.base.IXholon
act, appendChild, appendChild, appendChild, cleanup, configure, configure, createStructure, decVal, decVal, depth, draw, getChildNodes, getFirstChild, getFirstSibling, getId, getLastChild, getLastSibling, getName, getNeighbors, getNextSibling, getNthChild, getNthSibling, getNumChildren, getNumSiblings, getParentNode, getPort, getPreviousSibling, getRoleName, getRootNode, getSiblings, getUid, getVal_boolean, getVal_byte, getVal_char, getVal_double, getVal_float, getVal_int, getVal_long, getVal_Object, getVal_short, getVal_String, getVal, getXhc, getXhcId, getXhcName, getXhType, handleNodeSelection, hasAncestor, hasChildNodes, hasChildOrSiblingNodes, hasNextSibling, hasParentNode, height, incVal, incVal, initialize, initStatics, inOrderPrint, insertAfter, insertBefore, insertFirstChild, isActiveObject, isBound, isContainer, isExternal, isInternal, isLeaf, isPassiveObject, isRootNode, performActivity, performActivity, performBooleanActivity, performBooleanActivity, performDoubleActivity, performGuard, performVoidActivity, postAct, postConfigure, postOrderPrint, postReconfigure, preAct, preConfigure, preOrderPrint, preReconfigure, print, println, processMessageQ, processReceivedMessage, reconfigure, remove, removeChild, sendMessage, sendMessage, sendMessage, setAttributeVal, setFirstChild, setId, setNextSibling, setParentChildLinks, setParentNode, setParentSiblingLinks, setPorts, setRoleName, setUid, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVariableValue, setXhc, swapNode, terminate, treeSize, writeXml
 

Method Detail

doStateMachine

public void doStateMachine(Message msg)
Execute an instance of a state machine.

Parameters:
msg - An incoming message that contains a signal, optional data, and that identifies the sender and receiver of the message.

getOwningXholon

public IXholon getOwningXholon()
Return the Xholon that owns the state machine that this IStateMachineEntity is a part of.

Returns:
An instance of IXholon.

getTrigger

public int getTrigger(int trigNum)
Return a specified trigger for a transition.

Parameters:
trigNum - The numeric id of the trigger.
Returns:
The value of the trigger.

getActivityId

public int getActivityId()
Return the activity ID of a transition.

Returns:
An activity ID.

getEntryActivityId

public int getEntryActivityId()
Return the entry activity ID of a state.

Returns:
An entry activity ID.

getExitActivityId

public int getExitActivityId()
Return the exit activity ID of a state.

Returns:
An exit activity ID.

getDoActivityId

public int getDoActivityId()
Return the do activity ID of a state.

Returns:
A do activity ID.

getGuardActivityId

public int getGuardActivityId()
Return the guard activity ID of a transition.

Returns:
A guard activity ID.

isActiveSubState

public boolean isActiveSubState()
Is this a currently active sub state of some other state or of the state machine as a whole?

Returns:
true or false

notifyActiveSubStates

public void notifyActiveSubStates()
Notify the existence of all currently active sub states. This is intended to be called from Interaction, to notify it of all initial lowest level active states, in which case it will be normally called on a StateMachine node. It could be called by any external entity to notify it of all currently active states.