Code Monkey home page Code Monkey logo

dbwr's Introduction

Display Builder Web Runtime

Building

export ANT_HOME=/path/to/apache-ant
export CATALINA_HOME=/path/to/apache-tomcat
export JAVA_HOME=/path/to/jdk8
export PATH=$ANT_HOME/bin:$JAVA_HOME/bin:$PATH

ant clean war

Running under Tomcat

First, install the PV Web Socket, which must be available on the same Tomcat instance.

Set the following environment variables, for example in $CATALINA_HOME/bin/setenv.sh:

  • DBWR1, DBWR2, ...: URLs of displays to suggest on the start page.

Place dbwr.war in $CATALINA_HOME/webapps

Client URLs

Open the main page of the running instance for explanation of URLs used to open displays. Assuming Tomcat on localhost:8080, open

http://localhost:8080/dbwr

Development Status

The following widget types and features have been implemented with basic functionality:

  • Label
  • Rectangle
  • Ellipse
  • Arc
  • Polyline
  • Polygon
  • Text Update
  • Text Input (can write)
  • Text formatting (precision, units, enum labels)
  • LED
  • Multi-State LED
  • Action Button to open display or web link
  • Action Button to write value to PV
  • Combo
  • Group with group border
  • Embedded Displays
  • Tabs
  • XYPlot
  • Image, runtime options to change scaling and color map
  • Macro support
  • Alarm-sensitive border based on PV
  • Limited Rule support: Color of rect/circle/label, visibility
  • Caching

In principle, the PV Web Socket supports both Channel Access and PV Access, but so far all testing of the display builder web runtime has concentrated on Channel Access.

Widget Implementation

Each widget needs to derive from dbwr.widgets.Widget and register in widget.properties. The widget constructor parses the display file XML for the widget.

Static Widget

A static widget implements Widget.fillHTML() to create the static HTML content.

Dynamic Widget

A dynamic widget registers Javascript in a static initializer that calls WidgetFactory.addJavaScript(). That Javascript can then register init or update methods via DisplayBuilderWebRuntime.prototype.widget_init_methods and DisplayBuilderWebRuntime.prototype.widget_update_methods.

PV Widgets

Any widget with a data-pv attribute in its widget HTML will automatically subscribe to that PV. It should register a java script method in DisplayBuilderWebRuntime.prototype.widget_update_methods to handle the received PV updates.

PVs with multiple PVs can subscribe to additional PVs in their widget_init_methods.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.