BNMR: Custom pages

From DaqWiki
Jump to navigation Jump to search


BNMR custom webpages are written specifically for the bnmr and bnqr experiments to enable to users to enter parameters and control the experiments more easily. They are built using the Midas custom page system.


MIDAS experiments run the web server [mhttpd] which allows users to control and communicate with their experiments using a standard web browser (e.g. Firefox).

Complicated experiments such as bnmr and bnqr involve a large number of ODB parameters in various directories that have to be setup in order to control the experiment. Navigating these parameters using the standard MIDAS ODB page can become complicated and time-consuming. For this reason, custom pages specific to an experiment are often written to present relevant parameters for the experiment in a more user-friendly way, and to display information specific to that experiment.

Custom pages for bnmr/bnqr

The custom pages written for the bnmr and bnqr experiments include:

  • Status page - replaces the MIDAS standard status page
  • Settings page - displays parameters for the selected PPG timing scheme, PSM mode etc
  • Logging page - displays parameters for logging data to a MUD file
  • Modes page - displays the features of each experimental mode
  • Expert page - displays features that are rarely used or easy to misuse

Defining in the /Custom ODB tree

In order for mhttpd to display custom pages, file names an aliases must be defined in the experiment's /Custom ODB tree. This includes external stylesheets, html and javascript code. See Midas documentation about /Custom for more.

Code location

All custom page code is located in the bnmr repository:

  • cycling_framework/custom directory contains tools from the base framework (including JQuery, Plotly and PPG visualization tools).
  • bnxr_common/custom directory contains code common to both experiments.
  • config_bnmr.js and config_bnqr.js define the specific differences for each experiment.