Drawio/Diagram.net Javascript Plug-in that allows the creation of B4Time models. B4Time models will be processed by the B4Time-Sim application (coming soon).
This plugin works with the desktop version of draw.io/diagram.net. It hasn't been tried on the web version and as the export uses electron specific dialog, fs and other calls it will need some rework to work on the web.
The B4Time Plugin will only work in the Draw.io and/or Diagram.net diagraming applications and only in the desktop versions.
Installation releases and instructions can be found here.
Drawio-desktop-releases
To get plugin (move it to your computer) you have two choices:
- Clone this repo.
- Save just the src/b4time.js file to somewhere on your machine.
With the draw.io/diagram.net installed, first open the draw.io/diagram.net application.
In the image above find the Menu Extra->Plugins.
Above, press the "Add" button
Above, press the "Select File" button
Above, find the Plugin b4time.js and select it.
Above, once you hit apply you will be prompted to quit drawio/diagram.net for the changes to take effect.
Above, you really need to quit. Closing won't be enough.
Above, restart and you should see two new features. First, on the left there should be a new pallet of B4Time components. Second, on the menu bar you should now see a B4Time menu item.
Above, if you select the B4Time menu it should look something like this.
Above, next you can start to layout your B4Time model using the items in the pallet. Here is an example. The "GPU" and "Processor Theta" are of type "processor. The "Memory" and "Memory Theta" are of type "memory". The "Data*" elements are all of type "data". And, the "Task*" elements are all of type "task".
The links or edges between these components are of two types "link" and "binding". You can use the edges from the B4Time pallet or just use the edges as you normally would and the plugin will do a bunch of checking warning you of connections that won't work and probably ask you to add some labels (Ice Cream, Beef, etc).
The Model Checking command can be found in the B4Time menu drop down. The Export Model will also do model checking.
The exported model will be saved into a *.b4tjson file which be consumed later by the B4Time simulator.
Later we will talk about how to use these elements to model a compute system that you are interested in exploring.
There are few fully featured plug-ins out there. For this plugin we took inspiration and code from many other places. As it stands it could easily be used as a base for other plugins as well. So, if you are thinking of creating a plugin of your own. Please take a look at the code and we hope it inspires you to create.