Seasons Of Code

Xcos on Web    • Inderpreet Arora    • Dipti Ghosalkar   

Xcos on Web

Xcos on Web

The objective of Xcos on web project is to provide access to the capabilities of Xcos simulator over web. Upon the completion of this project, the users with web-enabled devices will be able to load, create and simulate Xcos diagrams through a web browser. This project has been partially completed and available here.

The current implementation framework is as follows:

  1. Overall system design – Design of browser based Xcos simulator to include editor, several menu options, palette libraries, simulation options, etc.
  2. Graphical User Interface – Provision of palette blocks in the left pane, set scope parameters and right click functionalities, port constraints for the simulator blocks, Tooltip and color wheel features, Set context option, etc.
  3. Data Structures – To enable relevant function call for each block dragged and dropped on the browser-based editor followed by setting the values of model, graphics, GUI and docs; Mapping of Xcos blocks’ sci files to JavaScript.
  4. XSLT (eXtensible Stylesheet Language Transformations) – Use of a style sheet language to convert XML generated by GUI into Scilab compatible XML.
  5. Parser – Conversion of data structures to JavaScript using regex in Python.
  6. Server – Xcos file after suitable conversion is sent to the server for computation and simulation and the results are brought back at the user end in the form of images.

Technologies used: mxGraph, XSLT, JavaScript, Python, Java Servlet, NGINX, Apache Tomcat.
The code is available here.