Pvsio-web

A javascript library to connect to and communicate with a pvsio process using websockets

View project onGitHub

pvsio-web

A javascript library to connect to and communicate with a pvsio process using websockets.

Prerequisites

prerequisite 1: PVS

PVS (http://pvs.csl.sri.com/download.shtml) is required to run pvsio-web. Please download and install PVS before installing pvsio-web.

Once PVS is installed, please add the PVS executable files pvs, pvsio and proveit to your PATH. Alternatively you can create symbolic links to those files in /usr/bin. For instance, assuming that PVS is installed in /opt/pvs6.0/pvs, the following commands should be executed in a Terminal window to create the symbolic links:

  • sudo ln -s /opt/pvs6.0/pvs /usr/bin/pvs
  • sudo ln -s /opt/pvs6.0/pvsio /usr/bin/pvsio
  • sudo ln -s /opt/pvs6.0/proveit /usr/bin/proveit

prerequisite 2: Node.js

Node.js (http://nodejs.org/download/) is required to run pvsio-web. Please download and install nodejs before proceeding to installing pvsio-web.

Installation

To install pvsio-web, use one of the following methods:

method 1: download pvsio-web as a zip file and use npm to resolve dependencies

Download the zip archive of the project from https://github.com/thehogfather/pvsio-web/archive/master.zip. Extract the zip file to a location of your preference.

Then, download all remaining dependencies by running the following command from a Terminal window opened in the pvsio-web folder:

  • sudo npm install

use npm to download pvsio-web

  • sudo npm install pvsio-web -g

The installer will copy pvsio-web in /usr/local/lib/node_modules/pvsio-web. By default, the directory is owned by "nobody". You will need to change the ownership and assign it to your user with the following command:

  • sudo chown -R myUserName /usr/local/lib/node_modules/pvsio-web

(where "myUserName" is to be replaced with the actual username on your machine)

method 3: clone git repository

Create a directory pvsio-web. Open a Terminal in the created directory, and clone the pvsio-web repository using the following command:

  • git clone https://github.com/thehogfather/pvsio-web.git

Then, download all remaining dependencies by running the following command from a Terminal window opened in the pvsio-web folder:

  • sudo npm install

Running pvsio-web

To run pvsio-web, a backend and a frontend need to be started. To start the backend: open a Terminal window in the pvsio-web directory, and use the following command (and leave the Terminal window open):

  • ./start.sh

To start the frontend: open a browser (Firefox 21 or greater, or Chrome), and type the following address in the address bar:

  • http://localhost:8082

Demos

A demo of a realistic medical infusion pump is included in the pvsio-web distribution. To execute the demo: Open a Terminal window in the pvsio-web directory, and use the following command to start the pvsio-web backend (leave the Terminal window open):

  • ./start.sh

Start the pvsio-web frontend by opening a browser at the following address:

  • http://localhost:8082/demos/GPCA-UI_PVS/NavKeys

Wiki

A more comprehensive guide about pvsio-web can be found here.

Uninstallation

To uninstall use [sudo] npm uninstall pvsio-web -g