CustomPanel Framework

Applications built in DashBoard’s PanelBuilder are referred to as CustomPanels. Application development in DashBoard utilizes a number of complementary technologies to provide user interface applications. These include:

·         openGear Protocol (OGP)

·         Resource XML files

·         openGear Layout Markup Language (OGLML)

·         ogScript

·         Other control protocols (such as VDCP, RossTalk, etc.)

The openGear ecosystem, in general, consists of Devices (such as openGear Cards, or stand-alone products) and the DashBoard client. Devices communicate via network connection, and in the case of openGear cards CANBus interface.

Figure 1 – DashBoard Application Framework

DashBoard Panel applications consist of a number of elements that the designer uses to create an application. These are:

·         Data sources

·         Internal data store

·         Application

·         Client Interface

Data Sources

Data may be sourced from several sources. These include:

·         Physical devices connected via ogp

·         XML files (.xml or .ogd)

·         OGLML document with embedded parameter XML data

·         Other external data sources

DashBoard manages synchronization between xml sources and, via OGP, physical devices. The data is stored in DashBoard’s internal data store. The details of OGP and JSON protocols are available to registered openGear partners, and are detailed in openGear Development Guide Part II - Software (8200DR-06).

External data sources, not connected via OGP or a DashBoard xml file, must be managed by the user application via ogScript.

DashBoard allows for multiple data sources to be connected to any application. This allows for multiple devices in addition to local parameters and resources to be incorporated into a CustomPanel application.

Datastore

DashBoard maintains an internal data store of information. Using OGP or JSON protocol, DashBoard retrieves information about the descriptor and value of parameters, menus and external objects. Any changes to the Data store from the client or application is transmitted back to the device. Any changes to the Data store from the device are propagated to the Client. Code may be triggered when a parameter changes based upon an ogScript onchange event registered against parameter.


 

Application

The application can be implemented using a variety of tools, depending upon the particular requirements. The application utilizes the data store to access device information. The following tools are available for developing applications:

·         openGear plug-in: The basic plug-in automatically generates a user interface based upon the parameters and menus defined in the data store. The plug-in also support for OGP messaging to allow other basic device control.

·         OGLML: OGLML is a markup language that may be used to create CustomPanel control layouts within DashBoard, beyond the default control layout provided by the openGear plug-in. Applications built in OGLML may include customization on location, size and appearance of controls. The controls in an OGLML application manipulate parameters stored in the data store.

·         ogScript: ogScript provides a JavaScript engine to extend the capability of OGLML-based applications. ogScript may also be used to access external data sources (either file or network-based) as well as provide for custom interface to non-OGP devices.

Client Interface

The application is presented within the DashBoard client. DashBoard provides services to display the application, interface with devices and maintain the data store. DashBoard also provides mechanisms for device discovery, logging, alarms and features an interactive GUI, PanelBuilder, for the creation of CustomPanel applications.

openGear Protocol

openGear Protocol (OGP) is a basic communications protocol between DashBoard and devices. It provides a mechanism to communicate the basic Data Model, manage parameter changes and describe a basic user interface. With OGP, devices can present a rich user interface using a standardized layout.

There are several variants of OGP, the details of which are described in in openGear Development Guide Part II - Software (8200DR-06), available to registered openGear partners. The knowledge of the details of the protocol mechanics is not required to develop applications within DashBoard; OGP is simply a mechanism which communicates the Data Model between devices and DashBoard.

Resource XML File

The structure of a device’s parameters and menus may be expressed in XML format. This file can be generated in DashBoard from an existing device by right-clicking the device and selecting “Save Configuration to file”. This will generate a “.ogd” file containing the XML representation of the device.

A resource XML file is also generated by PanelBuilder, if “External Data Source Panel File” is selected when creating the CustomPanel. This file will be given the extension .xml.

It is also possible to declare resources directly within an OGLML document using the Resource XML syntax.

openGear Layout Markup Language (OGLML)

OGLML is an XML layout language which augments OGP by providing a set of tools to customize the layout and behaviour of a user interface presented in DashBoard. An OGLML document also allows controls from multiple devices to be combined into a single user interface, called CustomPanels. CustomPanels may be designed interactively using DashBoard’s internal PanelBuilder feature. PanelBuilder provides a GUI to customize the user interface, and generates an OGLML document.

When a new CustomPanel file is created within DashBoard’s PanelBuilder, an OGLML file with an extension .grid is created.

OGLML is strictly a layout tool for tailoring the presentation of a device’s user interface within DashBoard. It simply specifies how a devices’ resources are displayed, and relies upon resources in the data store to provide the values for the content. The data store must be backed by a data source, through one of the mechanisms discussed above.

ogScript

ogScript is a programming language developed to interact with Dashboard-enabled devices. It uses JavaScript functions, syntax, and primitive object types. To enable CustomPanel developers to interact with panels and devices, ogScript adds some new global objects to JavaScript. Most JavaScript works in ogScript scripts, although you might run across an occasional item that does not work.

ogScript may be embedded into an OGLML document to add additional functionality based on a set of trigger events (for example, when a page loads, when a parameter changes, mouse clicks, etc.). There are a number of api definitions to allow control of DashBoard’s features, access to the data store, and connect to external devices and data sources.