betfsm.betfsm.While
Bases: GeneratorWithState
State that contiuously evaluates an underlying state as long as a condition is satisfied.
stateDiagram-v2
direction LR
classDef successClass fill:darkgreen,color:white
classDef tickingClass fill:yellow,color:black
classDef otherClass fill:darkorange,color:white
classDef abortClass fill:darkred,color:white
state ConditionWhile {
direction TB
[*] --> my_state
state "State" as my_state
}
[*] --> ConditionWhile
my_state --> OTHER : other outcome
my_state --> TICKING : ticking<br>condition_cb()==True
my_state --> CANCEL : condition_cb()==False
class OTHER otherClass
class TICKING tickingClass
class CANCEL abortClass
__init__(name, condition_cb, state)
Same behavior as the underlying state state, but returns CANCEL if condition_cb(self,condition_cb)
ever gets false.
| Parameters: |
|
|---|