de.upb.hni.vmagic.highlevel
Class StateMachine

java.lang.Object
  extended by de.upb.hni.vmagic.highlevel.StateMachine

public class StateMachine
extends java.lang.Object

State machine.


Nested Class Summary
static interface StateMachine.State
          State in a state machine.
 
Constructor Summary
StateMachine(java.lang.String identifier, java.lang.String stateSignalIdentifier, Signal clock, Signal reset)
          Creates a state machine.
 
Method Summary
 StateMachine.State createOthersState()
          Creates a new others state and adds it to this state machine.
 StateMachine.State createState(java.lang.String identifier)
          Creates a new state and adds it to this state machine.
 Signal getClock()
          Returns the clock signal.
 java.util.List<SequentialStatement> getCombinatorialStatements()
          Returns the combinatorial statement.
 Signal getCurrentStateSignal()
          Returns the signal that contains the current state.
 java.util.List<BlockDeclarativeItem> getDeclarations()
          Returns the declaration.
 java.lang.String getIdentifier()
          Returns the identifier.
 Signal getNextStateSignal()
          Returns the signal that contains the next state.
 Signal getReset()
          Returns the reset signal.
 java.util.List<Signal> getSensitivityList()
          Returns the sensitivity list.
 StateMachine.State getStartState()
          Returns the start state of this state machine.
 java.util.List<ConcurrentStatement> getStatements()
          Returns the statements.
 java.util.List<SequentialStatement> getStatementsAfter()
          Returns the statements after the case statement.
 java.util.List<SequentialStatement> getStatementsBefore()
          Returns the statements before the case statement.
 java.util.List<StateMachine.State> getStates()
          Returns a list of states.
 java.lang.String getStateSignalIdentifier()
          Returns the identifier of the state signals.
 void setClock(Signal clock)
          Sets the clock signal.
 void setIdentifier(java.lang.String identifier)
          Sets the identifier.
 void setReset(Signal reset)
          Sets the reset signal.
 void setStartState(StateMachine.State startState)
          Sets the start state.
 void setStateSignalIdentifier(java.lang.String stateSignalIdentifier)
          Sets the identifier of the state signals.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateMachine

public StateMachine(java.lang.String identifier,
                    java.lang.String stateSignalIdentifier,
                    Signal clock,
                    Signal reset)
Creates a state machine.

Parameters:
identifier - the identifier
stateSignalIdentifier - the identifier of the state signals
clock - the clock signal
reset - the reset signal
Method Detail

getIdentifier

public java.lang.String getIdentifier()
Returns the identifier.

Returns:
the identifier

setIdentifier

public void setIdentifier(java.lang.String identifier)
Sets the identifier.

Parameters:
identifier - the identifier

getStateSignalIdentifier

public java.lang.String getStateSignalIdentifier()
Returns the identifier of the state signals.

Returns:
the identifier

setStateSignalIdentifier

public void setStateSignalIdentifier(java.lang.String stateSignalIdentifier)
Sets the identifier of the state signals.

Parameters:
stateSignalIdentifier - the identifier

getStates

public java.util.List<StateMachine.State> getStates()
Returns a list of states.

Returns:
a modifiable list of states

getSensitivityList

public java.util.List<Signal> getSensitivityList()
Returns the sensitivity list.

Returns:
the sensitivity list

getCombinatorialStatements

public java.util.List<SequentialStatement> getCombinatorialStatements()
Returns the combinatorial statement.

Returns:
a list of combinatorial statemetns

getStartState

public StateMachine.State getStartState()
Returns the start state of this state machine.

Returns:
the start state

setStartState

public void setStartState(StateMachine.State startState)
Sets the start state.

Parameters:
startState - the start state

getCurrentStateSignal

public Signal getCurrentStateSignal()
Returns the signal that contains the current state.

Returns:
the current state signal

getNextStateSignal

public Signal getNextStateSignal()
Returns the signal that contains the next state.

Returns:
the next state signal

createState

public StateMachine.State createState(java.lang.String identifier)
Creates a new state and adds it to this state machine.

Parameters:
identifier - the states identifier
Returns:
the created state

createOthersState

public StateMachine.State createOthersState()
Creates a new others state and adds it to this state machine.

Returns:
the created state

getDeclarations

public java.util.List<BlockDeclarativeItem> getDeclarations()
Returns the declaration.

Returns:
a list of declarations

getStatements

public java.util.List<ConcurrentStatement> getStatements()
Returns the statements.

Returns:
a list of statements

getStatementsBefore

public java.util.List<SequentialStatement> getStatementsBefore()
Returns the statements before the case statement.

Returns:
a modifiable list of sequential statements

getStatementsAfter

public java.util.List<SequentialStatement> getStatementsAfter()
Returns the statements after the case statement.

Returns:
a modifiable list of sequential statements

getClock

public Signal getClock()
Returns the clock signal.

Returns:
the clock signal

setClock

public void setClock(Signal clock)
Sets the clock signal.

Parameters:
clock - the clock signal

getReset

public Signal getReset()
Returns the reset signal.

Returns:
the reset signal

setReset

public void setReset(Signal reset)
Sets the reset signal.

Parameters:
reset - the reset signal