mhttpd task

previous.gif Utilities - Top - Data format next.gif

mhttpd is the Midas Web Server. It provides Midas DAQ control through the web using any web browser.

This daemon application has to run in order to allow the user to access from a Web browser any Midas experiment running on a given host. Full monitoring and "Almost" full control of a particular experiment can be achieved through this Midas Web server. The color coding is green for present/enabled, red for missing/disabled, yellow for inactive. It is important to note the refresh of the page is not "event driven" but is controlled by a timer (see Config- button). This mean the information at any given time may reflect the experiment state of up to n second in the paste, where n is the timer setting of the refresh parameter. Its basic functionality are:

The ...


mhttpd requires as argument the TCP/IP port number in order to listen to the web based request.

-[Experiment/Date] Current Experiment, current date.

-[Action/Pages buttons] Run control button, Page switch button. At any web page level within the Midas Web page the main status page can be invoked with the <status> button.

[Version >= 1.8.3 Alias Hyperlink] This line will be present on the status page only if the ODB tree /Alias. The distinction for spawning a secondary frame with the link request is done by default. For forcing the link in the current frame, add the terminal charater "&" at the end of the link name.

Midas Web server
mhttp01.gif


Start page

Once the Start button is pressed, you will be prompt for experiment specific parameters before starting the run. The minimum set of parameter is the run number, it will be incremented by one relative to the last value from the status page. In the case you have defined the ODB tree /Experiment/Edit on Start all the parameters sitting in this directory will be displayed for possible modification. The Ok button will proceed to the start of the run. The Cancel will abort the start procedure and return you to the status page.

Start run request page. In this case the user has multiple run parameters defined under "/Experiment/Edit on Start"
mhstart.gif

The title of each field is taken from the ODB key name it self. In the case this label has a poor meaning and extra explanation is required, you can do so by creating a new ODB tree under experiment Parameter Comments/ . Then by creating a string entry named as the one in Edit on Start- you can place the extra information relative to that key (html tags accepted).

This "parameter comment" option is available and visible ONLY under the midas web page, the odbedit start command will not display this extra information.

[local:midas:S]/Experiment>ls -lr
Key name                        Type   #Val  Size  Last Opn Mode Value
---------------------------------------------------------------------------
Experiment                      DIR
    Name                        STRING  1     32    17s  0   RWD  midas
    Edit on Start               DIR
        Write data              BOOL    1     4     16m  0   RWD  y
        enable                  BOOL    1     4     16m  0   RWD  n
        nchannels               INT     1     4     16m  0   RWD  0
        dwelling time (ns)      INT     1     4     16m  0   RWD  0
    Parameter Comments          DIR
        Write Data              STRING  1     64    44m  0   RWD  Enable logging
        enable                  STRING  1     64    7m   0   RWD  Scaler for expt B1 only
        nchannels               STRING  1     64    14m  0   RWD  <i>maximum 1024</i>
        dwelling time (ns)      STRING  1     64    8m   0   RWD  <b>Check hardware now</b>

[local:midas:S]Edit on Start>ls -l
Key name                        Type   #Val  Size  Last Opn Mode Value
---------------------------------------------------------------------------
Write Data                      LINK    1     19    50m  0   RWD  /logger/Write data
enable                          LINK    1     12    22m  0   RWD  /sis/enable
number of channels              LINK    1     15    22m  0   RWD  /sis/nchannels
dwelling time (ns)              LINK    1     24    12m  0   RWD  /sis/dwelling time (ns)

Start run request page. Extra comment on the run condition is displayed below each entry.
mhstart2.gif


ODB page

The ODB page shows the ODB root tree at first. Clicking on the hyperlink will walk you to the requested ODB field. The Example below show the sequence for changing the variable "PA" under the /equipment/PA/Settings/Channels ODB directory. A possible shortcut

If the ODB is Write protected, a first window will request the web password.

ODB page access.
mhedit.gif


Equipment page

The equipment names are linked to their respective /Variables sub-tree. This permit to access as a shortcut the current values of the equipment. In the case the equipment is a slow control equipment, the parameters list may be hyperlinked for parameter modification. This option is possible only if the parameter names have a particular name syntax (see History system).

Slow control page.
mhsc.gif


CNAF page

If one of the active equipment is a CAMAC based data collector, it will be possible to remotely access CAMAC through this web based CAMAC page. The status of the connection is displayed in the top right hand side corner of the window.

CAMAC command pages.
mhcnaf.gif


Message page

This page display by block of 100 lines the content of the Midas System log file starting with the most recent messages. The Midas log file resides in the directory defined by the experiment.

Message page.
mhmes.gif


Elog page

The Electronic Log page show the most recent Log message recorded in the system. The top buttons allows you to either Create/Edit/Reply/Query/Show a message.

From version 1.9.0, this page contains extra parameters for time selection and Email forwarding. Please refer to the ODB structure for further information.

main Elog page.
mhelog.gif

The format of the message log can be written in HTML format.

HTML Elog message.
mheloghtml.gif

The runlog button display the content of the file runlog.txt which is expected to be in the data directory specified by the ODB key /Logger/Data Dir . Regardless of its content, it will be displayed in the web page. Its common uses is to append lines after every run. The task appending this run information can be any of the midas application. Example is available in the Example /experiment/analyzer.c which at each end-of-run (EOR) will write to the runlog.txt some statistical informations.

Elog page, Runlog display.
mhelogrun.gif

When composing a new entry into the Elog, several fields are available to specify the nature of the message i.e: Author, Type, System, Subject. Under Type and System a pulldown menu provides multiple category. These categories are user definable through the odb under the tree /Elog/Types, /Elog/Systems. The number of category is fixed to 20 maximum but any remaining field can be left empty.

Elog page, New Elog entry form.
mhelognew.gif


Program page

This page present the current active list of the task attached to the given experiment. On the right hand side a dedicated button allows to stop the program which is equivalent to the ODBedit command odbedit> sh <task name> .

The task name hyperlink pops a new window pointing to the ODB section related to that program. The ODB structure for each program permit to apply alarm on the task presence condition and automatic spawning at either the begining or the end of a run.

Program page.
mhprg.gif


History page

This page reflects the History system settings. It lists on the top of the page the possible pannels defined in the ODB. A serie of buttons defines the full time scale of the graph and the "\>" "+" "-" ">" ">>" buttons permit the shifting of the graph in the time direction. The main graph will always display all the defined channels but clicking on the boxed channel names will supersede the page with this single channel. Elog message with the current history display as attachement for reference is possible using the Elog button.

From version 1.9.0, the history page display has been greatly improved:

History page.
history19.jpg

History channel selection Page.
historyselect.jpg


Alarm page

This page reflects the Alarm System settings. It presents the four type of alarms:


Custom page

The Custom page is available from the Version 1.8.3.

This page reflects the html content of a given ODB key under the /Custom/ key. If keys are defined in the ODB under the /Custom/ the name of the key will appear in the main status page as the Alias keys. By clicking on the Custom page name, the content of the /Custom/<page> is interpreted as html content.

Custom web page with history graph.
mhcustom1.gif

The access to the ODB field is then possible using specific HTML tags:

ODB /Custom/ html field.
mhcustom2.gif

The insertion of a new Custom page requires the following steps:

web page produced by mcustom.html.
mhcustom3.gif

previous.gif Utilities - Top - Data format next.gif


Midas DOC Version 1.9.3 ---- PSI Stefan Ritt ----
Contributions: Pierre-Andre Amaudruz - Suzannah Daviel - Doxygen - Peter Green - Greg Hackman - Gertjan Hofman - Paul Knowles - Rudi Meier - Glenn Moloney - Dave Morris - Konstantin Olchanski - Renee Poutissou - Andreas Suter - Piotr Adam Zolnierczuk