-
Notifications
You must be signed in to change notification settings - Fork 19
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
0 parents
commit d4e6f70
Showing
28 changed files
with
4,820 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Eclipse | ||
.project | ||
.pydevproject |
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,7 @@ | ||
Copyright <YEAR> <COPYRIGHT HOLDER> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
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 @@ | ||
recursive-include cpstwinning/plcruntime * |
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,16 @@ | ||
# CPS Twinning makefile | ||
|
||
LATEST_VERSION = 0.0.1 | ||
MININET = sudo -E mn | ||
|
||
PYTHON = sudo -E python | ||
PYTHON_OPTS = | ||
|
||
# Twinning | ||
|
||
twinning: | ||
$(PYTHON) $(PYTHON_OPTS) run.py | ||
|
||
clean-mininet: | ||
sudo mn -c | ||
|
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,56 @@ | ||
# CPS Twinning | ||
|
||
CPS Twinning is a framework for generating and executing digital twins that mirror cyber-physical systems (CPSs). | ||
|
||
## Installation | ||
|
||
CPS Twinning depends on [Mininet](http://mininet.org) and [MatIEC](https://bitbucket.org/mjsousa/matiec). | ||
|
||
### Mininet | ||
|
||
To install Mininet, follow the instructions provided by the [Mininet installation guide](http://mininet.org/download/). | ||
|
||
### MatIEC | ||
|
||
First, install the MatIEC dependencies flex and bison. | ||
For example: | ||
``` | ||
$ sudo apt-get update | ||
$ sudo apt-get install flex | ||
$ sudo apt-get install bison | ||
``` | ||
|
||
Then, clone the MatIEC repository and build the two transcompilers: | ||
``` | ||
$ hg clone ssh://hg@bitbucket.org/mjsousa/matiec | ||
$ cd matiec | ||
$ autoreconf -i | ||
$ ./configure | ||
$ make | ||
``` | ||
|
||
After that, set the following environment variables: | ||
``` | ||
$ export MATIEC_INCLUDE_PATH=/home/<user>/matiec/lib | ||
$ export MATIEC_C_INCLUDE_PATH=/home/<user>/matiec/lib/C | ||
$ export PATH=/home/<user>/matiec:$PATH | ||
``` | ||
|
||
### CPS Twinning | ||
|
||
Finally, clone this repository and install CPS Twinning: | ||
``` | ||
$ git clone https://github.com/cps-twinning/cps-twinning.git | ||
$ cd cps-twinning | ||
$ virtualenv env | ||
$ source env/bin/activate | ||
(env)$ pip install . | ||
``` | ||
|
||
## Usage | ||
|
||
Now, to start CPS Twinning, run `make twinning`. The generation of digital twins from an [AutomationML](https://www.automationml.org) artifact can be initiated by executing `twinning <path_to_aml>`. An exemplary specification can be found at `misc/specification/ConveyorSystem.aml`. | ||
|
||
Note that this project is only a proof of concept. As a consequence, there are currently many areas that need improvements. In particular, the functionality of the AutomationML parser is currently limited and may require manual adjustments. | ||
|
||
|
Empty file.
Oops, something went wrong.