Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 1.45 KB

README.md

File metadata and controls

30 lines (19 loc) · 1.45 KB

Stateful-WoT

The Stateful-WoT project is an effort to describe Web of Things API and its behavior using a standardized State Machine description format and use the resulting model to automatically generate a functioning Digital Twin of the device.

State Machines are described using W3C SCXML Standard, which is first parsed and converted to a notation that fits with XState, an open source Typescript State Machine library. Code for interpreting and executing the State Machine is then generated and can be executed.

We also provide an extension to SCXML that allows the generation of fully W3C WoT-compliant Digital Twins that expose a server to the outside using the node-wot library. SCXML needs to contain additional keywords for it to function correctly.

To model the physical behavior as well, we extend SCXML to include Modelica models.

Installation

yarn install
yarn build

Usage

yarn cli <scxmlInput>           -> SCXML to XState Code   
yarn cli --wot <scxmlInput>     -> SCXML to node-wot code

If a state chart includes Modelica models, copy over the files from simulator folder and run the buildAndRun.ps1 script. This is a PowerShell script, but a similar script can be easily written for bash.

Evaluation

Different examples for evaluation can be found under examples. The Altivar evaluation can be found here and the PanTilt evaluation can be found here.