|
|
# Installation
|
|
|
* Eclipse -> help -> Install software
|
|
|
* Import the following sites (this is xml file!)
|
|
|
|
|
|
````
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<bookmarks>
|
|
|
<site url="http://download.eclipse.org/ecoretools/updates/nightly/3.0.x/mars" selected="true" name="EcoreTools"/>
|
|
|
<site url="http://download.eclipse.org/emfatic/update" selected="true" name="EMFATIC"/>
|
|
|
<site url="http://download.eclipse.org/epsilon/interim/" selected="true" name="Epsilon interim"/>
|
|
|
<site url="http://download.eclipse.org/epsilon/updates/" selected="false" name="Epsilon stable"/>
|
|
|
<site url="http://download.eclipse.org/releases/mars" selected="true" name="Mars"/>
|
|
|
<site url="http://download.eclipse.org/eclipse/updates/4.5" selected="true" name="The Eclipse Project Updates"/>
|
|
|
<site url="http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/" selected="true" name="Xtext All In One - Releases"/>
|
|
|
</bookmarks>
|
|
|
````
|
|
|
|
|
|
* Leave Epsilon Stable UNmarked - install interim version (scientific notation fix)
|
|
|
* March 2016: Version 1.3 should have this fix included
|
|
|
* Install Sirius 3.1 (for the EMF Diagram Editor) org.eclipse.sirius
|
|
|
* Install/update everything
|
|
|
* Old notes:
|
|
|
1. Tested for Eclipse Mars for Java and DSL Developers: https://www.eclipse.org/downloads/packages/eclipse-ide-java-and-dsl-developers/mars1
|
|
|
2. Install Emfatic (tested for 0.8.0)
|
|
|
1. Update site: http://download.eclipse.org/emfatic/update
|
|
|
2. DESELECT "Group Items by Category"
|
|
|
3. Install Epsilon (tested for 1.2 stable or interim)
|
|
|
2. Install all but GMF Integration (why? there were some bugs, maybe it is fixed now)
|
|
|
|
|
|
|
|
|
# Updating DNI Meta-Model:
|
|
|
* Main representation of the meta-model is the `dnimm3/model/Dnimm3.xcore` file. Once you make some changes, please execute the following steps.
|
|
|
* **Important!** For every change you introduce – **bump the meta-model version** in the first line of xcore file. The format is: `@Ecore(nsURI="dnimm3/YYYY/MM/DD/HHMM")`
|
|
|
* TODO: Introduce version number, e.g., v3.11.
|
|
|
* TODO: Apply `tools.descartes.dni...` package naming scheme
|
|
|
* Make sure that the code in `dnimm3`, `dnimm3.edit`, and `dnimm3.editor` is generated properly. If needed, delete contents of the respective `src` directories and regenerate code. (Code is regenerated after hitting C-s (saving) the xcore file.)
|
|
|
* Generate ecore file form xcore (right -> new -> other -> generator model -> source: xcore -> ... ecore file will appear)
|
|
|
* Remove relative reference to the `ecore` meta-model by opening `dnimm3.ecore` in a text editor and replacing:
|
|
|
* `../../org.eclipse.emf.ecore/model/Ecore.ecore#`
|
|
|
* with
|
|
|
* `http://www.eclipse.org/emf/2002/Ecore#`
|
|
|
* Now the `dnimm3.ecore` meta-model is ready to be used in the Epsilon transformations
|
|
|
|
|
|
|
|
|
# DNI Projects in this Repo:
|
|
|
* dnimm3: current version of DNI3 meta-model. Includes: SDN, Load Balancing scenario, optimized Node-Interface-Link. Xcore. **CURRENT**!
|
|
|
* To create an instance (xmi): emf -> ecore -> genmodel -> xcore -> create dynamic instance
|
|
|
* dni.wiki: this page
|
|
|
* DNI: DNI2, generators, transformations
|
|
|
* dni-traffic-extractor2: scripts for extracting DNI2 instances from tcpdump traces
|
|
|
* DNI_Matteo: Updated version of M2T transformation for OMNeT++. Will be merged with DNI.
|
|
|
* DNI-Manual: Doc for DNI 2.
|
|
|
* Obsolete: old projects that I still would like to keep.
|
|
|
* Presentations: Documenting the design efforts and transition from DNI2 to DNI3
|
|
|
* Omnet-INET-patch: Patch for INET library to support DNIapplication
|
|
|
|
|
|
# Using DNI
|
|
|
|
|
|
## Feb 2016
|
|
|
* How to create an instance of DNI (24.02.2016)
|
|
|
* If you use xcore, then delete the ecore file.
|
|
|
* Right-click on dnimm3.editor and run as eclipse instance - so, you will avoid a lot of possible errors
|
|
|
* make sure the manifest file for projects dnimm3, dnimm3.model, dnimm3.edit, and dnimm3.editor requires Java-1.6
|
|
|
* How to convert emf->ecore->xcore
|
|
|
* Create new empty Java Project
|
|
|
* Inside, create new folder "model"
|
|
|
* Right-click on the project -> Configure -> Convert to Modeling Project
|
|
|
* The Project should be configured now
|
|
|
* emf -> ecore : right click, generate ecore model
|
|
|
* ecore -> xcore:
|
|
|
* right click on ecore -> new -> other -> EMF Generator Model
|
|
|
* right click on ecore -> Register EPackages
|
|
|
* right click on genmodel -> Export Model.. -> Select xcore -> next -> export dni3mm_lb package, reference others (if any) -> Finish
|
|
|
* In few seconds a lot of stuff will be generated, including xcore file
|
|
|
|
|
|
|
|
|
## (in 2015) Regeneration of projects after changes in the Meta-model
|
|
|
|
|
|
### Meta-model
|
|
|
1. After a change in the DNI-Master.emf file, click right on emf file and select "Generate ecore Model".
|
|
|
2. Right click on DNI-Master.ecore file and select "Register EPackage"
|
|
|
3. Open DNI-Master.ecore file, select root node in tree editor and validate the meta-model. Some Warnings are okay.
|
|
|
4. Create new generator model (dnimm.genmodel) if not exists
|
|
|
5. If the URI of the meta-model has changed, relaod the dnimm.genmodel.
|
|
|
1. Right click on dnimm.genmodel file and select "Reload".
|
|
|
2. Select newly edited metamodel files.
|
|
|
3. Click next or finish
|
|
|
6. Delete the contents of dnimm/src
|
|
|
7. Open dnimm.genmodel file, right click on root node and select "Generate Model Code".
|
|
|
8. Done
|
|
|
|
|
|
### DNI Traffic Extractor
|
|
|
1. Make sure that dnimm project has no errors
|
|
|
2. Right-click src/dnibuilder/DNIBuilder.xted -> Run As -> Java Application
|
|
|
3. Correct all errors - the are usually caused by changes in the meta-model and the generated dnimm libraries
|
|
|
4. "generated-traffic-model.xmi" should be created - this is a DNI meta-model instance (= DNI model)
|
|
|
5. Open "generated-traffic-model.xmi" with Exceed editor and validate the model
|
|
|
6. Open "generated-traffic-model.xmi" with "Sample Reflective Ecore Model Editor" editor and validate the model
|
|
|
7. The file "generated-traffic-model.xmi" is now a valid DNI model
|
|
|
|
|
|
### Xtext grammar (optional)
|
|
|
1. Open dnimm.genmodel file, right click on root node and select "Generate Model Code".
|
|
|
2. Create new Xtext project based on ecore file
|
|
|
1. Right-click, New, Project, Other, Xtext, Xtex based on ecore file
|
|
|
2. Select dnimm.genmodel
|
|
|
3. Finish the wizard
|
|
|
4. The important result is the xtext file: <xtext-project>/src/name.xtext
|
|
|
5. Copy the contents of the name.xtext file (all, except the first line) to the tools.descartes.dml.dni.text/src/Dnitxt.xtext file
|
|
|
1. First non-comment line of the Dnitxt.xtext should be: "grammar tools.descartes.dml.dni.text.Dnitxt with org.eclipse.xtext.common.Terminals"
|
|
|
2. the rest you copy from name.xtext
|
|
|
6. You can delete the newly created xtext project (mydsl or similar)
|
|
|
7. Go to "tools.descartes.dml.dni.text/"
|
|
|
8. 7. Delete contents of src-gen and xtend-get packages
|
|
|
9. Right click on src/Dnitxt.xtext", select "Generate xtext artifacts"
|
|
|
1. In case of "Unsupported minor/major version", right click on .mwe2 file, Run As, Configuration, and set JRE to Java 1.8.
|
|
|
2. Watch out for descatres - descartes typo!
|
|
|
8. Grammar is ready to use.
|
|
|
|
|
|
### DNItxt converter (Optional, requires Xtext)
|
|
|
1. Copy the file "generated-traffic-model.xmi" (or any other DNI model) to the "dni_xmi_dnitxt_converter" directory
|
|
|
2. Open src/dni_text2model/Converterr.xted and make sure there are no errors
|
|
|
3. Edit code in main function to conduct the conversions you need. Pay attention to the name of the files. File name extensions are case-sensitive!
|
|
|
4. Run as Java Application. Text/Xmi models should appear. You may now use the xmi model in model transformations.
|
|
|
|
|
|
### HUTN - Text representation without Xtext
|
|
|
1. You need only the dnimm project for this
|
|
|
2. Get a DNI model (xmi) or use the DNI Traffic Extractor
|
|
|
3. Rename xmi file, so that its name ends with .model
|
|
|
4. Right click - HUTN - Check...
|
|
|
5. Right click - HUTN - Generate HUTN
|
|
|
6. Work with the newly created .hutn file.
|
|
|
7. To convert back to xmi (.model), right click - HUTN - Generate Model
|
|
|
8. Hutn has many issues. Sometimes closing and opening hutn file/the whole project may help
|
|
|
9. There are known issues with hutn:
|
|
|
1. Problem with name/id - the same as in
|
|
|
2. Problem with sourceSoftwareComponent vs. SoftwareComponent - hutn syntax problem. Solvable, but need a read how to do this
|
|
|
|
|
|
|
|
|
## Unsolved Issues
|
|
|
1. Names of the entities need to be unique! Really! Also no more "eth0" but "eth0.id.sth" - related only to Xtext grammar and HUTN representation. We will fix this some day.
|
|
|
|
|
|
|
|
|
## Solved issues
|
|
|
1. Xtext: Unsupported major/minor version 52.0 error? Select Run as... Set java 8.
|
|
|
|
|
|
# DNI Developer Notes
|
|
|
|
|
|
* xtext grammar to DNI causes too much work. Name-id-description problem: Epsilon has id as id, xtext has name as id.
|
|
|
* ESON (textual editor for xcore) does not work well
|
|
|
* HUTN (textual editor for epsilon) does not work well, but the best so far
|
|
|
|
|
|
## Xtext Problems
|
|
|
1. https://www.eclipse.org/forums/index.php/m/1713801/ |
|
|
\ No newline at end of file |