Frontend Operation

From MidasWiki
Revision as of 15:56, 18 October 2013 by Suz (talk | contribs)
Jump to navigation Jump to search

Introduction

The terms that are needed for a discussion of a frontend will be introduced here. The features of a typical frontend task will then be explained by reference to some of the examples included with the MIDAS package.


Frontend

The term "frontend" usually refers to a "frontend task" or program running on a particular computer which has access to hardware equipment in use by the experiment. An experiment may run several frontends, each performing different functions.

A frontend task consists of

  • a fixed experiment-independent system framework (i.e. mfe.c)
handling the data flow control, data transmission and run control operation.
  • a user part (e.g. frontend.c)
written by the user describing the sequence of actions to acquire the hardware data

A set of templates for the user part is provided in the MIDAS package (e.g. ../midas/examples/experiment/frontend.c).

The hardware access is only apparent in the user part ( referred to here as frontend.c, but the user may select any name). The system framework is contained in the file mfe.c, which is part of the MIDAS package (the name "mfe" stands for "MIDAS front end").

The term "frontend code" in this document usually refers to the user part (i.e. frontend.c), since the system framework (mfe.c) is fixed.

To build a frontend task, the user code frontend.c and system code mfe.c are compiled and linked together with the required libraries, by running a Makefile (e.g. ../midas/examples/experiment/Makefile in the MIDAS package).

A "frontend task" may have any name the user chooses (e.g. fevme, fegpib). To run the task, see Frontend Application.

Hardware Modules

Examples of hardware modules that may be accessed by the Frontend are ADC modules, TDC modules, Scaler modules. See Current supported Hardware;

Hardware Drivers

The Frontend is usually linked to a "device driver" for the particular hardware in use. A device driver (or "driver") is a piece of code that allows the computer to access some particular hardware.

Dedicated header and library files (i.e. drivers) for hardware access to VME, GPIB, RS232 and CAMAC are part of the MIDAS distribution set. Several libraries and drivers exist for the various bus systems. See MIDAS Driver Library.