-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7848061
commit de489ef
Showing
6 changed files
with
517 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,16 @@ | ||
# node-red-contrib-state-machine | ||
A Node Red node that wraps around Javascript State Machine | ||
A Node Red node that wraps around the [Javascript State Machine](https://www.npmjs.com/package/javascript-state-machine) to implement a [finite state machine](https://en.wikipedia.org/wiki/Finite-state_machine) for Node Red. | ||
|
||
The node is configured with a number of states and triggers that will cause the node to transition from one | ||
state to another. At any time, the node can only be in one of the defined states and it will only transition | ||
to another state when it receives a trigger defined for the current state. The same trigger can be used to | ||
cause transitions from more than one state. Triggers that are not valid for the current state are ignored. | ||
The node will always start in the first state on the state list and will emit a message with the initial | ||
state if the state output is set to a message property. | ||
|
||
Global and flow context properties can be used as trigger inputs but state transitions will only occur when the node receives a message. | ||
|
||
The current state can be set to a msg property or stored as a flow or global context property. If the state | ||
output is set to a msg property, that property is set in the original message and passed through, otherwise | ||
no messages are output. | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"name": "node-red-contrib-state-machine", | ||
"version": "1.0.0", | ||
"description": "A Node Red node for implementing a finite state machine.", | ||
"dependencies": { | ||
"javascript-state-machine": "3.*" | ||
}, | ||
"author": { | ||
"name": "Dean Cording", | ||
"email": "[email protected]" | ||
}, | ||
"license": "MIT", | ||
"keywords": [ | ||
"node-red", | ||
"iot", | ||
"state machine", | ||
"finite state machine", | ||
"state", | ||
"transition" | ||
], | ||
"bugs": { | ||
"url": "https://github.com/DeanCording/node-red-contrib-state-machine/issues" | ||
}, | ||
"homepage": "https://github.com/DeanCording/node-red-contrib-state-machine", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/DeanCording/node-red-contrib-state-machine.git" | ||
}, | ||
"node-red": { | ||
"nodes": { | ||
"state-machine": "state-machine.js" | ||
} | ||
} | ||
} |
Oops, something went wrong.