c

spinal.lib.fsm

StateMachine

class StateMachine extends Area with StateMachineAccessor with ScalaLocated

State machine

Example:
  1. val fsm = new StateMachine {
      val sIdle: State = StateEntryPoint{
        ...
      }
      val sState1: State = new State {
        whenIsActive{
          goto(sIdle)
        }
      }
      ...
    }
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StateMachine
  2. StateMachineAccessor
  3. Area
  4. OverridedEqualsHashCode
  5. ValCallbackRec
  6. ValCallback
  7. NameableByComponent
  8. Nameable
  9. ContextUser
  10. ScalaLocated
  11. GlobalDataUser
  12. OwnableRef
  13. AnyRef
  14. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new StateMachine()

Type Members

  1. abstract type RefOwnerType
    Definition Classes
    OwnableRef

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val _context: Capture
    Definition Classes
    Area
  5. def add(stateMachine: StateMachineAccessor): Unit
    Definition Classes
    StateMachineStateMachineAccessor
  6. def add(state: State): Int
    Definition Classes
    StateMachineStateMachineAccessor
  7. def always(doThat: ⇒ Unit): StateMachine.this.type
  8. val alwaysTasks: ArrayBuffer[() ⇒ Unit]
  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. var autoStart: Boolean
  11. def build(): Unit
    Definition Classes
    StateMachineStateMachineAccessor
  12. var builded: Boolean
  13. val cache: HashMap[Any, Any]
  14. def cacheGet(key: Any): Option[Any]
    Definition Classes
    StateMachineStateMachineAccessor
  15. def cacheGetOrElseUpdate(key: Any, op: ⇒ Any): Any
    Definition Classes
    StateMachineAccessor
  16. def cachePut(key: Any, value: Any): Unit
    Definition Classes
    StateMachineStateMachineAccessor
  17. def checkState(state: State): Unit
  18. def childNamePriority: Byte
    Definition Classes
    Area
  19. val childStateMachines: LinkedHashSet[StateMachineAccessor]
  20. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  21. def component: Component
    Definition Classes
    ContextUser
  22. var corruptedState: Bool
  23. def disableAutoStart(): Unit
    Definition Classes
    StateMachineStateMachineAccessor
  24. var entryState: State
  25. val enumDef: StateMachineEnum
  26. def enumOf(state: State): SpinalEnumElement[enumDef.type]
  27. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. def equals(obj: Any): Boolean
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  29. def exit(): Unit
  30. def exitFsm(): Unit
    Definition Classes
    StateMachineStateMachineAccessor
  31. def forceGoto(state: State): Unit
    Definition Classes
    StateMachineStateMachineAccessor
  32. def foreachReflectableNameables(doThat: (Any) ⇒ Unit): Unit
    Definition Classes
    Nameable
  33. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  34. def getDisplayName(): String
    Definition Classes
    Nameable
  35. def getEntry(): State
    Definition Classes
    StateMachineStateMachineAccessor
  36. def getInstanceCounter: Int
    Definition Classes
    ContextUser
  37. def getMode: Byte
    Attributes
    protected
    Definition Classes
    Nameable
  38. def getName(default: String): String
    Definition Classes
    NameableByComponentNameable
  39. def getName(): String
    Definition Classes
    NameableByComponentNameable
  40. def getPartialName(): String
    Definition Classes
    Nameable
  41. def getPath(from: Component, to: Component): Seq[Component]
    Definition Classes
    NameableByComponent
  42. def getRefOwnersChain(): List[Any]
    Definition Classes
    OwnableRef
  43. def getScalaLocationLong: String
    Definition Classes
    ScalaLocated
  44. def getScalaLocationShort: String
    Definition Classes
    ScalaLocated
  45. def getScalaTrace(): Throwable
    Definition Classes
    ScalaLocated
  46. val globalData: GlobalData
    Definition Classes
    GlobalDataUser
  47. def goto(state: State): Unit
    Definition Classes
    StateMachineStateMachineAccessor
  48. def hashCode(): Int
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  49. implicit val implicitFsm: StateMachine
  50. def inCorruptedState(): Bool
  51. var inGeneration: Boolean
  52. def isActive(state: State): Bool
    Definition Classes
    StateMachineStateMachineAccessor
  53. def isCompletelyUnnamed: Boolean
    Definition Classes
    Nameable
  54. def isEntering(state: State): Bool
    Definition Classes
    StateMachineStateMachineAccessor
  55. def isExiting(state: State): Bool
    Definition Classes
    StateMachineStateMachineAccessor
  56. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  57. final def isNamed: Boolean
    Definition Classes
    Nameable
  58. def isPriorityApplicable(namePriority: Byte): Boolean
    Definition Classes
    Nameable
  59. def isRunning: Bool
  60. def isStarted: Bool
  61. def isStateNextBoot(): Bool
    Definition Classes
    StateMachineStateMachineAccessor
  62. def isStateRegBoot(): Bool
    Definition Classes
    StateMachineStateMachineAccessor
  63. def isStopped: Bool
  64. def isUnnamed: Boolean
    Definition Classes
    NameableByComponentNameable
  65. def killFsm(): Unit
  66. def makeInstantEntry(): State
  67. val name: String
    Definition Classes
    Nameable
  68. val nameableRef: Nameable
    Attributes
    protected
    Definition Classes
    Nameable
    Annotations
    @DontName()
  69. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  70. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  71. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  72. def onStart(body: ⇒ Unit): State
  73. def overrideLocalName(name: String): StateMachine.this.type
    Definition Classes
    Nameable
  74. val parentScope: ScopeStatement
    Definition Classes
    ContextUser
  75. var parentStateMachine: StateMachineAccessor
  76. def postBuild(body: ⇒ Unit): Unit
  77. val postBuildTasks: ArrayBuffer[() ⇒ Unit]
  78. val refOwner: RefOwnerType
    Definition Classes
    OwnableRef
    Annotations
    @DontName()
  79. def reflectNames(): Unit
    Definition Classes
    Nameable
  80. def rework[T](body: ⇒ T): T
    Definition Classes
    Area
  81. val scalaTrace: Throwable
    Definition Classes
    ScalaLocated
  82. def setCompositeName(nameable: Nameable, postfix: String, namePriority: Byte): StateMachine.this.type
    Definition Classes
    Nameable
  83. def setCompositeName(nameable: Nameable, postfix: String, weak: Boolean): StateMachine.this.type
    Definition Classes
    Nameable
  84. def setCompositeName(nameable: Nameable, postfix: String): StateMachine.this.type
    Definition Classes
    Nameable
  85. def setCompositeName(nameable: Nameable, namePriority: Byte): StateMachine.this.type
    Definition Classes
    Nameable
  86. def setCompositeName(nameable: Nameable, weak: Boolean): StateMachine.this.type
    Definition Classes
    Nameable
  87. def setCompositeName(nameable: Nameable): StateMachine.this.type
    Definition Classes
    Nameable
  88. def setEncoding(spec: (State, BigInt)*): Unit
  89. def setEncoding(encoding: SpinalEnumEncoding): Unit
  90. def setEntry(state: State): Unit
    Definition Classes
    StateMachineStateMachineAccessor
  91. def setLambdaName(isNameBody: ⇒ Boolean)(nameGen: ⇒ String): StateMachine.this.type
    Definition Classes
    Nameable
  92. def setName(name: String, namePriority: Byte): StateMachine.this.type
    Definition Classes
    Nameable
  93. def setName(name: String, weak: Boolean): StateMachine.this.type
    Definition Classes
    Nameable
  94. def setName(name: String): StateMachine.this.type
    Definition Classes
    Nameable
  95. def setNameAsWeak(): StateMachine.this.type
    Definition Classes
    Nameable
  96. def setParentStateMachine(parent: StateMachineAccessor): Unit
    Definition Classes
    StateMachineStateMachineAccessor
  97. def setPartialName(name: String, namePriority: Byte, owner: Any): StateMachine.this.type
    Definition Classes
    Nameable
  98. def setPartialName(name: String, namePriority: Byte): StateMachine.this.type
    Definition Classes
    Nameable
  99. def setPartialName(name: String, weak: Boolean): StateMachine.this.type
    Definition Classes
    Nameable
  100. def setPartialName(owner: Nameable, name: String, namePriority: Byte): StateMachine.this.type
    Definition Classes
    Nameable
  101. def setPartialName(owner: Nameable, name: String, weak: Boolean): StateMachine.this.type
    Definition Classes
    Nameable
  102. def setPartialName(name: String): StateMachine.this.type
    Definition Classes
    Nameable
  103. def setPartialName(owner: Nameable, name: String): StateMachine.this.type
    Definition Classes
    Nameable
  104. def setPartialName(owner: Nameable): StateMachine.this.type
    Definition Classes
    Nameable
  105. def setRefOwner(that: Any): Unit
    Definition Classes
    OwnableRef
  106. def setScalaLocated(source: ScalaLocated): StateMachine.this.type
    Definition Classes
    ScalaLocated
  107. def setTransitionCondition(condition: Bool): Unit

    Set the condition for state transitions

    Set the condition for state transitions

    goto() will only have an effect, if condition is True

  108. def setWeakName(name: String): StateMachine.this.type
    Definition Classes
    Nameable
  109. def startFsm(): Unit
    Definition Classes
    StateMachineStateMachineAccessor
  110. var stateBoot: State
  111. var stateNext: StateMachineEnum.C
  112. var stateNextCand: StateMachineEnum.C
  113. var stateReg: StateMachineEnum.C
  114. val stateToEnumElement: HashMap[State, SpinalEnumElement[enumDef.type]]
  115. val states: ArrayBuffer[State]
  116. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  117. def toString(): String
    Definition Classes
    AreaNameable → AnyRef → Any
  118. var transitionCond: Bool
  119. def unsetName(): StateMachine.this.type
    Definition Classes
    Nameable
  120. def valCallback[T](ref: T, name: String): T
    Definition Classes
    ValCallbackRec → ValCallback
  121. def valCallbackOn(ref: Any, name: String, refs: Set[Any]): Unit
    Definition Classes
    ValCallbackRec
  122. def valCallbackRec(obj: Any, name: String): Unit
    Definition Classes
    AreaValCallbackRec
  123. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  124. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  125. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  126. val wantExit: Bool
  127. val wantKill: Bool
  128. val wantStart: Bool

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from StateMachineAccessor

Inherited from Area

Inherited from OverridedEqualsHashCode

Inherited from ValCallbackRec

Inherited from ValCallback

Inherited from NameableByComponent

Inherited from Nameable

Inherited from ContextUser

Inherited from ScalaLocated

Inherited from GlobalDataUser

Inherited from OwnableRef

Inherited from AnyRef

Inherited from Any

Ungrouped