Frontend Operation: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 22: Line 22:
The term "<span style="color: green; font-style:italic; ">frontend code</span>"  in this document usually refers to the user part (i.e. ''frontend.c''), since the system framework (''mfe.c'') is fixed.  
The term "<span style="color: green; font-style:italic; ">frontend code</span>"  in this document usually refers to the user part (i.e. ''frontend.c''), since the system framework (''mfe.c'') is fixed.  


To build a <span style="color: green; font-style:italic; ">frontend task</span>, 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).
To build a <span style="color: green; font-style:italic; ">frontend task</span>, 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 "<span style="color: green; font-style:italic; ">''frontend task''</span>"
A "<span style="color: green; font-style:italic; ">''frontend task''</span>"
Line 29: Line 29:
== Hardware Modules ==
== Hardware Modules ==


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


== Hardware Drivers ==
== Hardware Drivers ==
The [[Frontend]] is usually linked to a  "'''driver'''" for the particular hardware in use.
The [[#Frontend|Frontend]] is usually linked to a  "device driver" for the particular hardware in use.
A driver is a piece of code that allows the computer to access some particular hardware.
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  
Dedicated header and library files (i.e. drivers) for hardware access  
to CAMAC, VME, Fastbus, GPIB and RS232 are part of the MIDAS distribution set.
to VME, GPIB, RS232 and CAMAC are part of the MIDAS distribution set.
Several libraries and drivers exist for the various bus systems.
Several libraries and drivers exist for the various bus systems. See [[MIDAS Driver Library]].
 
For example, driver code for various vme modules can be found in the MIDAS package at
../midas/drivers/vme/

Revision as of 15:56, 18 October 2013

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.