plant has its own timed/reactive behavior - typically another statechart
This commit is contained in:
parent
b50f52496a
commit
3e5dca437b
19 changed files with 401 additions and 241 deletions
|
|
@ -1,10 +1,16 @@
|
|||
import { RaisedEvent } from "@/statecharts/runtime_types";
|
||||
import { Plant } from "../Plant";
|
||||
import { TimedReactive } from "@/statecharts/timed_reactive";
|
||||
|
||||
export const DummyPlant: Plant<{}> = {
|
||||
export const dummyExecution: TimedReactive<null> = {
|
||||
initial: () => [[], null],
|
||||
timeAdvance: () => Infinity,
|
||||
intTransition: () => { throw new Error("dummy never makes intTransition"); },
|
||||
extTransition: () => [[], null],
|
||||
};
|
||||
|
||||
export const DummyPlant: Plant<null> = {
|
||||
inputEvents: [],
|
||||
outputEvents: [],
|
||||
initial: () => ({}),
|
||||
reduce: (_inputEvent: RaisedEvent, _state: {}) => ({}),
|
||||
render: (_state: {}, _raise: (event: RaisedEvent) => void) => <></>,
|
||||
execution: dummyExecution,
|
||||
render: (props) => <></>,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue